This commit is contained in:
parent
5cdce10df6
commit
ccfa0c2744
|
|
@ -255,10 +255,19 @@ namespace NP.BO.Controllers
|
||||||
|
|
||||||
public ActionResult cmregeduschedule(VMCM vm)
|
public ActionResult cmregeduschedule(VMCM vm)
|
||||||
{
|
{
|
||||||
vm.CM = Dao.Get<CM>("cm.cms", new System.Collections.Hashtable() { { "cmno", vm.intval } }).First();
|
vm.CM = Dao.Get<CM>("cm.cms", new System.Collections.Hashtable() { { "cmno", vm.intval } }).FirstOrDefault();
|
||||||
vm.CMMenus = Dao.Get<CMMenu>("cm.cmmenus", vm.CM.cmno);
|
if (vm.CM == null)
|
||||||
vm.CMMenu = vm.CMMenus.First();
|
{
|
||||||
vm.BoardMasters = Dao.Get<BoardMaster>("board.bms", new System.Collections.Hashtable() { { "bmposition", 1 }, { "isopen", 1 }, { "orderby", "a.cdt" } });
|
return Redirect("/");
|
||||||
|
}
|
||||||
|
vm.CMInnings = Dao.Get<CMInning>("cm.cminnings", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "isonline", 0 } });
|
||||||
|
if (vm.CMInnings.Count > 0)
|
||||||
|
{
|
||||||
|
vm.CMInningscds = Dao.Get<CMinningscd>("cm.cminningscds", new System.Collections.Hashtable() { { "cmno", vm.CMInnings[0].cmino } });
|
||||||
|
}
|
||||||
|
vm.ComCodes = GetComCodes("studyplace");
|
||||||
|
vm.CMPRs = Dao.Get<CMPR>("cm.cmprs", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno } });
|
||||||
|
ViewBag.fronturl = GetConfig("fronturl");
|
||||||
return View("cmregeduschedule", vm);
|
return View("cmregeduschedule", vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<ul class="pagination pagination-md" style="margin: 0;">
|
<ul class="pagination pagination-md" style="margin: 0;">
|
||||||
<li class="@(Model.tabidx == 0 ? "active" : "")" id="tab1"><a href="#" data-toggle="tab">기본정보</a></li>
|
<li class="@(Model.tabidx == 0 ? "active" : "")" id="tab1"><a href="#" data-toggle="tab">기본정보</a></li>
|
||||||
<li class="@(Model.tabidx == 1 ? "active" : "")"><a href="#" onclick="@(Model.CM.cmno < 1 ? "gotab()":"gotab(1)");" data-toggle="tab">회차설정</a></li>
|
<li class="@(Model.tabidx == 1 ? "active" : "")"><a href="#" onclick="@(Model.CM.cmno < 1 ? "gotab()":"gotab(1)");" data-toggle="tab">회차설정</a></li>
|
||||||
@if (Model.CM.ismaster == 0)
|
@if (Model.CM.ismaster == 0 && Model.CM.cshape == 2)
|
||||||
{
|
{
|
||||||
<li class="@(Model.tabidx == 2 ? "active" : "")"><a href="#" onclick="@(Model.CM.cmno < 1 ? "gotab()" : "gotab(2)");" data-toggle="tab">교육일정</a></li>
|
<li class="@(Model.tabidx == 2 ? "active" : "")"><a href="#" onclick="@(Model.CM.cmno < 1 ? "gotab()" : "gotab(2)");" data-toggle="tab">교육일정</a></li>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,407 +1,398 @@
|
||||||
@model NP.Model.VMCM
|
@model NP.Model.VMCM
|
||||||
<div>
|
<div style="@(Model.CM.cmno < 1 ? "display: none;":"")">
|
||||||
<ul class="pagination pagination-md" style="margin: 0;">
|
<ul class="pagination pagination-md" style="margin: 0;">
|
||||||
<li class="@(Model.tabidx == 0 ? "active" : "")" id="tab1"><a href="#" data-toggle="tab">기본정보</a></li>
|
<li class=""><a href="#" onclick="gotab(0);" data-toggle="tab">기본정보</a></li>
|
||||||
<li class="@(Model.tabidx == 1 ? "active" : "")"><a href="#" onclick="@(Model.CM.cmno < 1 ? "gotab()":"gotab(1)");" data-toggle="tab">회차설정</a></li>
|
<li class=""><a href="#" onclick="gotab(1);" data-toggle="tab">회차설정</a></li>
|
||||||
<li class="@(Model.tabidx == 2 ? "active" : "")"><a href="#" onclick="@(Model.CM.cmno < 1 ? "gotab()":"gotab(2)");" data-toggle="tab">교육일정</a></li>
|
@if (Model.CM.ismaster == 0 && Model.CM.cshape == 2)
|
||||||
<li class="@(Model.tabidx == 3 ? "active" : "")"><a href="#" onclick="@(Model.CM.cmno < 1 ? "gotab()":"gotab(3)");" data-toggle="tab">평가설정</a></li>
|
{
|
||||||
<li class="@(Model.tabidx == 4 ? "active" : "")"><a href="#" onclick="@(Model.CM.cmno < 1 ? "gotab()":"gotab(4)");" data-toggle="tab">메뉴설정</a></li>
|
<li class="active"><a href="#" data-toggle="tab">교육일정</a></li>
|
||||||
|
}
|
||||||
|
<li class=""><a href="#" onclick="gotab(3);" data-toggle="tab">평가설정</a></li>
|
||||||
|
<li class=""><a href="#" onclick="gotab(4);" data-toggle="tab">메뉴설정</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mgclear">
|
<form id="mform1" method="post" class="form-horizontal">
|
||||||
<form id="mform" method="post" enctype="multipart/form-data" class="form-horizontal">
|
<section class="panel panel-default" style="border-top: 1px solid #ddd; margin-top: 5px;">
|
||||||
<section class="panel panel-default">
|
<header class="panel-heading"><strong><i class="fa fa-bars"></i> 기본설정<span class=""></span></strong></header>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 col-md-2 control-label req">@(Model.viewidxname)분류</label>
|
<label class="col-sm-4 col-md-2 control-label">기수 | 강좌명 | 분반</label>
|
||||||
<div class="col-sm-8 col-md-10">
|
<div class="col-sm-8 col-md-10"><input type="text" class="form-control" disabled value="@(Model.CM.tmname) | @(Model.CM.cname) | @(Model.CM.classno)반" /></div>
|
||||||
@Html.Partial("./Partial/Select", Model.CGs.Where(w => w.pcgno == null), new ViewDataDictionary { { "special", "reg" }, { "name", "pcgno" }, { "selected", Model.CM.pcgno }, { "df", ":-상위분류" }, { "class", "disp-init" } })
|
|
||||||
@Html.Partial("./Partial/Select", Model.CGs.Where(w => w.pcgno == Model.CM.pcgno), new ViewDataDictionary { { "special", "reg" }, { "name", "CM.cgno" }, { "selected", Model.CM.cgno }, { "df", ":-과정분류" }, { "class", "disp-init" } })
|
|
||||||
@if (Model.CM.ismaster == 0)
|
|
||||||
{
|
|
||||||
<select disabled class="form-control disp-init" style="width: auto"><option>@Model.CM.pcgname</option></select>
|
|
||||||
<select disabled class="form-control disp-init" style="width: auto"><option>@Model.CM.cgname</option></select>
|
|
||||||
<select disabled class="form-control disp-init" style="width: auto"><option>@Model.CM.pcname</option></select>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@if (Model.CM.ismaster == 0)
|
|
||||||
{
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label req">기수/강좌명/분반@(Model.viewidxname)명</label>
|
|
||||||
<div class="col-sm-8 col-md-10">
|
|
||||||
<select disabled class="form-control disp-init" style="width: auto"><option>@Model.CM.tmname</option></select>
|
|
||||||
@Html.TextBoxFor(m => m.CM.cname, new { @class = "form-control disp-init ff", @style = "width: 50%", @maxlength = "100", @placeholder = Model.viewidxname + "명을 입력하세요." })
|
|
||||||
<input type="text" value="@(Model.CM.classno) 반" class="form-control disp-init" style="width: 100px; text-align: center" disabled />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="keyword" style="@(Model.CM.pcgno==Model.CGs.Where(w=>w.cgcode==ViewBag.OffCode).Select(w=>w.cgno).FirstOrDefault() ? "":"display:none;")">
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">키워드</label>
|
|
||||||
<div class="col-sm-8 col-md-10">
|
|
||||||
@Html.TextBoxFor(m => m.CM.kname, new { @class = "form-control disp-init ff", @style = "width: 60%", @maxlength = "100" })<br />
|
|
||||||
<label style="color: red;">* 강좌를 표현할 수 있는 단어를 입력해주세요. 홈페이지 홈화면 오프라인 강좌에 출력됩니다. </label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label @(Model.CM.ismaster == 0 ? "req" : "")">신청기간</label>
|
|
||||||
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Date", Model.CM.rstime == null ? (DateTime?)null : Convert.ToDateTime(Model.CM.rstime), new ViewDataDictionary { { "name", "CM.rstime" } }) ~ @Html.Partial("./Partial/Date", Model.CM.retime == null ? (DateTime?)null : Convert.ToDateTime(Model.CM.retime), new ViewDataDictionary { { "name", "CM.retime" } })</div>
|
|
||||||
</div>
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label @(Model.CM.ismaster == 0 ? "req" : "")">학습기간</label>
|
|
||||||
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Date", Model.CM.sstime == null ? (DateTime?)null : Convert.ToDateTime(Model.CM.sstime), new ViewDataDictionary { { "name", "CM.sstime" } }) ~ @Html.Partial("./Partial/Date", Model.CM.setime == null ? (DateTime?)null : Convert.ToDateTime(Model.CM.setime), new ViewDataDictionary { { "name", "CM.setime" } })</div>
|
|
||||||
</div>
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label @(Model.CM.ismaster == 0 ? "req" : "")">성적처리기간</label>
|
|
||||||
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Date", Model.CM.gstime == null ? (DateTime?)null : Convert.ToDateTime(Model.CM.gstime), new ViewDataDictionary { { "name", "CM.gstime" } }) ~ @Html.Partial("./Partial/Date", Model.CM.getime == null ? (DateTime?)null : Convert.ToDateTime(Model.CM.getime), new ViewDataDictionary { { "name", "CM.getime" } })</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label req">@(Model.viewidxname)명</label>
|
|
||||||
<div class="col-sm-8 col-md-10">@Html.TextBoxFor(m => m.CM.cname, new { @class = "form-control disp-init ff", @style = "width: 50%", @maxlength = "100", @placeholder = Model.viewidxname + "명을 입력하세요." })</div>
|
|
||||||
</div>
|
|
||||||
<div id="keyword" style=" @(Model.CM.pcgno==Model.CGs.Where(w=>w.cgcode==ViewBag.OffCode).Select(w=>w.cgno).FirstOrDefault() ? "":"display:none;")">
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">키워드</label>
|
|
||||||
<div class="col-sm-8 col-md-10">
|
|
||||||
@Html.TextBoxFor(m => m.CM.kname, new { @class = "form-control disp-init ff", @style = "width: 60%", @maxlength = "100" })<br />
|
|
||||||
<label style="color: red;">* 과정을 표현할 수 있는 단어를 입력해주세요. 홈페이지 홈화면 오프라인 강좌에 출력됩니다. </label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label req">교육유형</label>
|
|
||||||
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Radio", Model.CM.cshape, new ViewDataDictionary() { { "valuetext", "0:온라인;1:오프라인;2:혼합(온라인+오프라인)" }, { "checked", Model.CM.cshape }, { "name", "CM.cshape" } })</div>
|
|
||||||
</div>
|
|
||||||
<div id="divLegalEdu" style="display:none">
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">기술인분류</label>
|
|
||||||
<div class="col-sm-8 col-md-10">
|
|
||||||
@Html.HiddenFor(m => m.CM.typeman)
|
|
||||||
@Html.Partial("./Partial/Checkbox", Model.ComCodes.Where(w => w.cgroup == "typeman"), new ViewDataDictionary { { "name", "typeman" }, {"autobind", "CM_typeman" }, { "checked", Model.CM.typeman }@*, { "fixwidth", "100px" }*@ })
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">교육목적</label>
|
|
||||||
<div class="col-sm-8 col-md-10">
|
|
||||||
@Html.HiddenFor(m => m.CM.typeedu)
|
|
||||||
@Html.Partial("./Partial/Checkbox", Model.ComCodes.Where(w => w.cgroup == "typeedu"), new ViewDataDictionary { { "name", "typeedu" }, {"autobind", "CM_typeedu" }, { "checked", Model.CM.typeedu }@*, { "fixwidth", "100px" }*@ })
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">등급</label>
|
|
||||||
<div class="col-sm-8 col-md-10">
|
|
||||||
@Html.HiddenFor(m => m.CM.typegrade)
|
|
||||||
@Html.Partial("./Partial/Checkbox", Model.ComCodes.Where(w => w.cgroup == "typegrade"), new ViewDataDictionary { { "name", "typegrade" }, {"autobind", "CM_typegrade" }, { "checked", Model.CM.typegrade }@*, { "fixwidth", "100px" }*@ })
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">직무분야</label>
|
|
||||||
<div class="col-sm-8 col-md-10">
|
|
||||||
@Html.HiddenFor(m => m.CM.typejob)
|
|
||||||
@Html.Partial("./Partial/Checkbox", Model.ComCodes.Where(w => w.cgroup == "typejob"), new ViewDataDictionary { { "name", "typejob" }, {"autobind", "CM_typejob" }, { "checked", Model.CM.typejob }@*, { "fixwidth", "100px" }*@ })
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label req">수강료/정원</label>
|
|
||||||
<div class="col-sm-8 col-md-10">
|
|
||||||
정회원 : @Html.TextBoxFor(m => m.CM.infee, new { @class = "form-control disp-init int text-right", @style = "width: 150px;", @maxlength = "12" })
|
|
||||||
비회원 : @Html.TextBoxFor(m => m.CM.outfee, new { @class = "form-control disp-init int text-right", @style = "width: 150px;", @maxlength = "12" })
|
|
||||||
정원 : @Html.TextBoxFor(m => m.CM.quota, new { @class = "form-control disp-init int text-right", @style = "width: 150px;", @maxlength = "6" })
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label req">담당자/교강사</label>
|
|
||||||
<div class="col-sm-8 col-md-10">
|
|
||||||
<label style="color: red;">*담당자/교강사 삭제시 강사료데이터도 삭제되며 학습회차의 담당강사도 삭제됩니다.</label><br />
|
|
||||||
<a href="#" class="btn btn-info btn-find btn-xs data-find data-find-float" onclick="findusershow()"><i class="fa fa-search"></i></a>
|
|
||||||
<ul class="selectgroupul" id="cmprdatabox">
|
|
||||||
@foreach (var d in Model.Datas.Where(w => w.dtype == 1))
|
|
||||||
{
|
|
||||||
<li class="no@(d.intval)" data-no="@d.intval"><label>[@(d.intval2 == 11 ? "강사" : "운영자")]@d.strval</label><a href="#" class="adel" onclick="ullidel(this)">X</a></li>
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">교재</label>
|
|
||||||
<div class="col-sm-8 col-md-10">
|
|
||||||
<a href="#" class="btn btn-info btn-find btn-xs data-find data-find-float" onclick="findbookshow()"><i class="fa fa-search"></i></a>
|
|
||||||
<ul class="selectgroupul" id="bookdatabox">
|
|
||||||
@foreach (var d in Model.Datas.Where(w => w.dtype == 2))
|
|
||||||
{
|
|
||||||
<li class="no@(d.intval)" data-no="@d.intval"><label>@d.strval</label><a href="#" class="adel" onclick="ullidel(this)">X</a></li>
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">@(Model.viewidxname)소개</label>
|
|
||||||
<div class="col-sm-8 col-md-10">@Html.TextAreaFor(m => m.CM.introhtml, new { @class = "form-control", @style = "resize: none; width: 90%; height: 80px; padding: 3px 5px;" })</div>
|
|
||||||
</div>
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">학습대상</label>
|
|
||||||
<div class="col-sm-8 col-md-10">@Html.TextAreaFor(m => m.CM.targethtml, new { @class = "form-control", @style = "resize: none; width: 90%; height: 80px; padding: 3px 5px;" })</div>
|
|
||||||
</div>
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">학습목표</label>
|
|
||||||
<div class="col-sm-8 col-md-10">@Html.TextAreaFor(m => m.CM.goalhtml, new { @class = "form-control", @style = "resize: none; width: 90%; height: 80px; padding: 3px 5px;" })</div>
|
|
||||||
</div>
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">학습내용</label>
|
|
||||||
<div class="col-sm-8 col-md-10">@Html.TextAreaFor(m => m.CM.contenthtml, new { @class = "form-control", @style = "resize: none; width: 90%; height: 80px; padding: 3px 5px;" })</div>
|
|
||||||
</div>
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">학습장소</label>
|
|
||||||
<div class="col-sm-8 col-md-10">
|
|
||||||
@*@Html.TextBoxFor(m => m.CM.studyplace, new { @class = "form-control disp-init", @style = "width: 300px;", @maxlength = "150", @placeholder = "" })*@
|
|
||||||
@Html.Partial("./Partial/Radio", Model.ComCodes.Where(w => w.cgroup == "studyplace"), new ViewDataDictionary() { { "checked", Model.CM.studyplace }, { "name", "CM.studyplace" } })
|
|
||||||
<span style="vertical-align: middle; margin-top: 3px; margin-left: 50px;">※ 유형이 온라인일 경우 출력되지 않음</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">학습시간</label>
|
|
||||||
<div class="col-sm-8 col-md-10">
|
|
||||||
@Html.TextBoxFor(m => m.CM.studytime, new { @class = "form-control disp-init float text-center", @style = "width: 100px;", @maxlength = "5", @placeholder = "" })
|
|
||||||
시간
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@if (Model.CM.ismaster == 0)
|
|
||||||
{
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">이수증발행여부</label>
|
|
||||||
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Radio", Model.CM.iscertificate, new ViewDataDictionary() { { "valuetext", "1:발행;0:미발행" }, { "checked", Model.CM.iscertificate }, { "name", "CM.iscertificate" } })</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<div style="display:none">
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">이수증발행여부</label>
|
|
||||||
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Radio", Model.CM.iscertificate, new ViewDataDictionary() { { "valuetext", "1:발행;0:미발행" }, { "checked", Model.CM.iscertificate }, { "name", "CM.iscertificate" } })</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">첨부파일</label>
|
|
||||||
<div class="col-sm-8 col-md-10">
|
|
||||||
@Html.Partial("./Partial/File", Model.FileList.ToList(), new ViewDataDictionary {
|
|
||||||
{ "name", "CM.fgnocm" },{"value", Model.CM.fgnocm },{ "fname", "fgnocm"},
|
|
||||||
{"width", null },{"table", "cm" },{ "column", "fgnocm"},{"filecount", 100 },
|
|
||||||
{"readmode", 0 },{"hidemode", 0 },
|
|
||||||
{ "isimage", 0 }, { "fileext", "" }})
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
||||||
<label class="col-sm-4 col-md-2 control-label">공개여부</label>
|
|
||||||
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:공개;0:비공개" }, { "checked", Model.CM.isuse }, { "name", "CM.isuse" } })</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
<div class="line line-dashed line-lg pull-in"></div>
|
||||||
@Html.HiddenFor(m => m.intval)
|
<div class="form-group">
|
||||||
@Html.HiddenFor(m => m.CM.cmno)
|
<label class="col-sm-4 col-md-2 control-label">교육장소</label>
|
||||||
@Html.HiddenFor(m => m.CM.pcmno)
|
@Html.Partial("./Partial/Radio", Model.ComCodes.Where(w => w.cgroup == "studyplace"), new ViewDataDictionary() { { "checked", Model.CM.studyplace }, { "name", "CM.studyplace" }, { "isreadonly", 1 } })
|
||||||
@Html.HiddenFor(m => m.CM.ismaster)
|
</div>
|
||||||
@Html.HiddenFor(m => m.CM.usernos)
|
<div style="display:none">
|
||||||
@Html.HiddenFor(m => m.CM.bknos)
|
@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:온라인;0:오프라인" }, { "checked", 0 }, { "name", "isonline" } })
|
||||||
@Html.HiddenFor(m => m.CM.cmnospre)
|
</div>
|
||||||
@Html.HiddenFor(m => m.CM.cmnosnext)
|
</div>
|
||||||
@Html.HiddenFor(m => m.CM.ncsnos)
|
</section>
|
||||||
</form>
|
<div class="tar buttonbox"><a href="#" onclick="reg(0);" class="btn btn-s-xs btn-info">회차등록</a></div>
|
||||||
</div>
|
<section class="panel panel-default" style="border-top: 1px solid #ddd; margin-top: 5px;">
|
||||||
<div class="botfixempty"> </div>
|
<header class="panel-heading"><strong><i class="fa fa-bars"></i> 교육회차등록<span class=""></span></strong></header>
|
||||||
<div class="form-group botfix">
|
<div class="table-responsive" id="excel1">
|
||||||
<a href="#" class="btn btn-primary" onclick="save();">저장</a>
|
<table class="table table-striped b-t b-light">
|
||||||
@if (Model.CM.cmno > 0)
|
<thead>
|
||||||
{
|
<tr>
|
||||||
<a href="#" class="btn btn-danger" onclick="del();">삭제</a>
|
<th width="80">회차</th>
|
||||||
}
|
<th>학습방식</th>
|
||||||
<a href="#" class="btn btn-default" onclick="golist();">목록</a>
|
<th>강의주제</th>
|
||||||
</div>
|
<th>강사</th>
|
||||||
|
<th>최근수정일</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="data" id="tbody1">
|
||||||
|
@foreach (var item in Model.CMInnings)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td>@item.iseq @(item.istaste == 1 ? "(S)" : "")</td>
|
||||||
|
<td>@item.isonlinename</td>
|
||||||
|
<td class="link"><a href="#" onclick="reg(@item.cmino)">@item.ititle</a></td>
|
||||||
|
<td>@item.username</td>
|
||||||
|
<td>@item.udtymd</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<div class="tar buttonbox"><a href="#" onclick="regscd(0,0);" class="btn btn-s-xs btn-info">일정등록</a></div>
|
||||||
|
<section class="panel panel-default" style="border-top: 1px solid #ddd; margin-top: 5px;">
|
||||||
|
<header class="panel-heading"><strong><i class="fa fa-bars"></i> 교육일정등록<span class=""></span></strong></header>
|
||||||
|
<div class="table-responsive" id="excel1">
|
||||||
|
<table class="table table-striped b-t b-light">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="80">순서</th>
|
||||||
|
<th>교육일정</th>
|
||||||
|
<th>제한인원</th>
|
||||||
|
<th>등록인원</th>
|
||||||
|
<th>최근수정일</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="data" id="tbody1">
|
||||||
|
@foreach (var item in Model.CMInningscds)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td>@item.scdseq</td>
|
||||||
|
<td class="link"><a href="#" onclick="regscd(@item.cmino, @item.cmisno)">@item.estart ~ @item.eend</a></td>
|
||||||
|
<td>@item.quota</td>
|
||||||
|
<td>@item.regmem</td>
|
||||||
|
<td>@item.udt</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</form>
|
||||||
<form id="dform" method="post" action="/cm/@Model.listviewname">
|
<form id="dform" method="post" action="/cm/@Model.listviewname">
|
||||||
@Html.Partial("./Partial/DForm", Model, new ViewDataDictionary { { "preform", 1 } })
|
@Html.Partial("./Partial/DForm", Model, new ViewDataDictionary { { "preform", 1 } })
|
||||||
</form>
|
</form>
|
||||||
@Html.Partial("./Partial/UserBox", "bindUser;강사/담당자 선택;999_1", new ViewDataDictionary { { "assigns", Model.Assigns }, { "userauths", Model.userauths } })
|
<div id="thisbox" class="findbox draggable regbox" style="width: 800px; z-index: 1041; top: 60px; overflow: auto;">
|
||||||
@Html.Partial("./Partial/BookBox", "bindBook;교재선택 선택")
|
<h4><i class="fa fa-bars"></i> <span id="pcap">회차등록/수정</span><a href="#" class="btn btn-default btn-xs f-r closethisbox">닫기</a></h4>
|
||||||
@Html.Partial("./Partial/CMBox", "bindCM;과정 선택;1")
|
<table class="regtable">
|
||||||
@Html.Partial("./Partial/NCSBox", "bindNCS;NCS 세분류(직무) 선택;3")
|
<colgroup><col style="width:150px;" /><col /></colgroup>
|
||||||
|
<tr>
|
||||||
|
<th class="req">강의주제</th>
|
||||||
|
<td>@Html.TextBox("ititle", "", new { @class = "form-control", @style = "", @maxlength = "100" })</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>교안</th>
|
||||||
|
<td>
|
||||||
|
<input type="hidden" name="fgnotf" id="fgnotf" />
|
||||||
|
<input type="file" name="filetf" id="filetf" />
|
||||||
|
<div id="files"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="req">강사</th>
|
||||||
|
<td>@Html.Partial("./Partial/Select", Model.CMPRs, new ViewDataDictionary { { "special", "reg" }, { "name", "userno" }, { "selected", "" }, { "df", ":-강사선택" }, { "class", "disp-init" } })</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="req">회차(순서)</th>
|
||||||
|
<td>@Html.TextBox("iseq", "", new { @class = "form-control disp-init int nocomma text-center", @style = "width: 80px;", @maxlength = "3" })</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="findboxbtnbox">
|
||||||
|
<a href="#" class="btn btn-primary" onclick="save();">저장</a>
|
||||||
|
<a href="#" class="btn btn-danger" id="btndel" onclick="del();">삭제</a>
|
||||||
|
</div>
|
||||||
|
<br /><br />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="scdbox" class="findbox draggable regbox" style="width: 800px; z-index: 1041; top: 60px; overflow: auto;">
|
||||||
|
<h4><i class="fa fa-bars"></i> <span id="pcapscd">일정등록/수정</span><a href="#" class="btn btn-default btn-xs f-r closethisbox">닫기</a></h4>
|
||||||
|
<table class="regtable">
|
||||||
|
<colgroup><col style="width:150px;" /><col /></colgroup>
|
||||||
|
<tr>
|
||||||
|
<th class="req">교육일정</th>
|
||||||
|
<td>
|
||||||
|
@Html.Partial("./Partial/Date", (DateTime?)null, new ViewDataDictionary { { "name", "idate" } })
|
||||||
|
@Html.Partial("./Partial/Select", "", new ViewDataDictionary { { "special", "fromto" }, { "name", "isth" }, { "start", 0 }, { "end", 23 }, { "textadd", "시" }, { "df", ":-시" }, { "class", "disp-init" }, { "style", "width: 80px;" } })
|
||||||
|
@Html.Partial("./Partial/Select", "", new ViewDataDictionary { { "special", "fromto" }, { "name", "istm" }, { "start", 0 }, { "end", 59 }, { "textadd", "분" }, { "df", ":-분" }, { "class", "disp-init" }, { "style", "width: 80px;" } })
|
||||||
|
~
|
||||||
|
@Html.Partial("./Partial/Select", "", new ViewDataDictionary { { "special", "fromto" }, { "name", "ieth" }, { "start", 0 }, { "end", 23 }, { "textadd", "시" }, { "df", ":-시" }, { "class", "disp-init" }, { "style", "width: 80px;" } })
|
||||||
|
@Html.Partial("./Partial/Select", "", new ViewDataDictionary { { "special", "fromto" }, { "name", "ietm" }, { "start", 0 }, { "end", 59 }, { "textadd", "분" }, { "df", ":-분" }, { "class", "disp-init" }, { "style", "width: 80px;" } })
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="req">제한인원</th>
|
||||||
|
<td>@Html.TextBox("iquota", "", new { @class = "form-control disp-init int nocomma text-center", @style = "width: 80px;", @maxlength = "3" })</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="findboxbtnbox">
|
||||||
|
<a href="#" class="btn btn-primary" onclick="savescd();">저장</a>
|
||||||
|
<a href="#" class="btn btn-danger" id="btndelscd" onclick="delscd();">삭제</a>
|
||||||
|
</div>
|
||||||
|
<br /><br />
|
||||||
|
</div>
|
||||||
@section styles{
|
@section styles{
|
||||||
@Html.Partial("./Partial/Summernotestyle")
|
|
||||||
}
|
}
|
||||||
@section scriptsHeader{
|
@section scriptsHeader{
|
||||||
@Html.Partial("./Partial/ScriptDate")
|
@Html.Partial("./Partial/ScriptDate")
|
||||||
@Html.Partial("./Partial/Summernote")
|
|
||||||
@Html.Partial("./Partial/FileScript")
|
|
||||||
}
|
}
|
||||||
@section scripts{
|
@section scripts{
|
||||||
<script>
|
<script>
|
||||||
var cmboxtmno = 0;
|
$(document).ready(function () {
|
||||||
var cmpre = 0;
|
|
||||||
var cmboxnotcmno = @Model.CM.cmno;
|
});
|
||||||
function del() {
|
var _cmino = 0;
|
||||||
if (confirm("삭제하시겠습니까?")) {
|
var _cmisno = 0;
|
||||||
capp("/acommon/cmdel", { cmno: @Model.CM.cmno}, "cbdel");
|
|
||||||
|
function save() {
|
||||||
|
setrv("isonline", 0); //교육일정에서는 오프라인 교육만 추가 가능
|
||||||
|
if (check("ititle", null, "강의주제를 입력해주세요.", true)) { }
|
||||||
|
else if (check("userno", null, "강사를 선택해주세요.", true)) { }
|
||||||
|
else if (getint(val("iseq")) < 1) { focus("iseq"); msg2("회차를 입력해주세요."); }
|
||||||
|
else if (confirm("저장하시겠습니까?")) {
|
||||||
|
var data = new FormData();
|
||||||
|
data.append("cmino", _cmino);
|
||||||
|
data.append("cmno", @Model.CM.cmno);
|
||||||
|
data.append("isonline", getrv("isonline"));
|
||||||
|
data.append("ititle", getv("ititle"));
|
||||||
|
data.append("idate", null);
|
||||||
|
data.append("iday", null);
|
||||||
|
data.append("ist", null);
|
||||||
|
data.append("iet", null);
|
||||||
|
|
||||||
|
data.append("istaste", 0);
|
||||||
|
data.append("sttime", 0);
|
||||||
|
data.append("atime", 0);
|
||||||
|
data.append("mstime", 0);
|
||||||
|
data.append("metime", 0);
|
||||||
|
data.append("fgnotf", val("fgnotf"));
|
||||||
|
if ($("#filetf")[0].files.length > 0) {
|
||||||
|
data.append("filetf", $("#filetf")[0].files[0]);
|
||||||
|
}
|
||||||
|
data.append("userno", val("userno"));
|
||||||
|
data.append("iseq", val("iseq"));
|
||||||
|
capfile("/acommon/cminningsave", data, "cbcminningsave", null, null, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function cbcminningsave() {
|
||||||
|
if (capResult.code == 1000 && capResult.obj > 0) {
|
||||||
|
msg2("저장되었습니다.", 0, null, "gotab(2);");
|
||||||
|
} else {
|
||||||
|
msg2("이미 등록된 회차입니다. 다른 회차를 입력해주세요.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function savescd() {
|
||||||
|
if (@Model.CM.ismaster == 0 && check("idate", null, "학습일자를 입력해주세요.", true)) { }
|
||||||
|
else if (val("isth") == "") { focus("isth"); msg2("학습시간을 확인해주세요."); }
|
||||||
|
else if (val("istm") == "") { focus("istm"); msg2("학습시간을 확인해주세요."); }
|
||||||
|
else if (val("ieth") == "") { focus("ieth"); msg2("학습시간을 확인해주세요."); }
|
||||||
|
else if (val("ietm") == "") { focus("ietm"); msg2("학습시간을 확인해주세요."); }
|
||||||
|
else if (getint(val("isth")) > getint(val("ieth"))) { focus("ieth"); msg2("학습시간을 확인해주세요(종료시간이 더 빠름)"); }
|
||||||
|
else if (getint(val("isth")) == getint(val("ieth")) && getint(val("istm")) > getint(val("ietm"))) { focus("ieth"); msg2("학습시간을 확인해주세요(종료시간이 더 빠름)"); }
|
||||||
|
else if (confirm("저장하시겠습니까?")) {
|
||||||
|
var date = getv("idate");
|
||||||
|
var isth = getv("isth");
|
||||||
|
var istm = getv("istm");
|
||||||
|
var ieth = getv("ieth");
|
||||||
|
var ietm = getv("ietm");
|
||||||
|
var estart = (date + " " + fillzero(isth, true, 2) + ":" + fillzero(istm, true, 2) + ":00").toString();
|
||||||
|
var eend = (date + " " + fillzero(ieth, true, 2) + ":" + fillzero(ietm, true, 2) + ":00").toString();
|
||||||
|
capp("/acommon/cminningscdsave", {
|
||||||
|
cmisno: _cmisno,
|
||||||
|
cmino: @Model.CMInnings[0].cmino,
|
||||||
|
estart2: estart,
|
||||||
|
eend2: eend,
|
||||||
|
quota: getv("iquota")
|
||||||
|
}, "cbcminningscdsave", null, null, null, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function cbcminningscdsave() {
|
||||||
|
if (capResult.code == 1000 && capResult.obj > 0) {
|
||||||
|
msg2("저장되었습니다.", 0, null, "gotab(2);");
|
||||||
|
} else {
|
||||||
|
msg2("저장실패.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function reg(no) {
|
||||||
|
var inningcnt = @Model.CMInnings.Count;
|
||||||
|
if (no == 0 && inningcnt > 0) {
|
||||||
|
msg2("회차는 1개만 등록 가능합니다.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_cmino = no;
|
||||||
|
$("#btndel").hide();
|
||||||
|
setrv("isonline", 0);
|
||||||
|
if ($("#files").html() == "") {
|
||||||
|
$("#filetf").show();
|
||||||
|
}
|
||||||
|
$("#ititle,#userno,#iseq,#fgnotf,#filetf").val("");
|
||||||
|
$("#files").html("");
|
||||||
|
$("#pcap").text("회차등록");
|
||||||
|
if (no < 1) {
|
||||||
|
bglayer(); $("#thisbox").slideDown("fast", function () { $("#thisbox").scrollTop(0); });
|
||||||
|
} else {
|
||||||
|
$("#pcap").text("회차수정");
|
||||||
|
capp("/acommon/cminningget", { cmino: no }, "cbcminningget", null, null, null, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function regscd(no,sno) {
|
||||||
|
var inningcnt = @Model.CMInnings.Count;
|
||||||
|
if (no == 0 && inningcnt == 0) {
|
||||||
|
msg2("회차가 등록되어있어야 교육일정 등록이 가능합니다.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_cmino = no;
|
||||||
|
_cmisno = sno;
|
||||||
|
$("#btndelscd").hide();
|
||||||
|
|
||||||
|
$("#idate,#isth,#istm,#ieth,#ietm,#iquota").val("");
|
||||||
|
$("#pcapscd").text("일정등록");
|
||||||
|
if (no < 1) {
|
||||||
|
bglayer(); $("#scdbox").slideDown("fast", function () { $("#scdbox").scrollTop(0); });
|
||||||
|
} else {
|
||||||
|
$("#pcapscd").text("일정수정");
|
||||||
|
capp("/acommon/CMInningScdGet", { cmino: no, cmisno: sno }, "cbcminningscdget", null, null, null, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function cbcminningget() {
|
||||||
|
if (capResult.code == 1000) {
|
||||||
|
var d = capResult.obj;
|
||||||
|
$("#btndel").show();
|
||||||
|
setrv("isonline", d.isonline);
|
||||||
|
setv("ititle", d.ititle);
|
||||||
|
setv("userno", d.userno);
|
||||||
|
setv("iseq", d.iseq);
|
||||||
|
setv("fgnotf", getdb(d.fgnotf));
|
||||||
|
$("#filetf").show();
|
||||||
|
if (getdb(d.orgname2) != "") {
|
||||||
|
$("#filetf").hide();
|
||||||
|
$("#files").append("<a href=\"/aCommon/DownFile?fno=" + d.fileno2 + "\" title=\"다운로드\"><i class=\"fa fa-paperclip\"></i> <span class=\"fileitem\">" + d.orgname2 + "</span></a>" +
|
||||||
|
" <a href=\"#\" class=\"btn_txt btn btn-xxs btn-danger\" onclick=\"javascript:delfiletf(" + d.fileno2 + ", this, '" + d.cmino + "|9', true, 'cbfgnotfdel()');\" title=\"삭제\">삭제</a>");
|
||||||
|
}
|
||||||
|
bglayer(); $("#thisbox").slideDown("fast", function () { $("#thisbox").scrollTop(0); });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function cbcminningscdget() {
|
||||||
|
if (capResult.code == 1000) {
|
||||||
|
var d = capResult.obj;
|
||||||
|
$("#btndelscd").show();
|
||||||
|
var dStart = d.estart2;
|
||||||
|
var dEnd = d.eend2;
|
||||||
|
|
||||||
|
var date = dStart.substr(0, 10);
|
||||||
|
var startSplit = dStart.split(' ');
|
||||||
|
var endSplit = dEnd.split(' ');
|
||||||
|
var start;
|
||||||
|
var end;
|
||||||
|
if (startSplit.length > 0) {
|
||||||
|
start = startSplit[1];
|
||||||
|
}
|
||||||
|
if (endSplit.length > 0) {
|
||||||
|
end = endSplit[1];
|
||||||
|
}
|
||||||
|
var startMinute = start.split(':')[0];
|
||||||
|
var startSec = start.split(':')[1];
|
||||||
|
var endMinute = end.split(':')[0];
|
||||||
|
var endSec = end.split(':')[1];
|
||||||
|
|
||||||
|
setv("idate", date);
|
||||||
|
setv("isth", getint(startMinute));
|
||||||
|
setv("istm", getint(startSec));
|
||||||
|
setv("ieth", getint(endMinute));
|
||||||
|
setv("ietm", getint(endSec));
|
||||||
|
setv("iquota", getint(d.quota));
|
||||||
|
}
|
||||||
|
bglayer(); $("#scdbox").slideDown("fast", function () { $("#scdbox").scrollTop(0); });
|
||||||
|
}
|
||||||
|
|
||||||
|
function delfiletf(id, a, log, isjs2, cb) {
|
||||||
|
log = log || "";
|
||||||
|
if (confirm('삭제 하시겠습니까?')) {
|
||||||
|
capp('/aCommon/DeleteFile', { key: id, log: log }, cb || "cbdelfilenew", null, null, null, isjs2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function cbfgnotfdel() {
|
||||||
|
if (capResult.code == 1000) {
|
||||||
|
$("#files").html("");
|
||||||
|
$("#filetf").show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function gotab(idx, t) {
|
||||||
|
bglayer();
|
||||||
|
t = t || 0;
|
||||||
|
setTimeout(function () {
|
||||||
|
if (idx == 0) { $("#dform").attr("action", "/cm/@Model.viewname").submit(); }
|
||||||
|
else if (idx == 1) { $("#dform").attr("action", "/cm/@(Model.viewname)inning").submit(); }
|
||||||
|
else if (idx == 2) { $("#dform").attr("action", "/cm/@(Model.viewname)eduschedule").submit(); }
|
||||||
|
else if (idx == 3) { $("#dform").attr("action", "/cm/@(Model.viewname)est").submit(); }
|
||||||
|
else if (idx == 4) { $("#dform").attr("action", "/cm/@(Model.viewname)menu").submit(); }
|
||||||
|
}, t);
|
||||||
|
}
|
||||||
|
|
||||||
|
function del() {
|
||||||
|
if (confirm("삭제하시겠습니까?")) {
|
||||||
|
capp("/acommon/CMInningByScdDel", { im: @(Model.CM.ismaster), cmino: _cmino}, "cbdel");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function delscd() {
|
||||||
|
if (confirm("삭제하시겠습니까?")) {
|
||||||
|
capp("/acommon/CMInningScdDel", { im: @(Model.CM.ismaster), cmisno: _cmisno}, "cbscddel");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function cbdel() {
|
||||||
|
if (capResult.code == 1000) {
|
||||||
|
msg("삭제했습니다.", null, true, null, true);
|
||||||
|
gotab(2, 500);
|
||||||
|
} else {
|
||||||
|
msg("교육일정 정보가 있습니다. 삭제할 수 없습니다.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function cbscddel() {
|
||||||
|
if (capResult.code == 1000) {
|
||||||
|
msg("삭제했습니다.", null, true, null, true);
|
||||||
|
gotab(2, 500);
|
||||||
|
} else {
|
||||||
|
msg("등록인원이 있습니다. 삭제할 수 없습니다.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function cbauth() {
|
||||||
|
if (capResult.code == 1000) {
|
||||||
|
var nWidth = "1080";
|
||||||
|
var nHeight = screen.availHeight;
|
||||||
|
var popOption = "";
|
||||||
|
popOption += "width=" + nWidth + "px,";
|
||||||
|
popOption += "height=" + nHeight + "px,";
|
||||||
|
popOption += "toolbar=no,menubar=no,location=yes,";
|
||||||
|
popOption += "resizable=yes,status=yes,scrollbars=yes";
|
||||||
|
var pop = window.open("@ViewBag.fronturl.Replace("https://", "http://")/CDMS/PlayTaste?authtype=" + _dtype +"&authkey=" + capResult.obj + "&ctno=" + _ctno + "&ismobile=0", 'contentsview', popOption);
|
||||||
|
if (pop == null) {
|
||||||
|
msg("팝업이 차단되어 있습니다. 차단을 해제해 주세요.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function cbdel() {
|
}
|
||||||
if (capResult.code == 1000) {
|
</script>
|
||||||
msgok(0, "", true);
|
|
||||||
golist(400, true);
|
|
||||||
} else {
|
|
||||||
if ('@Model.CM.ismaster' == '0') {
|
|
||||||
msg("수강신청정보가 있거나 패키지연동된 강좌가 있습니다. 삭제할 수 없습니다.");
|
|
||||||
} else {
|
|
||||||
msg("연결된 과정/강좌/콘텐츠가 있습니다. 삭제할 수 없습니다.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function bindUser(ui) {
|
|
||||||
$.each($(ui.split(';')), function (i, d) {
|
|
||||||
if ($("#cmprdatabox li.no" + d.split(':')[0]).length < 1) {
|
|
||||||
$("#cmprdatabox").append("<li class=\"no" + d.split(':')[0] + "\" data-no=\"" + d.split(':')[0] + "\">[" + (d.split(':')[1] == 11 ? "강사" : "운영자") + "]" + d.split(':')[2] + "<a href=\"#\" class=\"adel\" onclick=\"ullidel(this)\">x</a></li>")
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function bindBook(ui) {
|
|
||||||
$.each($(ui.split(';')), function (i, d) {
|
|
||||||
if ($("#bookdatabox li.no" + d.split(':')[0]).length < 1) {
|
|
||||||
$("#bookdatabox").append("<li class=\"no" + d.split(':')[0] + "\" data-no=\"" + d.split(':')[0] + "\">" + d.split(':')[1] + "<a href=\"#\" class=\"adel\" onclick=\"ullidel(this)\">x</a></li>")
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function bindCM(ui) {
|
|
||||||
$.each($(ui.split(';')), function (i, d) {
|
|
||||||
if ($("#cm" + (cmpre == 1 ? "predata" : "nextdata")+"box li.no" + d.split(':')[0]).length < 1) {
|
|
||||||
$("#cm" + (cmpre == 1 ? "predata" : "nextdata")+"box").append("<li class=\"no" + d.split(':')[0] + "\" data-no=\"" + d.split(':')[0] + "\">" + d.split(':')[1] + "<a href=\"#\" class=\"adel\" onclick=\"ullidel(this)\">x</a></li>")
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function bindNCS(ui) {
|
|
||||||
$.each($(ui.split(';')), function (i, d) {
|
|
||||||
if ($("#ncsdatabox li.no" + d.split(':')[0]).length < 1) {
|
|
||||||
$("#ncsdatabox").append("<li class=\"no" + d.split(':')[0] + "\" data-no=\"" + d.split(':')[0] + "\">" + d.split(':')[1] + "("+d.split(':')[2]+")<a href=\"#\" class=\"adel\" onclick=\"ullidel(this)\">x</a></li>")
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
$(document).ready(function () {
|
|
||||||
userboxftype = 1;
|
|
||||||
$('#CM_introhtml,#CM_targethtml,#CM_goalhtml,#CM_contenthtml').summernote({
|
|
||||||
height: 100,
|
|
||||||
tabsize: 2,
|
|
||||||
callbacks: {
|
|
||||||
onImageUpload: function (files, editor, welEditable) {
|
|
||||||
var fdata = new FormData();
|
|
||||||
fdata.append('img', files[0]);
|
|
||||||
fdata.append('fd', "Editor");
|
|
||||||
uploadeditorimage(files, this, fdata, "cbeditorupload()");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$("#pcgno").on("change", function () {
|
|
||||||
$("#CM_cgno option:gt(0)").remove();
|
|
||||||
if ($(this).val() != "") {
|
|
||||||
capp("/acommon/cgget", { pcgno: $(this).val() }, "cbcgget");
|
|
||||||
}
|
|
||||||
loadlegal();
|
|
||||||
});
|
|
||||||
if ('@Model.CM.isrefund' == '0') {
|
|
||||||
$(".ncsconbox").hide();
|
|
||||||
}
|
|
||||||
$("input[name='CM.isrefund']").on("change", function () {
|
|
||||||
$(".ncsconbox").show();
|
|
||||||
if ($(this).val() == "0") {
|
|
||||||
$(".ncsconbox").hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if ('@(Model.CM.ismaster)' == '0') {
|
|
||||||
$("#pcgno,#CM_cgno").hide();
|
|
||||||
}
|
|
||||||
loadlegal();
|
|
||||||
});
|
|
||||||
function loadlegal() {
|
|
||||||
if ($("#pcgno option:checked").text() == "법정교육") {
|
|
||||||
$("#divLegalEdu").show();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$("#divLegalEdu").hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function cbcgget() {
|
|
||||||
binddatacheck("CM_cgno");
|
|
||||||
if ($("#pcgno").val() == "@(Model.CGs.Where(w=>w.cgcode==ViewBag.OffCode).Select(w=>w.cgno).FirstOrDefault())") {
|
|
||||||
$("#keyword").attr("style", "");
|
|
||||||
} else {
|
|
||||||
$("#keyword").attr("style", "display:none;");
|
|
||||||
$("#keyword").find("input").val("");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var viewidxname = '@(Model.viewidxname)';
|
|
||||||
function save() {
|
|
||||||
setv("CM_usernos", getliv("cmprdatabox"));
|
|
||||||
setv("CM_bknos", getliv("bookdatabox"));
|
|
||||||
setv("CM_cmnospre", getliv("cmpredatabox"));
|
|
||||||
setv("CM_cmnosnext", getliv("cmnextdatabox"));
|
|
||||||
setv("CM_ncsnos", getliv("ncsdatabox"));
|
|
||||||
if (check("CM_cgno", null, "과정분류를 선택해주세요.")) { }
|
|
||||||
else if (check("CM_cname", null, viewidxname + "명을 입력해주세요.")) { }
|
|
||||||
else if (@Model.CM.ismaster == 0 && check("CM_rstime", null, "신청기간을 입력해주세요.")) { }
|
|
||||||
else if (@Model.CM.ismaster == 0 && check("CM_retime", null, "신청기간을 입력해주세요.")) { }
|
|
||||||
else if (@Model.CM.ismaster == 0 && check("CM_sstime", null, "학습기간을 입력해주세요.")) { }
|
|
||||||
else if (@Model.CM.ismaster == 0 && check("CM_setime", null, "학습기간을 입력해주세요.")) { }
|
|
||||||
else if (@Model.CM.ismaster == 0 && check("CM_gstime", null, "성적처리기간을 입력해주세요.")) { }
|
|
||||||
else if (@Model.CM.ismaster == 0 && check("CM_getime", null, "성적처리기간을 입력해주세요.")) { }
|
|
||||||
else if (@Model.CM.ismaster == 0 && getDouble($("#CM_studytime").val()) < 1) { $("#CM_studytime").focus(); msg("학습시간은 1 ~ 999 사이의 값을 입력해주세요."); }
|
|
||||||
else if ($("#cmprdatabox li").length < 1) { $("#cmprdatabox").parent().find("a.data-find").focus(); msg("담당자를 선택해주세요."); }
|
|
||||||
//else if ('@Model.CM.pcgcode' == '@ViewBag.TestCode' && '@(Model.CM.cgcode)' != '@ViewBag.TestCode3' && val("CM_certcc") == "") { focus("CM_certcc"); msg("자격증을 선택해주세요.");}
|
|
||||||
else if (val("CM_certcc") != "" && val("CM_certgradecc") == "") { focus("CM_certgradecc"); msg("급수를 선택해주세요."); }
|
|
||||||
else if (getint(val("CM_quota")) > 999999) {
|
|
||||||
focus("CM_quota"); msg("정원 최대 입력값은 [ 999,999 ]입니다.");
|
|
||||||
} else if (confirm("저장하시겠습니까?")) {
|
|
||||||
capfileform("/acommon/cmsave", "mform", "cbsave");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function cbsave() {
|
|
||||||
if (capResult.code == 1000) {
|
|
||||||
msgok(1,"", true);
|
|
||||||
setv("dform_intval", capResult.obj);
|
|
||||||
gotab(0, 500);
|
|
||||||
} else { msgdev(); }
|
|
||||||
}
|
|
||||||
function gotab(idx, t) {
|
|
||||||
bglayer();
|
|
||||||
t = t || 0;
|
|
||||||
setTimeout(function () {
|
|
||||||
//기본정보
|
|
||||||
if (idx == 0) {
|
|
||||||
$("#dform").attr("action", "/cm/@Model.viewname").submit();
|
|
||||||
}
|
|
||||||
//회차설정
|
|
||||||
else if (idx == 1) {
|
|
||||||
$("#dform").attr("action", "/cm/@(Model.viewname)inning").submit();
|
|
||||||
}
|
|
||||||
//교육일정
|
|
||||||
else if (idx == 2) {
|
|
||||||
$("#dform").attr("action", "/cm/@(Model.viewname)est").submit();
|
|
||||||
}
|
|
||||||
//평가설정
|
|
||||||
else if (idx == 3) {
|
|
||||||
$("#dform").attr("action", "/cm/@(Model.viewname)est").submit();
|
|
||||||
}
|
|
||||||
//메뉴설정
|
|
||||||
else if (idx == 4) {
|
|
||||||
$("#dform").attr("action", "/cm/@(Model.viewname)menu").submit();
|
|
||||||
} else {
|
|
||||||
$("#content").find("section.vbox section.padder div.con-body div ul.pagination li.active").attr("class", "");
|
|
||||||
$("#tab1").attr("class", "active");
|
|
||||||
msg("과정을 저장한 후 이용해주시기 바랍니다.");
|
|
||||||
}
|
|
||||||
}, t);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<ul class="pagination pagination-md" style="margin: 0;">
|
<ul class="pagination pagination-md" style="margin: 0;">
|
||||||
<li class=""><a href="#" onclick="gotab(0);" data-toggle="tab">기본정보</a></li>
|
<li class=""><a href="#" onclick="gotab(0);" data-toggle="tab">기본정보</a></li>
|
||||||
<li class=""><a href="#" onclick="gotab(1);" data-toggle="tab">회차설정</a></li>
|
<li class=""><a href="#" onclick="gotab(1);" data-toggle="tab">회차설정</a></li>
|
||||||
@if (Model.CM.ismaster == 0)
|
@if (Model.CM.ismaster == 0 && Model.CM.cshape == 2)
|
||||||
{
|
{
|
||||||
<li class=""><a href="#" onclick="gotab(2);" data-toggle="tab">교육일정</a></li>
|
<li class=""><a href="#" onclick="gotab(2);" data-toggle="tab">교육일정</a></li>
|
||||||
}
|
}
|
||||||
|
|
@ -201,11 +201,11 @@
|
||||||
function cbsave() {
|
function cbsave() {
|
||||||
if (capResult.code == 1000) {
|
if (capResult.code == 1000) {
|
||||||
msg("평가기준/비율을 저장했습니다.", null, true, null, true);
|
msg("평가기준/비율을 저장했습니다.", null, true, null, true);
|
||||||
gotab(2, 500);
|
gotab(3, 500);
|
||||||
} else { msgadmin(); }
|
} else { msgadmin(); }
|
||||||
}
|
}
|
||||||
function pagerefresh() {
|
function pagerefresh() {
|
||||||
gotab(2, 500);
|
gotab(3, 500);
|
||||||
}
|
}
|
||||||
function add(idx, no) {
|
function add(idx, no) {
|
||||||
if (idx == 0) {
|
if (idx == 0) {
|
||||||
|
|
@ -226,7 +226,7 @@
|
||||||
function cbdel() {
|
function cbdel() {
|
||||||
if (capResult.code == 1000) {
|
if (capResult.code == 1000) {
|
||||||
msg("삭제했습니다.", null, true, null, true);
|
msg("삭제했습니다.", null, true, null, true);
|
||||||
gotab(2, 500);
|
gotab(3, 500);
|
||||||
} else {
|
} else {
|
||||||
msg("수강데이터가 생성되어 삭제할 수 없습니다.");
|
msg("수강데이터가 생성되어 삭제할 수 없습니다.");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<ul class="pagination pagination-md" style="margin: 0;">
|
<ul class="pagination pagination-md" style="margin: 0;">
|
||||||
<li class=""><a href="#" onclick="gotab(0);" data-toggle="tab">기본정보</a></li>
|
<li class=""><a href="#" onclick="gotab(0);" data-toggle="tab">기본정보</a></li>
|
||||||
<li class="active"><a href="#" data-toggle="tab">회차설정</a></li>
|
<li class="active"><a href="#" data-toggle="tab">회차설정</a></li>
|
||||||
@if (Model.CM.ismaster == 0)
|
@if (Model.CM.ismaster == 0 && Model.CM.cshape == 2)
|
||||||
{
|
{
|
||||||
<li class=""><a href="#" onclick="gotab(2);" data-toggle="tab">교육일정</a></li>
|
<li class=""><a href="#" onclick="gotab(2);" data-toggle="tab">교육일정</a></li>
|
||||||
}
|
}
|
||||||
|
|
@ -64,7 +64,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>@item.iseq @(item.istaste == 1 ? "(S)" : "")</td>
|
<td>@item.iseq @(item.istaste == 1 ? "(S)" : "")</td>
|
||||||
<td>@item.isonlinename</td>
|
<td>@item.isonlinename</td>
|
||||||
<td class="link"><a href="#" onclick="reg(@item.cmino,@item.cshape )">@item.ititle</a></td>
|
<td class="link"><a href="#" onclick="reg(@item.cmino,@item.cshape)">@item.ititle</a></td>
|
||||||
<td>@item.username</td>
|
<td>@item.username</td>
|
||||||
<td>@item.udtymd</td>
|
<td>@item.udtymd</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -159,6 +159,7 @@
|
||||||
</div>
|
</div>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@Html.Partial("./Partial/ContentBox", "bindContent;콘텐츠 선택;1;" + (Model.CM.pcmno ?? Model.CM.cmno) + ";thisbox", new ViewDataDictionary { { "cms", Model.CMs } })
|
@Html.Partial("./Partial/ContentBox", "bindContent;콘텐츠 선택;1;" + (Model.CM.pcmno ?? Model.CM.cmno) + ";thisbox", new ViewDataDictionary { { "cms", Model.CMs } })
|
||||||
@section styles{
|
@section styles{
|
||||||
|
|
||||||
|
|
@ -167,10 +168,11 @@
|
||||||
@Html.Partial("./Partial/ScriptDate")
|
@Html.Partial("./Partial/ScriptDate")
|
||||||
}
|
}
|
||||||
@section scripts{
|
@section scripts{
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
$("input[name='isonline']").on("change", function () {
|
$("input[name='isonline']").on("change", function () {
|
||||||
|
|
||||||
$(".troffline,.tronline").hide();
|
$(".troffline,.tronline").hide();
|
||||||
if ($(this).val() == "1") {
|
if ($(this).val() == "1") {
|
||||||
$(".tronline").show();
|
$(".tronline").show();
|
||||||
|
|
@ -226,7 +228,7 @@
|
||||||
capp("/acommon/cminningsave", { cmino: _cmino, cmno: @Model.CM.cmno, isonline: getrv("isonline"), ititle: getv("ititle"), ctno: $("#contentdatabox li").attr("data-no"), istaste: getrv("istaste"), sttime: getint(val("sttime")), atime: getint(val("atime")), mstime: getint(val("mstime")), metime: getint(val("metime")), userno: val("userno"), iseq: val("iseq") }, "cbcminningsave", null, null,null,true);
|
capp("/acommon/cminningsave", { cmino: _cmino, cmno: @Model.CM.cmno, isonline: getrv("isonline"), ititle: getv("ititle"), ctno: $("#contentdatabox li").attr("data-no"), istaste: getrv("istaste"), sttime: getint(val("sttime")), atime: getint(val("atime")), mstime: getint(val("mstime")), metime: getint(val("metime")), userno: val("userno"), iseq: val("iseq") }, "cbcminningsave", null, null,null,true);
|
||||||
} else {
|
} else {
|
||||||
if (@Model.CM.cshape == 2) {
|
if (@Model.CM.cshape == 2) {
|
||||||
alert("혼합(온라인 + 오프라인)교육시 오프라인 회차는 등록 할 수 없습니다.");
|
msg2("혼합(온라인 + 오프라인)교육시 오프라인 회차는 등록 할 수 없습니다.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var data = new FormData();
|
var data = new FormData();
|
||||||
|
|
@ -249,6 +251,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function cbcminningsave() {
|
function cbcminningsave() {
|
||||||
if (capResult.code == 1000 && capResult.obj > 0) {
|
if (capResult.code == 1000 && capResult.obj > 0) {
|
||||||
msg2("저장되었습니다.", 0, null, "gotab(1);");
|
msg2("저장되었습니다.", 0, null, "gotab(1);");
|
||||||
|
|
@ -256,7 +259,7 @@
|
||||||
msg2("이미 등록된 회차입니다. 다른 회차를 입력해주세요.");
|
msg2("이미 등록된 회차입니다. 다른 회차를 입력해주세요.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function reg(no,cshape) {
|
function reg(no, cshape) {
|
||||||
_cmino = no;
|
_cmino = no;
|
||||||
$("#btndel,#btnpreview").hide();
|
$("#btndel,#btnpreview").hide();
|
||||||
$(".troffline,.tronline").hide();
|
$(".troffline,.tronline").hide();
|
||||||
|
|
@ -427,5 +430,5 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<ul class="pagination pagination-md" style="margin: 0;">
|
<ul class="pagination pagination-md" style="margin: 0;">
|
||||||
<li class=""><a href="#" onclick="gotab(0);" data-toggle="tab">기본정보</a></li>
|
<li class=""><a href="#" onclick="gotab(0);" data-toggle="tab">기본정보</a></li>
|
||||||
<li class=""><a href="#" onclick="gotab(1);" data-toggle="tab">회차설정</a></li>
|
<li class=""><a href="#" onclick="gotab(1);" data-toggle="tab">회차설정</a></li>
|
||||||
@if (Model.CM.ismaster == 0)
|
@if (Model.CM.ismaster == 0 && Model.CM.cshape == 2)
|
||||||
{
|
{
|
||||||
<li class=""><a href="#" onclick="gotab(2);" data-toggle="tab">교육일정</a></li>
|
<li class=""><a href="#" onclick="gotab(2);" data-toggle="tab">교육일정</a></li>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -242,6 +242,16 @@ namespace NP.Base.Controllers
|
||||||
return JsonOK(Dao.Save("cm.cminning.del" + (im==1?"2":""), cmino));
|
return JsonOK(Dao.Save("cm.cminning.del" + (im==1?"2":""), cmino));
|
||||||
}
|
}
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
public JsonResult CMInningByScdDel(int im, Int64 cmino)
|
||||||
|
{
|
||||||
|
return JsonOK(Dao.Save("cm.cminning.del3" + (im == 1 ? "2" : ""), cmino));
|
||||||
|
}
|
||||||
|
[HttpPost]
|
||||||
|
public JsonResult CMInningScdDel(int im, Int64 cmisno)
|
||||||
|
{
|
||||||
|
return JsonOK(Dao.Save("cm.cminningscd.del" + (im == 1 ? "2" : ""), cmisno));
|
||||||
|
}
|
||||||
|
[HttpPost]
|
||||||
public JsonResult CMSeqSave(int cmno, int isseq)
|
public JsonResult CMSeqSave(int cmno, int isseq)
|
||||||
{
|
{
|
||||||
return JsonOK(Dao.Save("cm.cmseqsave", new Hashtable() { { "cmno", cmno },{ "isseq", isseq }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }));
|
return JsonOK(Dao.Save("cm.cmseqsave", new Hashtable() { { "cmno", cmno },{ "isseq", isseq }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }));
|
||||||
|
|
@ -252,6 +262,14 @@ namespace NP.Base.Controllers
|
||||||
return JsonBack(Dao.Get<CMInning>("cm.cminnings", new Hashtable() { { "cmino", cmino } }).First());
|
return JsonBack(Dao.Get<CMInning>("cm.cminnings", new Hashtable() { { "cmino", cmino } }).First());
|
||||||
}
|
}
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
public JsonResult CMInningScdGet(Int64 cmino ,Int64 cmisno)
|
||||||
|
{
|
||||||
|
var data = Dao.Get<CMinningscd>("cm.cminningscds", new Hashtable() { { "cmino", cmino }, { "cmisno", cmisno } }).First();
|
||||||
|
data.estart2 = data.estart.ToString("yyyy-MM-dd HH:mm");
|
||||||
|
data.eend2 = data.eend.ToString("yyyy-MM-dd HH:mm");
|
||||||
|
return JsonBack(data);
|
||||||
|
}
|
||||||
|
[HttpPost]
|
||||||
public JsonResult CMInningSave(CMInning cmi)
|
public JsonResult CMInningSave(CMInning cmi)
|
||||||
{
|
{
|
||||||
cmi.uno = SUserInfo.UserNo; cmi.uip = GetUserIP();
|
cmi.uno = SUserInfo.UserNo; cmi.uip = GetUserIP();
|
||||||
|
|
@ -275,6 +293,27 @@ namespace NP.Base.Controllers
|
||||||
}
|
}
|
||||||
return JsonOK(rtn, true);
|
return JsonOK(rtn, true);
|
||||||
}
|
}
|
||||||
|
[HttpPost]
|
||||||
|
public JsonResult CMInningScdSave(CMinningscd cmis)
|
||||||
|
{
|
||||||
|
if(!string.IsNullOrEmpty(cmis.estart2))
|
||||||
|
cmis.estart = Convert.ToDateTime(cmis.estart2);
|
||||||
|
if (!string.IsNullOrEmpty(cmis.eend2))
|
||||||
|
cmis.eend = Convert.ToDateTime(cmis.eend2);
|
||||||
|
cmis.uno = SUserInfo.UserNo;
|
||||||
|
cmis.uip = GetUserIP();
|
||||||
|
int rtn = 0;
|
||||||
|
if (cmis.cmisno < 1)
|
||||||
|
{
|
||||||
|
Dao.Insert("cm.cminningscd.in", cmis);
|
||||||
|
rtn = cmis.cmisno > 0 ? 1 : 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rtn = Dao.Save("cm.cminningscd." + (cmis.cmisno > 0 ? "up" : "in"), cmis);
|
||||||
|
}
|
||||||
|
return JsonOK(rtn, true);
|
||||||
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public JsonResult ContentFind(int? cmno, String ctname, int pno)
|
public JsonResult ContentFind(int? cmno, String ctname, int pno)
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
<typeAlias alias="cg" type="NP.Model.CG, NP.Model" />
|
<typeAlias alias="cg" type="NP.Model.CG, NP.Model" />
|
||||||
<typeAlias alias="cm" type="NP.Model.CM, NP.Model" />
|
<typeAlias alias="cm" type="NP.Model.CM, NP.Model" />
|
||||||
<typeAlias alias="cminning" type="NP.Model.CMInning, NP.Model" />
|
<typeAlias alias="cminning" type="NP.Model.CMInning, NP.Model" />
|
||||||
|
<typeAlias alias="cminningscd" type="NP.Model.CMInningscd, NP.Model" />
|
||||||
<typeAlias alias="cmpr" type="NP.Model.CMPR, NP.Model" />
|
<typeAlias alias="cmpr" type="NP.Model.CMPR, NP.Model" />
|
||||||
<typeAlias alias="book" type="NP.Model.Book, NP.Model" />
|
<typeAlias alias="book" type="NP.Model.Book, NP.Model" />
|
||||||
<typeAlias alias="ct" type="NP.Model.CT, NP.Model" />
|
<typeAlias alias="ct" type="NP.Model.CT, NP.Model" />
|
||||||
|
|
@ -335,6 +336,24 @@
|
||||||
<update id="cm.cminning.del2" parameterClass="long">
|
<update id="cm.cminning.del2" parameterClass="long">
|
||||||
delete from cminning where cmino = #cmino#
|
delete from cminning where cmino = #cmino#
|
||||||
</update>
|
</update>
|
||||||
|
<update id="cm.cminning.del3" parameterClass="long">
|
||||||
|
delete from cminning where cmino = (
|
||||||
|
select a.cmino from (
|
||||||
|
select case when count(b.cmisno) < 1 then #cmino# else 0 end cmisno
|
||||||
|
from (select 1 col1) a
|
||||||
|
left outer join cminningscd b on b.cmino=#cmino#) a
|
||||||
|
)
|
||||||
|
</update>
|
||||||
|
<update id="cm.cminningscd.del" parameterClass="long">
|
||||||
|
delete from cminningscd where cmisno = (
|
||||||
|
select a.cmisno from (
|
||||||
|
select case when count(c.lectno) < 1 then #cmisno# else 0 end cmisno
|
||||||
|
from (select 1 col1) a
|
||||||
|
left outer join cminningscd b on b.cmisno=#cmisno#
|
||||||
|
left outer join lect c on c.cmisno=b.cmisno and c.status=1 and c.ischanged=0
|
||||||
|
) a
|
||||||
|
)
|
||||||
|
</update>
|
||||||
<update id="cm.cmseqsave" parameterClass="hashtable">
|
<update id="cm.cmseqsave" parameterClass="hashtable">
|
||||||
update cm set isseq=#isseq#,<include refid="sql.up"></include> where cmno=#cmno#
|
update cm set isseq=#isseq#,<include refid="sql.up"></include> where cmno=#cmno#
|
||||||
</update>
|
</update>
|
||||||
|
|
@ -488,6 +507,21 @@
|
||||||
order by a.week,a.iseq
|
order by a.week,a.iseq
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="cm.cminningscds" parameterClass="hashtable" resultClass="cminningscd">
|
||||||
|
select a.*
|
||||||
|
from (
|
||||||
|
select a.cmisno,a.cmino,a.estart,a.eend,a.quota,a.cdt,a.udt
|
||||||
|
,row_number() over(order by <isNotNull property="orderby">$orderby$</isNotNull><isNull property="orderby">a.estart</isNull>) scdseq
|
||||||
|
,count(b.cmisno) over() regmem
|
||||||
|
from cminningscd a
|
||||||
|
left outer join lect b on b.cmisno=a.cmisno and b.status=1 and b.ischanged=0
|
||||||
|
<dynamic prepend="where">
|
||||||
|
<isNotNull property="cmino" prepend="and">a.cmino=#cmino#</isNotNull>
|
||||||
|
<isNotNull property="cmisno" prepend="and">a.cmisno=#cmisno#</isNotNull>
|
||||||
|
</dynamic>
|
||||||
|
) a
|
||||||
|
order by a.scdseq
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="cm.cminning.batch" parameterClass="cminning">
|
<update id="cm.cminning.batch" parameterClass="cminning">
|
||||||
delete from cminning where cmno=#cmno#;
|
delete from cminning where cmno=#cmno#;
|
||||||
|
|
@ -505,6 +539,12 @@
|
||||||
where b.cmino is null
|
where b.cmino is null
|
||||||
<selectKey type="post" property="cmino" resultClass="long">SELECT last_insert_id()</selectKey>
|
<selectKey type="post" property="cmino" resultClass="long">SELECT last_insert_id()</selectKey>
|
||||||
</insert>
|
</insert>
|
||||||
|
<insert id="cm.cminningscd.in" parameterClass="cminningscd">
|
||||||
|
SELECT * FROM (SELECT LAST_INSERT_ID(0) col1) a WHERE col1 > 0;
|
||||||
|
insert into cminningscd(cmino,estart,eend,quota,<include refid="sql.inc"></include>)
|
||||||
|
values(#cmino#,#estart#,#eend#,#quota#,<include refid="sql.inv"></include>)
|
||||||
|
<selectKey type="post" property="cmisno" resultClass="long">SELECT last_insert_id()</selectKey>
|
||||||
|
</insert>
|
||||||
<update id="cm.cminnings.up" parameterClass="cminning">
|
<update id="cm.cminnings.up" parameterClass="cminning">
|
||||||
update cminning a
|
update cminning a
|
||||||
left outer join (
|
left outer join (
|
||||||
|
|
@ -516,6 +556,11 @@
|
||||||
,ctno =#ctno#,istaste =#istaste#,sttime=#sttime#,atime =#atime#,mstime =#mstime#,metime =#metime#,userno =#userno#
|
,ctno =#ctno#,istaste =#istaste#,sttime=#sttime#,atime =#atime#,mstime =#mstime#,metime =#metime#,userno =#userno#
|
||||||
where a.cmino=#cmino# and b.cmino is null
|
where a.cmino=#cmino# and b.cmino is null
|
||||||
</update>
|
</update>
|
||||||
|
<update id="cm.cminningscd.up" parameterClass="cminningscd">
|
||||||
|
update cminningscd a
|
||||||
|
set <include refid="sql.up"></include>,cmino=#cmino#,estart=#estart#,eend=#eend#,quota=#quota#
|
||||||
|
where a.cmisno=#cmisno#
|
||||||
|
</update>
|
||||||
<update id="cm.cminnings.istasteclear" parameterClass="hashtable">
|
<update id="cm.cminnings.istasteclear" parameterClass="hashtable">
|
||||||
update cminning set istaste=0 where cmno=#cmno# and cmino <> #cmino#
|
update cminning set istaste=0 where cmno=#cmno# and cmino <> #cmino#
|
||||||
</update>
|
</update>
|
||||||
|
|
|
||||||
39
Model/CM.cs
39
Model/CM.cs
|
|
@ -3199,4 +3199,43 @@ namespace NP.Model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int isdel {get;set;}
|
public int isdel {get;set;}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 혼합교육강좌
|
||||||
|
/// </summary>
|
||||||
|
[Serializable]
|
||||||
|
public class CMinningscd : BaseModel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 일정키
|
||||||
|
/// </summary>
|
||||||
|
public Int64 cmisno { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 회차키
|
||||||
|
/// </summary>
|
||||||
|
public Int64 cmino { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 교육시작
|
||||||
|
/// </summary>
|
||||||
|
public DateTime estart { get; set; }
|
||||||
|
public string estart2 { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 교육종료
|
||||||
|
/// </summary>
|
||||||
|
public DateTime eend { get; set; }
|
||||||
|
public string eend2 { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 제한인원
|
||||||
|
/// </summary>
|
||||||
|
public int quota { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 순서
|
||||||
|
/// </summary>
|
||||||
|
public int? scdseq { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 등록인원
|
||||||
|
/// </summary>
|
||||||
|
public int? regmem { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ namespace NP.Model
|
||||||
public IList<Assign> Assigns { get; set; }
|
public IList<Assign> Assigns { get; set; }
|
||||||
public IList<CMInning> CMInnings { get; set; }
|
public IList<CMInning> CMInnings { get; set; }
|
||||||
public IList<Book> Books { get; set; }
|
public IList<Book> Books { get; set; }
|
||||||
|
public IList<CMinningscd> CMInningscds { get; set; }
|
||||||
public Book Book { get; set; }
|
public Book Book { get; set; }
|
||||||
public CMEV CMEV { get; set; }
|
public CMEV CMEV { get; set; }
|
||||||
public IList<EST> ESTs { get; set; }
|
public IList<EST> ESTs { get; set; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue