142 lines
6.6 KiB
Plaintext
142 lines
6.6 KiB
Plaintext
@model dynamic
|
|
@{
|
|
var selected = (ViewData["selected"] ?? "").ToString();
|
|
var name = (ViewData["name"] ?? "").ToString();
|
|
var id = (ViewData["name"] ?? "").ToString().Replace(".", "_");
|
|
var df = (ViewData["df"] ?? "").ToString();
|
|
var cssclass = (ViewData["class"] ?? "").ToString();
|
|
var onchange = (ViewData["onchange"] ?? "").ToString();
|
|
var special = (ViewData["special"] ?? "").ToString();
|
|
var start = Convert.ToInt32((ViewData["start"] ?? "0").ToString());
|
|
var end = Convert.ToInt32((ViewData["end"] ?? "0").ToString());
|
|
var textadd = (ViewData["textadd"] ?? "").ToString();
|
|
var disabled = (ViewData["disabled"] ?? "").ToString() == "" ? "" : "disabled";
|
|
var valuetext = (ViewData["valuetext"] ?? "").ToString() == "" ? new string[] { } : (ViewData["valuetext"] ?? "").ToString().Split(';');
|
|
var style = (ViewData["style"] ?? "").ToString();
|
|
var formgroupstyle = (ViewData["formgroupstyle"] ?? "").ToString();
|
|
}
|
|
@if (name == "PageRowCount")
|
|
{
|
|
var rc = (int)Model;
|
|
@:전체: @rc.ToString("#,0") 건
|
|
<select @disabled id="@(id)" name="@(name)" style="min-width: initial; @style">
|
|
<option value="10" @(selected == "10" ? "selected" : "")>10개</option>
|
|
<option value="20" @(selected == "20" ? "selected" : "")>20개</option>
|
|
<option value="30" @(selected == "30" ? "selected" : "")>30개</option>
|
|
<option value="50" @(selected == "50" ? "selected" : "")>50개</option>
|
|
<option value="100" @(selected == "100" ? "selected" : "")>100개</option>
|
|
<option value="1000" @(selected == "1000" ? "selected" : "")>1000개</option>
|
|
</select>
|
|
}
|
|
else if (special.ToLower() == "fromto")
|
|
{
|
|
<select @disabled id="@(id)" name="@(name)" style="min-width: initial; @style" class="form-control dev @(cssclass)" onchange="@(onchange)">
|
|
@if (df != "")
|
|
{
|
|
<option value="@df.Split(':')[0]">@df.Split(':')[1]</option>
|
|
}
|
|
@for (int i = start; i <= end; i++)
|
|
{
|
|
<option class="deletable" value="@(i)" @(selected == i.ToString() ? "selected" : "")>@i@(textadd)</option>
|
|
}
|
|
</select>
|
|
}
|
|
else if (special == "fromtodesc")
|
|
{
|
|
<select @disabled id="@(id)" name="@(name)" style="min-width: initial; @style" class="form-control dev @(cssclass)" onchange="@(onchange)">
|
|
@if (df != "")
|
|
{
|
|
<option value="@df.Split(':')[0]">@df.Split(':')[1]</option>
|
|
}
|
|
@for (int i = end; i >= start; i--)
|
|
{
|
|
<option class="deletable" value="@(i)" @(selected == i.ToString() ? "selected" : "")>@i@(textadd)</option>
|
|
}
|
|
</select>
|
|
}
|
|
else if (special == "Hour")
|
|
{
|
|
<select @disabled id="@(id)" name="@(name)" style="min-width: initial; @style" class="form-control dev @(cssclass)" onchange="@(onchange)">
|
|
@if (df != "")
|
|
{
|
|
<option value="@df.Split(':')[0]">@df.Split(':')[1]</option>
|
|
}
|
|
@for (int i = 0; i <= 23; i++)
|
|
{
|
|
<option class="deletable" value="@(i.ToString("00"))" @(selected == i.ToString() ? "selected" : "")>@i 시</option>
|
|
}
|
|
</select>
|
|
}
|
|
else if (special == "Minute")
|
|
{
|
|
<select id="@(id)" name="@(name)" style="min-width: initial; @style" class="form-control dev @(cssclass)" onchange="@(onchange)">
|
|
@if (df != "")
|
|
{
|
|
<option value="@df.Split(':')[0]">@df.Split(':')[1]</option>
|
|
}
|
|
@for (int i = 0; i <= 59; i++)
|
|
{
|
|
<option class="deletable" value="@(i.ToString("00"))" @(selected == i.ToString() ? "selected" : "")>@i 분</option>
|
|
}
|
|
</select>
|
|
}
|
|
else if (special == "reg" || name == "SearchType")
|
|
{
|
|
<select @disabled id="@(name.Replace(".", "_"))" name="@(name)" onchange="@(onchange != "" ? onchange : "")" class="form-control dev @(cssclass)" style=" @style">
|
|
@if (df != "")
|
|
{
|
|
<option value="@(df.Contains(":") ? df.Split(':')[0] : "")" data-classgrade="0">@(df.Contains(":") ? df.Split(':')[1] : df)</option>
|
|
}
|
|
@if (valuetext.Length > 0)
|
|
{
|
|
foreach (var item in valuetext)
|
|
{
|
|
<option value="@(item.Split(':')[0])" @(item.Split(':')[0] == selected ? "selected" : "")>@(item.Split(':')[1])</option>
|
|
}
|
|
}
|
|
else if (Model != null){
|
|
foreach (var item in Model)
|
|
{
|
|
<option value="@(item.value)" data-refcode="@item.refcode" @(item.value == selected ? "selected" : "")>@item.text</option>
|
|
}
|
|
}</select>
|
|
}
|
|
else if (special == "email")
|
|
{
|
|
<select @disabled id="@(name.Replace(".", "_"))" name="@(name)" onchange="@(onchange != "" ? onchange : "")" class="form-control dev @(cssclass)" style=" @style">
|
|
@if (df != "")
|
|
{
|
|
<option value="@(df.Contains(":") ? df.Split(':')[0] : "")" data-classgrade="0">@(df.Contains(":") ? df.Split(':')[1] : df)</option>
|
|
}
|
|
<option value="naver.com" @("naver.com" == selected ? "selected" : "")>naver.com</option>
|
|
<option value="daum.net" @("daum.net" == selected ? "selected" : "")>daum.net</option>
|
|
<option value="gmail.com" @("gmail.com" == selected ? "selected" : "")>gmail.com</option>
|
|
<option value="hotmail.com" @("hotmail.com" == selected ? "selected" : "")>hotmail.com</option>
|
|
</select>
|
|
}
|
|
else if (valuetext.Length > 0)
|
|
{
|
|
<select @disabled id="@(name.Replace(".", "_"))" name="@(name)" onchange="@(onchange != "" ? onchange : "")" class="form-control dev @(cssclass)" style=" @style">
|
|
@if (df != "")
|
|
{
|
|
<option value="@(df.Contains(":") ? df.Split(':')[0] : "")" data-classgrade="0">@(df.Contains(":") ? df.Split(':')[1] : df)</option>
|
|
}
|
|
@foreach (var item in valuetext)
|
|
{
|
|
<option value="@(item.Split(':')[0])" @(item.Split(':')[0] == selected ? "selected" : "")>@(item.Split(':')[1])</option>
|
|
}</select>
|
|
}
|
|
else
|
|
{
|
|
<div class="form-group" style="@formgroupstyle">
|
|
<select @disabled id="@(name.Replace(".", "_"))" name="@(name)" onchange="@(onchange != "" ? onchange : "")" class="form-control dev @(cssclass)" style=" @style">
|
|
@if (df != "")
|
|
{
|
|
<option value="@(df.Contains(":") ? df.Split(':')[0] : "")" data-classgrade="0">@(df.Contains(":") ? df.Split(':')[1] : df)</option>
|
|
}
|
|
@foreach (var item in Model)
|
|
{
|
|
<option value="@(item.value)" data-refcode="@item.refcode" @(item.value == selected ? "selected" : "")>@item.text</option>
|
|
}</select>
|
|
</div>
|
|
} |