2020-10-12 14:39:23 +09:00
|
|
|
@model NP.Model.VMCC
|
|
|
|
|
<form id="mform" method="post">
|
|
|
|
|
<section class="panel panel-default clearfix devsearch" data-cleartbody="tbody1">
|
|
|
|
|
@Html.Partial("./Partial/SearchCaption")
|
|
|
|
|
<div class="step-content">
|
|
|
|
|
<div class="step-pane active form-inline">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<select id="stringval" name="stringval" class="form-control disp-init">
|
|
|
|
|
<option value="">-년도선택</option>
|
|
|
|
|
@foreach (var y in Model.Terms.Select(s => s.tyear).Distinct())
|
|
|
|
|
{
|
|
|
|
|
<option value="@y" @(Model.stringval == y.ToString() ? "selected" : "")>@y 년</option>
|
|
|
|
|
}
|
|
|
|
|
</select>
|
|
|
|
|
<select id="stringval2" name="stringval2" class="form-control disp-init">
|
|
|
|
|
<option value="">-기수선택</option>
|
|
|
|
|
@if (!string.IsNullOrEmpty(Model.stringval))
|
|
|
|
|
{
|
|
|
|
|
foreach (var t in Model.Terms.Where(w => w.tyear.ToString() == Model.stringval))
|
|
|
|
|
{
|
|
|
|
|
<option value="@t.tmno" @(Model.stringval2 == t.tmno.ToString() ? "selected" : "")>@t.tseq 기</option>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</select>
|
|
|
|
|
<select id="stringval3" name="stringval3" class="form-control disp-init">
|
|
|
|
|
<option value="">-강좌(반)선택</option>
|
|
|
|
|
@if (!string.IsNullOrEmpty(Model.stringval2))
|
|
|
|
|
{
|
|
|
|
|
foreach (var c in Model.CMs)
|
|
|
|
|
{
|
|
|
|
|
<option value="@c.cmno" @(Model.stringval3 == c.cmno.ToString() ? "selected" : "")>@c.cname (@c.classno)</option>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</select>
|
|
|
|
|
@Html.Partial("./Partial/Select", Model.BMs, new ViewDataDictionary { { "name", "stringval4" }, { "selected", Model.stringval4 }, { "df", ":-게시판선택" } })
|
|
|
|
|
@Html.Partial("./Partial/Text", Model.stringval5, Helpers.DicText(new NP.Model.TextDic() { Name = "stringval5", Value = Model.stringval5, PH = "제목/작성자/내용으로 검색", CssClass = "ff" }))
|
|
|
|
|
@Html.Partial("./Partial/Button", new NP.Model.Button() { Special = "search" })
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<div class="tar buttonbox">
|
|
|
|
|
@Html.Partial("./Partial/pagerow", new ViewDataDictionary { { "tbodyid", "tbody1" }, { "searchmethod", "submit()" }, { "pagesize", Model.pagerowcount } })
|
|
|
|
|
<a href="#" onclick="javascript:reg(0);" class="btn btn-s-xs btn-info">게시글 등록</a>
|
|
|
|
|
</div>
|
|
|
|
|
<section class="panel panel-default">
|
|
|
|
|
<div class="table-responsive" id="excel1">
|
|
|
|
|
<table class="table table-striped b-t b-light">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th width="20">No</th>
|
|
|
|
|
<th>강좌명(반)</th>
|
|
|
|
|
<th>게시판명</th>
|
|
|
|
|
<th>제목</th>
|
|
|
|
|
<th>등록일</th>
|
|
|
|
|
<th>작성자</th>
|
|
|
|
|
<th>년도/기수</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody class="data" id="tbody1">
|
|
|
|
|
@foreach (var item in Model.Boards)
|
|
|
|
|
{
|
|
|
|
|
<tr>
|
|
|
|
|
<td>@item.rnorvt</td>
|
|
|
|
|
<td>@item.cname (@item.classno)</td>
|
|
|
|
|
<td>@item.bmname</td>
|
|
|
|
|
<td class="link" style="@(item.pbno == null ? "":"padding-left: 30px;")"><a href="#" onclick="reg(@item.bno)">@Html.Raw(item.pbno == null ? "" : "<i class=\"fa fa-mail-forward\"></i>")@Html.Raw(item.istop == 1 ? "<i class=\"fa fa-bullhorn\"></i>" : "")@(item.subject)@(item.ccount > 0 ? string.Format("({0})", item.ccount.ToString("#,0")) : "")@Html.Raw(item.issecr == 1 ? "<i class=\"fa fa-lock\"></i>" : "")</a></td>
|
|
|
|
|
<td>@item.cdtymd</td>
|
2022-07-08 09:43:25 +09:00
|
|
|
<td>@(string.Format("{0}({1})",item.cnoname,item.cnoid))</td>
|
2020-10-12 14:39:23 +09:00
|
|
|
<td>@item.tyear / @item.tseq</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
@Html.Pager((int)Model.pagenum, 10, Model.pagerowcount, Model.pagetotalcount)
|
|
|
|
|
</section>
|
|
|
|
|
</form>
|
|
|
|
|
<form id="dform" method="post" action="/cc/rooms">
|
|
|
|
|
@Html.Partial("./Partial/dform", Model, new ViewDataDictionary { { "preform", 1 } })
|
|
|
|
|
</form>
|
|
|
|
|
@section scripts{
|
|
|
|
|
<script>
|
|
|
|
|
var terms = '@(string.Join(";", Model.Terms.Select(s=>string.Format("{0}:{1}:{2}", s.tmno, s.tyear, s.tseq))))';
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
$("#stringval").on("change", function () {
|
|
|
|
|
$("#stringval2 option:gt(0)").remove();
|
|
|
|
|
$("#stringval3 option:gt(0)").remove();
|
|
|
|
|
var y = $(this).val();
|
|
|
|
|
if (y != "") {
|
|
|
|
|
$.each(terms.split(';'), function (i, t) {
|
|
|
|
|
if (t.split(':')[1] == y) {
|
|
|
|
|
$("#stringval2").append("<option value=\"" + t.split(':')[0] + "\">" + t.split(':')[2] + " 기</optoin>");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$("#stringval2").on("change", function () {
|
|
|
|
|
$("#stringval3 option:gt(0)").remove();
|
|
|
|
|
if ($(this).val() != "") {
|
|
|
|
|
capp("/acommon/cmgetforboard", { tmno: $(this).val() }, "cbget1");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
function cbget1() {
|
|
|
|
|
$.each(capResult.obj, function (i, c) {
|
|
|
|
|
$("#stringval3").append("<option value=\"" + c.cmno + "\">" + c.cname + "(" + c.classno + ")</optoin>");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function reg(no) {
|
|
|
|
|
setv("dform_longval", no);
|
|
|
|
|
$("#dform").attr("action", "/cc/roomr").submit();
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
}
|