YNICTE/BO/Views/data/learns4.cshtml

107 lines
5.0 KiB
Plaintext

@model NP.Model.VMMM
<br />
<form id="mform" method="post">
<section class="panel panel-default clearfix devsearch" data-cleartbody="tbody1">
@Html.Partial("./Partial/SearchCaption")
<div class="step-content">
<div class="step-pane active form-inline">
<div class="form-group">
<select id="year" name="stringval" class="form-control disp-init">
<option value="">-년도선택</option>
@foreach (var y in Model.Terms.Select(s => s.tyear).Distinct())
{
<option value="@y" @(Model.stringval == y.ToString() ? "selected" : "")>@y 년</option>
}
</select>
<select id="tmno" name="stringval2" class="form-control disp-init">
<option value="">-기수선택</option>
@foreach (var t in Model.Terms.Where(w => w.tyear == DateTime.Now.Year))
{
<option value="@t.tmno" @(Model.stringval2 == t.tmno.ToString() ? "selected" : "")>@t.tseq 기</option>
}
</select>
@Html.Partial("./Partial/Button", new NP.Model.Button() { Special = "search", OnClick = "" })
</div>
</div>
</div>
</section>
<div class="tar buttonbox">
<a href="#" onclick="javascript:exceldown('mform', '/data/learns', 'tbody1', 'RawLearns');" class="btn btn-s-xs btn-success" style="margin-left: 5px;">엑셀다운로드</a>
</div>
<section class="panel panel-default">
<div class="table-responsive" id="excel1">
<table class="table table-striped b-t b-light no-odd">
<thead>
<tr>
<th colspan="9">강좌정보</th>
<th colspan="9">신청정보</th>
</tr>
<tr>
<th>년도</th>
<th>기수</th>
<th>상위분류</th>
<th>과정분류</th>
<th>과정명</th>
<th>강좌명(반)</th>
<th>교육기간</th>
<th>회원가</th>
<th>비회원가</th>
<th>고객사</th>
<th>고객사구분</th>
<th>고객사업종</th>
<th>환급구분</th>
<th>교육생이름</th>
<th>교육생ID</th>
<th>신청일시</th>
<th>직급</th>
<th>수료여부</th>
</tr>
</thead>
<tbody class="data" id="tbody1">
@foreach (var item in Model.CMLects)
{
<tr>
<td>@item.tyear</td>
<td>@item.tseq</td>
<td>@item.pcgname</td>
<td>@item.cgname</td>
<td class="text-left">@item.pcname</td>
<td class="text-left">@item.cnameclassno</td>
<td>@item.sssename</td>
<td class="text-right">@item.infee.ToString("#,0")</td>
<td class="text-right">@item.outfee.ToString("#,0")</td>
<td>@item.asname</td>
<td>@item.isjoinname</td>
<td>@item.asctgname</td>
<td>@item.isrebatename</td>
<td>@item.username</td>
<td>@item.userid</td>
<td>@item.cdtymd</td>
<td>@item.ccpositionname</td>
<td>@item.iscompletename</td>
</tr>
}
</tbody>
</table>
</div>
</section>
@Html.HiddenFor(m => m.tabidx)
</form>
<script>
var terms = '@(string.Join(";", Model.Terms.Select(s=>string.Format("{0}:{1}:{2}", s.tmno, s.tyear, s.tseq))))';
$(document).ready(function () {
$(".mainbr").remove();
$("#year").on("change", function () {
$("#tmno option:gt(0)").remove();
$("#Memo_cmno option:gt(0)").remove();
var y = $(this).val();
if (y != "") {
$.each(terms.split(';'), function (i, t) {
if (t.split(':')[1] == y) {
$("#tmno").append("<option value=\"" + t.split(':')[0] + "\">" + t.split(':')[2] + " 기</optoin>");
}
});
}
});
});
</script>