This commit is contained in:
parent
b43f49dc5e
commit
580051ad23
|
|
@ -1,4 +1,7 @@
|
|||
@model NP.Model.VMCM
|
||||
@{
|
||||
int studyplaceseq = 0;
|
||||
}
|
||||
<div style="@(Model.CM.cmno < 1 ? "display: none;":"")">
|
||||
<ul class="pagination pagination-md" style="margin: 0;">
|
||||
<li class=""><a href="#" onclick="gotab(0);" data-toggle="tab">기본정보</a></li>
|
||||
|
|
@ -144,6 +147,17 @@
|
|||
@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.Partial("./Partial/Radio", Model.ComCodes.Where(w => w.cgroup == "studyplace"), new ViewDataDictionary() { { "checked", Model.CM.studyplace }, { "name", "istudyplace" }, { "isreadonly", 0 } })*@
|
||||
@foreach (var item in Model.ComCodes.Where(w => w.cgroup == "studyplace"))
|
||||
{
|
||||
<span><input type="radio" name="istudyplace" id="istudyplace_@item.ccode" @(studyplaceseq == 0 ? "checked" : "") value="@item.ccode" /><label style="vertical-align: sub;" for="istudyplace_@item.ccode"> @item.cname</label></span>
|
||||
studyplaceseq++;
|
||||
}
|
||||
</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>
|
||||
|
|
@ -228,7 +242,8 @@
|
|||
cmino: @(Model.CMInnings.Count() > 0 ? Model.CMInnings[0].cmino : 0),
|
||||
estart2: estart,
|
||||
eend2: eend,
|
||||
quota: getv("iquota")
|
||||
quota: getv("iquota"),
|
||||
studyplace: $(":input:radio[name=istudyplace]:checked").val()
|
||||
}, "cbcminningscdsave", null, null, null, true);
|
||||
}
|
||||
}
|
||||
|
|
@ -330,6 +345,7 @@
|
|||
setv("ieth", getint(endMinute));
|
||||
setv("ietm", getint(endSec));
|
||||
setv("iquota", getint(d.quota));
|
||||
setv("istudyplae", getint(d.studyplace));
|
||||
}
|
||||
bglayer(); $("#scdbox").slideDown("fast", function () { $("#scdbox").scrollTop(0); });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -559,8 +559,8 @@
|
|||
</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>)
|
||||
insert into cminningscd(cmino,estart,eend,quota,studyplace,<include refid="sql.inc"></include>)
|
||||
values(#cmino#,#estart#,#eend#,#quota#,#studyplace#,<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">
|
||||
|
|
@ -576,7 +576,7 @@
|
|||
</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#
|
||||
set <include refid="sql.up"></include>,cmino=#cmino#,estart=#estart#,eend=#eend#,quota=#quota#,studyplace=#studyplace#
|
||||
where a.cmisno=#cmisno#
|
||||
</update>
|
||||
<update id="cm.cminnings.istasteclear" parameterClass="hashtable">
|
||||
|
|
@ -1803,18 +1803,18 @@
|
|||
</select>
|
||||
<select id="cm.cminningscds.applyedu" parameterClass="hashtable" resultClass="cminningscd">
|
||||
select
|
||||
a.cmisno,a.cmino,a.estart,a.eend,a.quota,a.cdt,a.udt,a.ccode,a.studyplacename,a.startmonth
|
||||
,a.ccode, a.studyplacename,a.remainPeople
|
||||
a.cmisno,a.cmino,a.estart,a.eend,a.quota,a.cdt,a.udt,a.studyplace,a.studyplacename,a.startmonth
|
||||
,a.studyplace, a.studyplacename,a.remainPeople
|
||||
,case when a.estart < now() or a.remainPeople <= 0 then 0 else 1 end isend
|
||||
from
|
||||
(
|
||||
select a.cmisno,a.cmino,a.estart,a.eend,a.quota,a.cdt,a.udt,month(a.estart) startmonth
|
||||
,(a.quota - (select count(z.lectno) cnt from lect z where a.cmisno = z.cmisno and z.status =1 and z.ischanged=0)) remainPeople
|
||||
,e.ccode, e.cname studyplacename
|
||||
,a.studyplace, e.cname studyplacename
|
||||
from cminningscd a
|
||||
left outer join cminning c on c.cmino = a.cmino
|
||||
left outer join cm d on d.cmno = c.cmno
|
||||
left outer join comcode e on e.ccode = d.studyplace
|
||||
left outer join comcode e on e.ccode = a.studyplace
|
||||
<dynamic prepend="where">
|
||||
<isNotNull property="cmno" prepend="and">c.cmno=#cmno#</isNotNull>
|
||||
</dynamic>
|
||||
|
|
|
|||
Loading…
Reference in New Issue