75 lines
4.5 KiB
Plaintext
75 lines
4.5 KiB
Plaintext
@model NP.Model.VMCM
|
|
@{ Layout = "~/Views/Shared/_PopupLayout.cshtml";}
|
|
<tr class="row">
|
|
<form id="mform" method="post" enctype="multipart/form-data" class="form-horizontal" action="/cm/termreg">
|
|
<table class="regtable">
|
|
<colgroup><col style="width:120px;" /><col /></colgroup>
|
|
<tr>
|
|
<th class="req">년도/기수</th>
|
|
<td style="line-height: 35px;">
|
|
@Html.Partial("./Partial/Select", Model.Term.tyear, new ViewDataDictionary { { "special", "fromtodesc" }, { "textadd", "년" }, { "start", 2000 }, { "end", DateTime.Now.Year + 1 }, { "name", "Term.tyear" }, { "selected", Model.Term.tyear } })
|
|
@Html.TextBoxFor(m => m.Term.tseq, new { @class = "form-control ff disp-init int nocomma datazero text-center", @style = "width: 80px;", @maxlength = "4" })
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>수강신청기간</th>
|
|
<td style="line-height: 35px;">
|
|
@Html.Partial("./Partial/Date", Model.Term.rstime == null ? (DateTime?)null : Convert.ToDateTime(Model.Term.rstime), new ViewDataDictionary { { "name", "Term.rstime" } }) ~
|
|
@Html.Partial("./Partial/Date", Model.Term.retime == null ? (DateTime?)null : Convert.ToDateTime(Model.Term.retime), new ViewDataDictionary { { "name", "Term.retime" } })
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>학습기간</th>
|
|
<td>
|
|
@Html.Partial("./Partial/Date", Model.Term.sstime == null ? (DateTime?)null : Convert.ToDateTime(Model.Term.sstime), new ViewDataDictionary { { "name", "Term.sstime" } }) ~
|
|
@Html.Partial("./Partial/Date", Model.Term.setime == null ? (DateTime?)null : Convert.ToDateTime(Model.Term.setime), new ViewDataDictionary { { "name", "Term.setime" } })
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>성적처리기간</th>
|
|
<td>
|
|
@Html.Partial("./Partial/Date", Model.Term.gstime == null ? (DateTime?)null : Convert.ToDateTime(Model.Term.gstime), new ViewDataDictionary { { "name", "Term.gstime" } }) ~
|
|
@Html.Partial("./Partial/Date", Model.Term.getime == null ? (DateTime?)null : Convert.ToDateTime(Model.Term.getime), new ViewDataDictionary { { "name", "Term.getime" } })
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div class="findboxbtnbox">
|
|
<a href="#" class="btn btn-primary" onclick="save();">저장</a>
|
|
<a href="#" class="btn btn-default" onclick="goparent();">닫기</a>
|
|
</div>
|
|
@Html.HiddenFor(m => m.intval)
|
|
@Html.HiddenFor(m => m.Term.tmno)
|
|
</form>
|
|
</div>
|
|
@section scriptsHeader{
|
|
@Html.Partial("./Partial/ScriptDate")
|
|
}
|
|
@section scripts{
|
|
<script>
|
|
$(document).ready(function () {
|
|
if (val("Term_tseq") == "0") {
|
|
setv("Term_tseq", "");
|
|
}
|
|
});
|
|
function save() {
|
|
if (check("Term_tseq", null, "기수를 입력해주세요.")) { }
|
|
else if (val("Term_tseq") < 0 || getDouble(val("Term_tseq")) < 1) { msg("기수는 양수로만 입력할 수 있습니다."); }
|
|
else if (val("Term_rstime") + val("Term_retime") != "" && (getint(val("Term_retime")) < getint(val("Term_rstime")) || getint(val("Term_retime")) < 1 || getint(val("Term_rstime")) < 1)) { focus("Term_rstime");msg("수강신청기간을 올바르게 입력해주세요."); }
|
|
else if (val("Term_sstime") + val("Term_setime") != "" && (getint(val("Term_setime")) < getint(val("Term_sstime")) || getint(val("Term_setime")) < 1 || getint(val("Term_sstime")) < 1)) { focus("Term_sstime");msg("학습기간을 올바르게 입력해주세요."); }
|
|
else if (val("Term_gstime") + val("Term_getime") != "" && (getint(val("Term_getime")) < getint(val("Term_gstime")) || getint(val("Term_getime")) < 1 || getint(val("Term_gstime")) < 1)) { focus("Term_gstime");msg("성적처리기간을 올바르게 입력해주세요."); }
|
|
else if (confirm("저장하시겠습니까?")) {
|
|
cap("/acommon/termsave", null, "cbsave");
|
|
}
|
|
}
|
|
function cbsave() {
|
|
if (capResult.code == 1000) {
|
|
msgok(1, "", true);
|
|
goparent(true, 700);
|
|
} else if (capResult.obj == -1) {
|
|
msg("이미 등록된 기수입니다.");
|
|
}
|
|
else { msgdev(); }
|
|
}
|
|
</script>
|
|
}
|