추가개발12/31_2
This commit is contained in:
parent
a35e524ee8
commit
f494cb2b1b
|
|
@ -802,6 +802,14 @@ namespace NP.BO.Controllers
|
|||
vm.ComCodes = GetComCodes("ccdiff,cc1,cc2,cc3,cc4,cc5");
|
||||
vm.CMs = Dao.Get<CM>("cm.cms", new System.Collections.Hashtable() { { "ismaster", 1 }, { "orderby", "a.cname" } });
|
||||
vm.ComGroups = Dao.Get<ComCode>("sys.comcode.glist", new System.Collections.Hashtable() { { "orderby", "cgroupname" } });
|
||||
|
||||
//교강사 조회
|
||||
#region + 기본정보 담당자/교강사 [vm.Datas] Get: cm.cmdatas
|
||||
var p1 = new System.Collections.Hashtable();
|
||||
p1.Add("stringval16", vm.stringval16);
|
||||
vm.Datas = Dao.Get<Data>("cm.cmdatas2", p1);
|
||||
#endregion
|
||||
|
||||
var ht = new System.Collections.Hashtable();
|
||||
if (IsPost())
|
||||
{
|
||||
|
|
@ -821,7 +829,7 @@ namespace NP.BO.Controllers
|
|||
if (!string.IsNullOrEmpty(vm.stringval9)) { ht.Add("ecount", GetInt(vm.stringval9)); }
|
||||
if (!string.IsNullOrEmpty(vm.stringval10)) { ht.Add("rrate", GetInt(vm.stringval10)); }
|
||||
if (!string.IsNullOrEmpty(vm.stringval15)) { ht.Add("instuctorName", vm.stringval15); }
|
||||
if (!string.IsNullOrEmpty(vm.stringval16)) { ht.Add("scdinstuctor", vm.stringval16); }
|
||||
if (!string.IsNullOrEmpty(vm.stringval14)) { ht.Add("scdinstuctor", vm.stringval14); }
|
||||
vm.Qs = Dao.Get<Question>("cm.questions2", ht);
|
||||
}
|
||||
vm.Qs = vm.Qs ?? new List<Question>();
|
||||
|
|
|
|||
|
|
@ -331,8 +331,26 @@
|
|||
this.value = "59"; // 최대값으로 보정
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//2025-12-31 / KHJ / 교육일정 선택 시 이전 시험에 해당 일정이 등록 된게 있는지 확인해서 막는다.
|
||||
$(document).on("change", "#cmisno", function () {
|
||||
capp("/acommon/CmisnoExist", { cmno: $("#cmno").val(), cmisno: $(this).val() }, "excmisno");
|
||||
});
|
||||
});
|
||||
|
||||
function excmisno() {
|
||||
console.log("capResult", capResult);
|
||||
if (capResult.code == 1000) {
|
||||
if (capResult.obj > 0) {
|
||||
msg("시험 추가가 된 교육일정이 있습니다. 다른 교육일정을 선택해주세요.");
|
||||
$("#cmisno").val("");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function cartesianProductOf() {
|
||||
return _.reduce(arguments, function (a, b) {
|
||||
return _.flatten(_.map(a, function (x) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
@model NP.Model.VMCM
|
||||
@{
|
||||
Layout = "~/Views/Shared/_PopupLayout.cshtml";
|
||||
Layout = "~/Views/Shared/_PopupLayout.cshtml";
|
||||
}
|
||||
<form id="mform" method="post" acton="/cm/qp">
|
||||
<section class="panel panel-default clearfix devsearch">
|
||||
|
|
@ -14,8 +14,17 @@
|
|||
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "cc3"), new ViewDataDictionary { { "name", "StringVal5" }, { "selected", Model.stringval5 }, { "cssclass", "searchcon " }, { "df", ":" + Model.ComGroups.Where(w => w.cgroup == "cc3").First().cgroupname } })
|
||||
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "cc4"), new ViewDataDictionary { { "name", "StringVal6" }, { "selected", Model.stringval6 }, { "cssclass", "searchcon " }, { "df", ":" + Model.ComGroups.Where(w => w.cgroup == "cc4").First().cgroupname } })
|
||||
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "cc5"), new ViewDataDictionary { { "name", "StringVal7" }, { "selected", Model.stringval7 }, { "cssclass", "searchcon " }, { "df", ":" + Model.ComGroups.Where(w => w.cgroup == "cc5").First().cgroupname } })
|
||||
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "cc6"), new ViewDataDictionary { { "name", "StringVal14" }, { "selected", Model.stringval14 }, { "cssclass", "searchcon " }, { "df", "교강사" } })
|
||||
@Html.TextBox("stringval15", Model.stringval15, new { @class = "form-control", @style = "width: 120px;" })
|
||||
|
||||
<select class="form-control dev" name="stringVal14">
|
||||
@if (Model.Datas.Count > 0) {
|
||||
foreach (var item in Model.Datas) {
|
||||
<option value="@item.strval" @(item.strval == Model.stringval14 ? "selected" : "")>@item.strval2</option>
|
||||
}
|
||||
} else {
|
||||
<option>교강사</option>
|
||||
}
|
||||
</select>
|
||||
|
||||
@Html.Partial("./Partial/Button", new NP.Model.Button() { Special = "search" })
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1154,5 +1154,16 @@ namespace NP.Base.Controllers
|
|||
|
||||
return JsonOK(Dao.SaveExam(vm.CMEX), false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 교육일정 선택 시 중복 여부(강좌설정 > 시험설정 > 최종평가 등록)
|
||||
/// </summary>
|
||||
/// <param name="extype"></param>
|
||||
/// <param name="no"></param>
|
||||
/// <returns></returns>
|
||||
public JsonResult CmisnoExist(int cmno, int cmisno) {
|
||||
var scd = Dao.Get<int>("cm.cmisno.exists", new Hashtable() { { "cmno", cmno}, { "cmisno", cmisno } });
|
||||
return JsonOK(scd.FirstOrDefault());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2336,5 +2336,18 @@
|
|||
where a.cmno=#cmno# and a.isdel=0
|
||||
order by rsno<!--estkind,rno-->
|
||||
</select>
|
||||
|
||||
<select id="cm.cmdatas2" parameterClass="hashtable" resultClass="data">
|
||||
SELECT a.userid strval, a.username strval2
|
||||
FROM users a
|
||||
WHERE a.usertype = 11 AND a.status = 1
|
||||
AND FIND_IN_SET(a.userid, #stringval16#) > 0;
|
||||
</select>
|
||||
|
||||
<select id="cm.cmisno.exists" parameterClass="hashtable" resultClass="int">
|
||||
SELECT count(*)
|
||||
FROM cmex
|
||||
WHERE cmno = #cmno# AND cmisno = #cmisno#
|
||||
</select>
|
||||
</statements>
|
||||
</sqlMap>
|
||||
|
|
@ -2338,6 +2338,22 @@
|
|||
where a.cmno=#cmno# and a.isdel=0
|
||||
order by rsno<!--estkind,rno-->
|
||||
</select>
|
||||
<<<<<<< HEAD
|
||||
>>>>>>> ca8967d (추가개발1)
|
||||
=======
|
||||
|
||||
<select id="cm.cmdatas2" parameterClass="hashtable" resultClass="data">
|
||||
SELECT a.userid strval, a.username strval2
|
||||
FROM users a
|
||||
WHERE a.usertype = 11 AND a.status = 1
|
||||
AND FIND_IN_SET(a.userid, #stringval16#) > 0;
|
||||
</select>
|
||||
|
||||
<select id="cm.cmisno.exists" parameterClass="hashtable" resultClass="int">
|
||||
SELECT count(*)
|
||||
FROM cmex
|
||||
WHERE cmno = #cmno# AND cmisno = #cmisno#
|
||||
</select>
|
||||
>>>>>>> d8fa423 (추가개발12/31_2)
|
||||
</statements>
|
||||
</sqlMap>
|
||||
Loading…
Reference in New Issue