diff --git a/Dao/MyBatis/Maps/CM.xml b/Dao/MyBatis/Maps/CM.xml index bf2aeab..69fca83 100644 --- a/Dao/MyBatis/Maps/CM.xml +++ b/Dao/MyBatis/Maps/CM.xml @@ -1916,5 +1916,21 @@ ,cmisno =case when #cmisno# is not null then #cmisno# else cmisno end where lectno=#lectno# + \ No newline at end of file diff --git a/FO/Controllers/CourseController.cs b/FO/Controllers/CourseController.cs index 3888066..8313256 100644 --- a/FO/Controllers/CourseController.cs +++ b/FO/Controllers/CourseController.cs @@ -269,8 +269,10 @@ namespace NP.FO.Controllers } public ActionResult Offs(VMCourse vm) { - vm.pcgcode = vm.pcgcode ?? OffCode; - vm.CMs = Dao.Get("cm.cms.forbuy", new System.Collections.Hashtable() { { "pcgcode", vm.pcgcode }, { "cgcode", vm.cgcode }, { "userno", SUserInfo.UserNo }, { "year", DateTime.Now.Year }, { "contents", vm.Contents } }); + //vm.pcgcode = vm.pcgcode ?? OffCode; + //vm.CMs = Dao.Get("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.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.viewname2 = vm.viewname2 ?? "OffSearch"; vm.viewname3 = ""; diff --git a/FO/Views/Course/OffList.cshtml b/FO/Views/Course/OffList.cshtml index ffc9746..1102361 100644 --- a/FO/Views/Course/OffList.cshtml +++ b/FO/Views/Course/OffList.cshtml @@ -3,15 +3,10 @@ Layout = null; }
- @(Model.cgcode == "Off001"?"단과": Model.cgcode == "Off002" ? "종합연수" : Model.cgcode == "Off003" ? "전문연구":"전체")
@@ -30,46 +25,80 @@
  • 12월
  • +
    -

    ※ 강좌명 선택시 상세정보를 확인할 수 있습니다.

    - 전체일정 보기 +
      +
    • 전체
    • + @foreach (var t in Model.ComCodes.Where(w => w.cgroup.ToString() == "studyplace")) + { +
    • @t.cname 교육장
    • + } +
    + 올해일정 조회
    @foreach (var m in Model.CMs.Select(s => s.sstime.Value.Month).Distinct()) { -
    -
    @(m)월 교육일정
    - - @foreach (var d in Model.CMs.Where(w => w.sstime.Value.Month == m)) - { - - - - - } -
    @string.Format("{0}({1})", d.sstime.Value.Day, d.sstime.Value.ToString("ddd", System.Globalization.CultureInfo.CreateSpecificCulture("ko-KR"))) - -

    환급[@d.cgname] @(d.cname)(@(d.studyplacename)) (@(d.studytime)시간)

    -

    회원 : @d.infee.ToString("#,0")원 비회원 : @d.outfee.ToString("#,0")원

    -
    -
    -
    +
    +
    @(m)월 교육일정
    + @foreach (var d in Model.CMs.Where(w => w.sstime.Value.Month == m)) + { +
      +
    • +

      + @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"))) +

      +
      +
      + @if (d.cshape == 1) + { + [교육장교육] + } + else + { + [혼합교육] + } + @d.cname +
      +
      + @if (DateTime.Now >= d.rstime.Value && DateTime.Now < d.retime.Value) + { + if (d.quota - d.lectcnt <= 0) + { + 대기접수 + } + else + { + 신청가능 + } + } + else + { + 종료 + + } +
    • +
    + @* + @string.Format("{0}({1})", d.sstime.Value.Day, d.sstime.Value.ToString("ddd", System.Globalization.CultureInfo.CreateSpecificCulture("ko-KR"))) + + +

    환급[@d.cgname] @(d.cname)(@(d.studyplacename)) (@(d.studytime)시간)

    +

    회원 : @d.infee.ToString("#,0")원 비회원 : @d.outfee.ToString("#,0")원

    +
    + + *@ + } +
    }
    - @Html.HiddenFor(m => m.cgcode) + @Html.HiddenFor(m => m.cshape) @Html.HiddenFor(m => m.previewname) @Html.HiddenFor(m => m.cmno)