This commit is contained in:
parent
d996bd9733
commit
36ccc91650
|
|
@ -378,7 +378,42 @@ namespace NP.Base.Controllers
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public JsonResult GetCmUser(int cmno)
|
public JsonResult GetCmUser(int cmno)
|
||||||
{
|
{
|
||||||
|
var comcodes = GetComCodes("typeman,typeedu,typegrade,typejob", true);
|
||||||
var result = Dao.Get<CM>("cm.cmuser", new System.Collections.Hashtable() { { "cmno", cmno } });
|
var result = Dao.Get<CM>("cm.cmuser", new System.Collections.Hashtable() { { "cmno", cmno } });
|
||||||
|
foreach (var r in result)
|
||||||
|
{
|
||||||
|
string[] typemanArr = r.typeman.Split(',');
|
||||||
|
for (int i = 0; i < typemanArr.Length; i++)
|
||||||
|
{
|
||||||
|
r.typemans += comcodes.Where(x => x.cgroup == "typeman" && x.ccode == Convert.ToInt32(typemanArr[i])).FirstOrDefault().cname;
|
||||||
|
if (i < typemanArr.Length -1)
|
||||||
|
r.typemans += ",";
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] typeeduArr = r.typeedu.Split(',');
|
||||||
|
for (int i = 0; i < typeeduArr.Length; i++)
|
||||||
|
{
|
||||||
|
r.typeedus += comcodes.Where(x => x.cgroup == "typeedu" && x.ccode == Convert.ToInt32(typeeduArr[i])).FirstOrDefault().cname;
|
||||||
|
if (i < typeeduArr.Length - 1)
|
||||||
|
r.typeedus += ",";
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] typegradeArr = r.typegrade.Split(',');
|
||||||
|
for (int i = 0; i < typegradeArr.Length; i++)
|
||||||
|
{
|
||||||
|
r.typegrades += comcodes.Where(x => x.cgroup == "typegrade" && x.ccode == Convert.ToInt32(typegradeArr[i])).FirstOrDefault().cname;
|
||||||
|
if (i < typegradeArr.Length - 1)
|
||||||
|
r.typegrades += ",";
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] typejobArr = r.typejob.Split(',');
|
||||||
|
for (int i = 0; i < typejobArr.Length; i++)
|
||||||
|
{
|
||||||
|
r.typejobs += comcodes.Where(x => x.cgroup == "typejob" && x.ccode == Convert.ToInt32(typejobArr[i])).FirstOrDefault().cname;
|
||||||
|
if (i < typejobArr.Length - 1)
|
||||||
|
r.typejobs += ",";
|
||||||
|
}
|
||||||
|
}
|
||||||
return JsonBack(result);
|
return JsonBack(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1923,13 +1923,9 @@
|
||||||
,a.isrefund,a.isuse,a.isseq,a.isdel,a.fgnocm,a.iscertificate,a.ischkatt
|
,a.isrefund,a.isuse,a.isseq,a.isdel,a.fgnocm,a.iscertificate,a.ischkatt
|
||||||
,(select count(l.lectno) cnt from lect l where l.cmno = a.cmno and l.status =1 and l.ischanged=0) lectcnt
|
,(select count(l.lectno) cnt from lect l where l.cmno = a.cmno and l.status =1 and l.ischanged=0) lectcnt
|
||||||
from cm a
|
from cm a
|
||||||
inner join cminning b on a.cmno = b.cmno
|
where a.ismaster=0 and a.isuse=1 and a.isdel=0 and a.cshape = 1
|
||||||
where a.ismaster=0 and a.isuse=1 and a.isdel=0 and a.cshape in ('1','2')
|
|
||||||
<isNotNull property="cmno">and a.cmno=#cmno#</isNotNull>
|
<isNotNull property="cmno">and a.cmno=#cmno#</isNotNull>
|
||||||
<isNotNull property="year">and year(a.sstime)=#year#</isNotNull>
|
<isNotNull property="year">and year(a.sstime)=#year#</isNotNull>
|
||||||
<isNotNull property="month">and month(a.sstime)=#month#</isNotNull>
|
|
||||||
<isNotNull property="cnamelike">and a.cname like concat('%', #cnamelike#,'%')</isNotNull>
|
|
||||||
<isNotNull property="studyplace">and a.studyplace=#studyplace#</isNotNull>
|
|
||||||
order by a.sstime,a.setime
|
order by a.sstime,a.setime
|
||||||
</select>
|
</select>
|
||||||
</statements>
|
</statements>
|
||||||
|
|
|
||||||
|
|
@ -269,14 +269,9 @@ namespace NP.FO.Controllers
|
||||||
}
|
}
|
||||||
public ActionResult Offs(VMCourse vm)
|
public ActionResult Offs(VMCourse vm)
|
||||||
{
|
{
|
||||||
//vm.pcgcode = vm.pcgcode ?? OffCode;
|
//오프라인교육만
|
||||||
//vm.CMs = Dao.Get<CM>("cm.cms.forbuy", new System.Collections.Hashtable() { { "pcgcode", vm.pcgcode }, { "cgcode", vm.cgcode }, { "userno", SUserInfo.UserNo }, { "year", DateTime.Now.Year }, { "contents", vm.Contents } });
|
vm.CMs = Dao.Get<CM>("cm.cms.offs", new System.Collections.Hashtable() {{ "year", DateTime.Now.Year } });
|
||||||
vm.CMs = Dao.Get<CM>("cm.cms.offs", new System.Collections.Hashtable() {{ "year", DateTime.Now.Year }, { "month", vm.stringval }, { "cnamelike", vm.stringval2 } });
|
|
||||||
vm.ComCodes = GetComCodes("studyplace", true);
|
|
||||||
vm.viewname = vm.viewname ?? "OffList";
|
vm.viewname = vm.viewname ?? "OffList";
|
||||||
vm.viewname2 = vm.viewname2 ?? "OffSearch";
|
|
||||||
vm.viewname3 = "";
|
|
||||||
vm.previewname = "/Course/Offs?cname=" + (vm.cname ?? "");
|
|
||||||
return View("Offs", vm);
|
return View("Offs", vm);
|
||||||
}
|
}
|
||||||
public ActionResult OffDetail(VMCourse vm)
|
public ActionResult OffDetail(VMCourse vm)
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,11 @@
|
||||||
@{
|
@{
|
||||||
Layout = null;
|
Layout = null;
|
||||||
}
|
}
|
||||||
<div class="offTab">
|
<style>
|
||||||
<ul class="offtList">
|
.clsPopWrap {
|
||||||
<li class="@(string.IsNullOrEmpty(Model.cshape)?"current":"")"><a href="#" onclick="gothis('')">전체</a></li>
|
max-width : 750px;
|
||||||
<li class="@("1".Equals(Model.cshape)?"current":"")"><a href="#" onclick="gothis('1')">교육장교육</a></li>
|
}
|
||||||
<li class="@("2".Equals(Model.cshape)?"current":"")"><a href="#" onclick="gothis('2')">혼합교육</a></li>
|
</style>
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="offMonth">
|
<div class="offMonth">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#" onclick="viewmonth(1)">1월</a></li>
|
<li><a href="#" onclick="viewmonth(1)">1월</a></li>
|
||||||
|
|
@ -27,30 +25,23 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="offDesc">
|
<div class="offDesc">
|
||||||
<ul>
|
|
||||||
<li class="current"><a href="#">전체</a></li>
|
|
||||||
@foreach (var t in Model.ComCodes.Where(w => w.cgroup.ToString() == "studyplace"))
|
|
||||||
{
|
|
||||||
<li><a href="#">@t.cname 교육장</a></li>
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
<a href="#" onclick="viewmonth(0)">올해일정 조회</a>
|
<a href="#" onclick="viewmonth(0)">올해일정 조회</a>
|
||||||
</div>
|
</div>
|
||||||
@foreach (var m in Model.CMs.Select(s => s.sstime.Value.Month).Distinct())
|
@foreach (var m in Model.CMs.Select(s => s.sstime.Value.Month).Distinct())
|
||||||
{
|
{
|
||||||
<div class="offList month@(m) @(DateTime.Now.Month == m ? "current":"")" @*style=@(DateTime.Now.Month==m?"":"display:none;")*@>
|
<div class="offList month@(m) @(DateTime.Now.Month == m ? "current":"")" style=@(DateTime.Now.Month==m?"":"display:none;")>
|
||||||
<h5>@(m)월 교육일정</h5>
|
<h5>@(m)월 교육일정</h5>
|
||||||
@foreach (var d in Model.CMs.Where(w => w.sstime.Value.Month == m))
|
@foreach (var d in Model.CMs.Where(w => w.sstime.Value.Month == m))
|
||||||
{
|
{
|
||||||
<ul class="schList">
|
<ul class="schList">
|
||||||
<li>
|
<li>
|
||||||
<h4 style="@((DateTime.Now < d.rstime.Value || DateTime.Now >= d.retime.Value) ? "color:#888;" : "")")>
|
<h4 style="@((DateTime.Now < d.rstime.Value || DateTime.Now >= d.retime.Value) ? "color:#888;" : "")" )>
|
||||||
@string.Format("{0}({1})", d.sstime.Value.Day, d.sstime.Value.ToString("ddd", System.Globalization.CultureInfo.CreateSpecificCulture("ko-KR")))
|
@string.Format("{0}({1})", d.sstime.Value.Day, d.sstime.Value.ToString("ddd", System.Globalization.CultureInfo.CreateSpecificCulture("ko-KR")))
|
||||||
~
|
~
|
||||||
@string.Format("{0}({1})", d.setime.Value.Day, d.setime.Value.ToString("ddd", System.Globalization.CultureInfo.CreateSpecificCulture("ko-KR")))
|
@string.Format("{0}({1})", d.setime.Value.Day, d.setime.Value.ToString("ddd", System.Globalization.CultureInfo.CreateSpecificCulture("ko-KR")))
|
||||||
</h4>
|
</h4>
|
||||||
<div>
|
<div>
|
||||||
<h6 style="@((DateTime.Now < d.rstime.Value || DateTime.Now >= d.retime.Value) ? "color:#888;" : "")">
|
<h6 style="cursor:pointer; @((DateTime.Now < d.rstime.Value || DateTime.Now >= d.retime.Value) ? "color:#888;" : "")">
|
||||||
@if (d.cshape == 1)
|
@if (d.cshape == 1)
|
||||||
{
|
{
|
||||||
<span class="blu" style="@((DateTime.Now < d.rstime.Value || DateTime.Now >= d.retime.Value) ? "color:#888;" : "")">[교육장교육]</span>
|
<span class="blu" style="@((DateTime.Now < d.rstime.Value || DateTime.Now >= d.retime.Value) ? "color:#888;" : "")">[교육장교육]</span>
|
||||||
|
|
@ -59,7 +50,7 @@
|
||||||
{
|
{
|
||||||
<span class="blu" style="@((DateTime.Now < d.rstime.Value || DateTime.Now >= d.retime.Value) ? "color:#888;" : "")">[혼합교육]</span>
|
<span class="blu" style="@((DateTime.Now < d.rstime.Value || DateTime.Now >= d.retime.Value) ? "color:#888;" : "")">[혼합교육]</span>
|
||||||
}
|
}
|
||||||
@d.cname
|
<a href="#" onclick="javascript:openIntro(@d.cmno);">@d.cname</a>
|
||||||
</h6>
|
</h6>
|
||||||
</div>
|
</div>
|
||||||
@if (DateTime.Now >= d.rstime.Value && DateTime.Now < d.retime.Value)
|
@if (DateTime.Now >= d.rstime.Value && DateTime.Now < d.retime.Value)
|
||||||
|
|
@ -80,21 +71,49 @@
|
||||||
}
|
}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@*<tr class="@(!(DateTime.Now >= d.rstime.Value && DateTime.Now < d.retime.Value) ? "disable" : "")">
|
|
||||||
<th style="@((DateTime.Now >= d.rstime.Value && DateTime.Now < d.retime.Value) ? "style=font-weight:600; color:#00b1ed;" : "")">@string.Format("{0}({1})", d.sstime.Value.Day, d.sstime.Value.ToString("ddd", System.Globalization.CultureInfo.CreateSpecificCulture("ko-KR")))</th>
|
|
||||||
<td>
|
|
||||||
<a href="#" onclick="godetail(@(!(DateTime.Now >= d.rstime.Value && DateTime.Now < d.retime.Value) ? 0 : d.cmno))" style="@(!(DateTime.Now >= d.rstime.Value && DateTime.Now < d.retime.Value) ? "cursor: default" : "")">
|
|
||||||
<p><span class="grn" style="@(d.isrefund==0 ? "display:none;":"")">환급</span><span>[@d.cgname]</span> @(d.cname)(@(d.studyplacename)) (@(d.studytime)시간)</p>
|
|
||||||
<p>회원 : @d.infee.ToString("#,0")원 비회원 : @d.outfee.ToString("#,0")원</p>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>*@
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
<form id="thisform" action="/Course/Offs" method="get">
|
|
||||||
@Html.HiddenFor(m => m.cshape)
|
<div class="clsPop" id="divIntro" style="display:none">
|
||||||
@Html.HiddenFor(m => m.previewname)
|
<div>
|
||||||
|
<div>
|
||||||
|
<div class="clsPopWrap">
|
||||||
|
<div class="clsPopTitle">
|
||||||
|
<h5>강좌소개</h5>
|
||||||
|
<a href="#" onclick="javascript: closeIntro();"></a>
|
||||||
|
</div>
|
||||||
|
<div class="clsPopCont">
|
||||||
|
<ul class="smtList pop">
|
||||||
|
<li>
|
||||||
|
<div class="smtlCont">
|
||||||
|
<h5><span id="spnCmTitle"></span></h5>
|
||||||
|
<div class="gry">
|
||||||
|
<p>기술인분류 : <span id="spnTypeMan"></span></p>
|
||||||
|
<p>교육목적 : <span id="spnTypeEdu"></span></p>
|
||||||
|
<p>현재등급 : <span id="spnTypeGrade"></span></p>
|
||||||
|
<p>직무분야 : <span id="spnTypeJob"></span></p>
|
||||||
|
<p>인정시간 : <span class="sky"><span id="spnCmStudyHour"></span></span>시간</p>
|
||||||
|
<p>수료기준 : 진도 <span id="spnCmAttend"></span>%, 시험 <span id="spnCmFinal"></span>%</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<dl class="fairIntro">
|
||||||
|
<dt>강사정보</dt>
|
||||||
|
<dd><span id="spnCmUsername"></span></dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="fairIntro">
|
||||||
|
<dt>강좌소개</dt>
|
||||||
|
<dd><span id="spnCmIntroHtml"></span></dd>
|
||||||
|
</dl>
|
||||||
|
</div><!-- clsPopCont -->
|
||||||
|
</div><!-- clsPopWrap -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form id="smartSearchForm" method="post">
|
||||||
@Html.HiddenFor(m => m.cmno)
|
@Html.HiddenFor(m => m.cmno)
|
||||||
</form>
|
</form>
|
||||||
<script type="text/javascript" src="/js/sly.min.js"></script>
|
<script type="text/javascript" src="/js/sly.min.js"></script>
|
||||||
|
|
@ -131,15 +150,34 @@
|
||||||
$(".offDesc").find("a").attr("class", "current");
|
$(".offDesc").find("a").attr("class", "current");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function gothis(cshape) {
|
|
||||||
setv("cgcode", cgcode);
|
function openIntro(cmno) {
|
||||||
$("#thisform").submit();
|
$("#divIntro").show();
|
||||||
|
capp("/focommon/getcmuser", { cmno: cmno }, "renderCm");
|
||||||
}
|
}
|
||||||
function godetail(cmno) {
|
function renderCm() {
|
||||||
if (cmno > 0) {
|
//var cmkind;
|
||||||
setv("cmno", cmno);
|
//cmkind = typeman + " | " + typeedu + " | " + typegrade + " | " + typejob;
|
||||||
$("#thisform").attr("action", "/Course/OffDetail");
|
//if ($("#stringval").val() == "1") {
|
||||||
submit("thisform");
|
// cmkind = $("#stringval3").find("option:selected").text();
|
||||||
|
//}
|
||||||
|
|
||||||
|
$.each(capResult.obj, function (i, d) {
|
||||||
|
$("#spnCmTitle").text(d.text);
|
||||||
|
$("#spnTypeMan").text(d.typemans);
|
||||||
|
$("#spnTypeEdu").text(d.typeedus);
|
||||||
|
$("#spnTypeGrade").text(d.typegrades);
|
||||||
|
$("#spnTypeJob").text(d.typejobs);
|
||||||
|
$("#spnCmStudyHour").text(d.studytime);
|
||||||
|
$("#spnCmAttend").text(d.attendcut);
|
||||||
|
$("#spnCmFinal").text(d.finalcut);
|
||||||
|
$("#spnCmUsername").text(d.username);
|
||||||
|
if (d.introhtml != null && d.introhtml != "" && d.introhtml != undefined) {
|
||||||
|
$("#spnCmIntroHtml").text(d.introhtml.replace(/(<([^>]+)>)/ig, ""));
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function closeIntro() {
|
||||||
|
$("#divIntro").hide();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -2,15 +2,28 @@
|
||||||
@{
|
@{
|
||||||
|
|
||||||
}
|
}
|
||||||
<div class="brdSch">
|
<style>
|
||||||
|
.brdSch .submit {
|
||||||
|
display: block;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
border: none;
|
||||||
|
text-indent: -9999px;
|
||||||
|
background: #3a3a3a url(../../img/online/search_ico.png)no-repeat center center;
|
||||||
|
background-size: 50px auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@*<div class="brdSch">
|
||||||
<form action="/Course/@Model.viewname2" method="get" id="findform" onsubmit="return findme()">
|
<form action="/Course/@Model.viewname2" method="get" id="findform" onsubmit="return findme()">
|
||||||
<div>
|
<div>
|
||||||
<input type="text" name="cname" id="cname" placeholder="교육과정명을 입력하세요." value="@Model.cname" />
|
<input type="text" name="searchCname" id="searchCname" placeholder="교육과정명을 입력하세요." value="@Model.cname" />
|
||||||
<input type="hidden" name="pcgcode" value="@Model.pcgcode" />
|
<input type="button" class="submit" value="검색" onclick="javascript: search();"/>
|
||||||
<input type="submit" value="검색">
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>*@
|
||||||
@Html.Partial(Model.viewname, Model)
|
@Html.Partial(Model.viewname, Model)
|
||||||
@section scriptsHeader{
|
@section scriptsHeader{
|
||||||
|
|
||||||
|
|
@ -18,12 +31,19 @@
|
||||||
@section scripts{
|
@section scripts{
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("#cname").on("keydown", function (e) {
|
$("#searchCname").on("keydown", function (e) {
|
||||||
if (e.keyCode == 13) {
|
if (e.keyCode == 13) {
|
||||||
$("#findform").submit();
|
var cname = $("#searchCname").val();
|
||||||
|
setv("cname", cname);
|
||||||
|
$("#thisform").submit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
function search() {
|
||||||
|
var cname = $("#searchCname").val();
|
||||||
|
setv("cname", cname);
|
||||||
|
$("#thisform").submit();
|
||||||
|
}
|
||||||
function findme() {
|
function findme() {
|
||||||
//if ($.trim($("#cname").val()) == '') {
|
//if ($.trim($("#cname").val()) == '') {
|
||||||
// msg("교육과정명을 입력해주세요.");
|
// msg("교육과정명을 입력해주세요.");
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,9 @@
|
||||||
$("#spnCmAttend").text(d.attendcut);
|
$("#spnCmAttend").text(d.attendcut);
|
||||||
$("#spnCmFinal").text(d.finalcut);
|
$("#spnCmFinal").text(d.finalcut);
|
||||||
$("#spnCmUsername").text(d.username);
|
$("#spnCmUsername").text(d.username);
|
||||||
|
if (d.introhtml != null && d.introhtml != "" && d.introhtml != undefined) {
|
||||||
$("#spnCmIntroHtml").text(d.introhtml.replace(/(<([^>]+)>)/ig, ""));
|
$("#spnCmIntroHtml").text(d.introhtml.replace(/(<([^>]+)>)/ig, ""));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function closeIntro() {
|
function closeIntro() {
|
||||||
|
|
|
||||||
|
|
@ -406,18 +406,22 @@ namespace NP.Model
|
||||||
/// 기술인분류
|
/// 기술인분류
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public String typeman { get; set; }
|
public String typeman { get; set; }
|
||||||
|
public String typemans { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 교육목적
|
/// 교육목적
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public String typeedu { get; set; }
|
public String typeedu { get; set; }
|
||||||
|
public String typeedus { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 등급
|
/// 등급
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public String typegrade { get; set; }
|
public String typegrade { get; set; }
|
||||||
|
public String typegrades { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 직무분야
|
/// 직무분야
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public String typejob { get; set; }
|
public String typejob { get; set; }
|
||||||
|
public String typejobs { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 집합교육출석필수
|
/// 집합교육출석필수
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ namespace NP.Model
|
||||||
public String cgcode { get; set; }
|
public String cgcode { get; set; }
|
||||||
public String cname { get; set; }
|
public String cname { get; set; }
|
||||||
public String cshape { get; set; }
|
public String cshape { get; set; }
|
||||||
|
public String month { get; set; }
|
||||||
public CM CM { get; set; }
|
public CM CM { get; set; }
|
||||||
public IList<CM> CMs { get; set; }
|
public IList<CM> CMs { get; set; }
|
||||||
public IList<CM> CMsEtc { get; set; }
|
public IList<CM> CMsEtc { get; set; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue