This commit is contained in:
parent
c0516d83f0
commit
0acf77ee54
|
|
@ -393,6 +393,13 @@ namespace NP.Base.Controllers
|
||||||
return JsonBack(result);
|
return JsonBack(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public JsonResult GetCheckLectIsComplete(int cmno)
|
||||||
|
{
|
||||||
|
var result = Dao.Get<int>("cm.lectcheckuser", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo },{ "cmno", cmno } }).First();
|
||||||
|
return JsonBack(result);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1881,5 +1881,12 @@
|
||||||
,isassignuser = #isassignuser#
|
,isassignuser = #isassignuser#
|
||||||
where userno=#userno#
|
where userno=#userno#
|
||||||
</update>
|
</update>
|
||||||
|
<select id="cm.lectcheckuser" parameterClass="hashtable" resultClass="int">
|
||||||
|
select count(b.lectno)
|
||||||
|
from users a
|
||||||
|
left outer join lect b on a.userno = b.userno
|
||||||
|
where a.userno = #userno#
|
||||||
|
and b.cmno = #cmno# and b.iscomplete = 1
|
||||||
|
</select>
|
||||||
</statements>
|
</statements>
|
||||||
</sqlMap>
|
</sqlMap>
|
||||||
|
|
@ -284,12 +284,27 @@
|
||||||
|
|
||||||
function applyClass(cmno) {
|
function applyClass(cmno) {
|
||||||
if (@ViewBag.SSUserNo > 0) {
|
if (@ViewBag.SSUserNo > 0) {
|
||||||
$("#cmno").val(cmno);
|
checkLectIsComplete(cmno);
|
||||||
$("#smartSearchForm").attr("action", "/Course/ApplyEdu").submit();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
alert("로그인 후 신청 할 수 있습니다.");
|
alert("로그인 후 신청 할 수 있습니다.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkLectIsComplete(cmno) {
|
||||||
|
_cmno = cmno;
|
||||||
|
capp("/focommon/GetCheckLectIsComplete", { cmno: cmno }, "check");
|
||||||
|
}
|
||||||
|
function check() {
|
||||||
|
var cnt = capResult.obj;
|
||||||
|
if (cnt > 0) {
|
||||||
|
alert("이미 수강/수료한 과정입니다.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#cmno").val(_cmno);
|
||||||
|
$("#smartSearchForm").attr("action", "/Course/ApplyEdu").submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue