This commit is contained in:
parent
c0516d83f0
commit
0acf77ee54
|
|
@ -251,7 +251,7 @@ namespace NP.Base.Controllers
|
|||
[HttpPost]
|
||||
public JsonResult savePPLog(VMCourse vm)
|
||||
{
|
||||
int rtn = 0;
|
||||
int rtn = 0;
|
||||
PPLog ppllog = new PPLog();
|
||||
ppllog.uno = SUserInfo.UserNo;
|
||||
ppllog.uip = GetUserIP();
|
||||
|
|
|
|||
|
|
@ -393,6 +393,13 @@ namespace NP.Base.Controllers
|
|||
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#
|
||||
where userno=#userno#
|
||||
</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>
|
||||
</sqlMap>
|
||||
|
|
@ -284,12 +284,27 @@
|
|||
|
||||
function applyClass(cmno) {
|
||||
if (@ViewBag.SSUserNo > 0) {
|
||||
$("#cmno").val(cmno);
|
||||
$("#smartSearchForm").attr("action", "/Course/ApplyEdu").submit();
|
||||
checkLectIsComplete(cmno);
|
||||
}
|
||||
else {
|
||||
alert("로그인 후 신청 할 수 있습니다.");
|
||||
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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue