From 6f234a18ac8ef9323f0c43ac01566e48c8b8112e Mon Sep 17 00:00:00 2001 From: iyak Date: Fri, 24 Jan 2025 06:41:39 +0000 Subject: [PATCH] =?UTF-8?q?=EC=8B=9C=ED=97=98=EC=9D=91=EC=8B=9C=20?= =?UTF-8?q?=EB=AC=B8=EA=B5=AC=20=EC=88=98=EC=A0=95=20=EB=B0=8F=20=ED=86=A0?= =?UTF-8?q?=EC=8A=A4=20=EB=8F=84=EB=A9=94=EC=9D=B8=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Base/Controller/BasePartialController.cs | 32 +++++++------ FO/Views/CRoom/Estimation.cshtml | 57 +++++++++++------------- FO/Views/Course/XpayREQ.cshtml | 6 +-- 3 files changed, 49 insertions(+), 46 deletions(-) diff --git a/Base/Controller/BasePartialController.cs b/Base/Controller/BasePartialController.cs index 1ad403f..3e70ade 100644 --- a/Base/Controller/BasePartialController.cs +++ b/Base/Controller/BasePartialController.cs @@ -1069,48 +1069,54 @@ namespace NP.Base /// /// /// - [Obsolete] + [Obsolete] protected int SendEmail(String smtphost, int smtpport, String smtpid, String smtppw, int SendType, String rcvEmail, String sdEmail, String sdName, String title, String Html, String strFile = null, string bans = "") { - + System.Web.Mail.MailMessage mail = null; switch (SendType) { case 1: break; - default: break; - } + default: + break; + } String result = rcvEmail; try { - var mail = new System.Web.Mail.MailMessage(); + mail = new System.Web.Mail.MailMessage(); mail.Subject = title; - mail.From = "donetreplay@cte.or.kr"; // sdEmail; //보내는 사람 설정 - mail.To = rcvEmail; // 받는 사람 설정 + mail.From = sdEmail; //보내는 사람 설정 + mail.To = rcvEmail; // 받는 사람 설정 mail.BodyEncoding = System.Text.Encoding.UTF8; mail.BodyFormat = MailFormat.Html; - if ("" != bans) { Html = Html.Replace("^ban0^", bans.Split(':')[0]).Replace("^ban1^", bans.Split(':')[1]); } - var files = new NP.Model.VMBase() { }; mail.Body = Html.Replace("src=\"" + files.Files + "/Editor", "src=\"" + GetConfig("fronturl") + "/Files/Editor"); - if (!string.IsNullOrEmpty(strFile)) { System.Web.Mail.MailAttachment attachment;//첨부파일 만들기 attachment = new System.Web.Mail.MailAttachment(strFile);//첨부파일 붙이기 mail.Attachments.Add(attachment);//첨부파일 붙이기 } - + + int cdoBasic = 1; mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", true); mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", smtpport); - mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1); + mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", cdoBasic); mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", smtpid); mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", smtppw); SmtpMail.SmtpServer = smtphost; - SmtpMail.Send(mail); + SmtpMail.Send(mail); + + //using (System.Net.Mail.SmtpClient SmtpServer = new System.Net.Mail.SmtpClient(smtphost, smtpport)) + //{ + // SmtpServer.Credentials = new System.Net.NetworkCredential(smtpid, smtppw); + // //SmtpServer.EnableSsl = true; + // SmtpServer.Send(mail); + //} } catch (Exception ex) { diff --git a/FO/Views/CRoom/Estimation.cshtml b/FO/Views/CRoom/Estimation.cshtml index 3e26c60..ad53b29 100644 --- a/FO/Views/CRoom/Estimation.cshtml +++ b/FO/Views/CRoom/Estimation.cshtml @@ -15,14 +15,18 @@ .SingleOrDefault(); // 예외처리 과정코드들? - List allowLectNos = Array - .ConvertAll("104069,102553,105325,104402,106226,62683,104419".Split(','), long.Parse) - .ToList(); + //List allowLectNos = Array + // .ConvertAll("104069,102553,105325,104402,106226,62683,104419".Split(','), long.Parse) + // .ToList(); + //ViewBag.exCheck = allowLectNos.IndexOf(Model.croomlectno) > -1 ? true : false; // 현재 진도율 int currentProgresRate = Model.Datas.Where(w => w.dtype == -1).FirstOrDefault().intval5; + // 시험응시가능여부 + bool isExCheck = ViewBag.exCheck != null ? (bool)ViewBag.exCheck : false; + }
  • 전체
  • @@ -33,19 +37,19 @@ - + @foreach (var d in Model.Datas.Where(w => w.dtype > -1)) { - ViewBag.exCheck = allowLectNos.IndexOf(Model.croomlectno) > -1 ? true : false; + - @* // 시험 응시 버튼 /* @@ -92,11 +95,9 @@ @if (d.dtype == 1) { // 최총 평가일 때 - if ( - ((currentProgresRate >= d.intval2) && IsDateInRange(d.time2, d.time)) || - ViewBag.exCheck || - dType1CmStudyTime == 16 - ) + if ((currentProgresRate >= d.intval2) // 조건 ① + && IsDateInRange(d.time2, d.time) // 조건 ② + && (ViewBag.exCheck || dType1CmStudyTime == 16)) // 조건 ③ 또는 조건 ④ <-- 요 부분을 다시 물어보자 { - } } else @@ -126,16 +127,13 @@ = d.intval2 ? "02" : "01")">@(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >= d.intval2 ? "[참여가능]" : "[참여불가]") - } } @* - // 하단 문구 - // - 16시간 교육X or 신청일이 2024-08-19 이후 + // 하단 문구 *@ - @if (Model.Datas.Where(w => w.dtype > -1).Count() < 1) { @@ -145,12 +143,16 @@ } else - { + {
    @* // 당구장 설명 /* - ① 16시간 교육O or 신청일이 2024-08-19 이전: 참여조건 표기 + ① 16시간 교육O or 신청일이 2024-08-19 이전: 참여조건 표기 ② 16시간 교육X or 신청일이 2024-08-19 이후: ※ 집체교육일에 교육장에서 평가진행 // 3월이후에 아래 내용으로 복원한다 (dtype = 1 안에 if 문 조정) @@ -56,9 +60,9 @@ @(d.dtype == 0 ? "진행평가" : d.dtype == 1 ? "최종평가" : d.dtype == 2 ? "과제" : d.dtype == 3 ? "토론" : "") @d.strval - @if (d.dtype == 1) - { // 최종평가 - if (d.intval6 == 16 && d.time2 < Convert.ToDateTime("2024-08-19 00:00:00")) + @if (d.dtype == 1) + { // 최종평가 + if (d.intval6 == 16 || (d.time2 < Convert.ToDateTime("2024-08-19"))) {

    참여조건 : 진도율 @(d.intval2)% 이상 / 집체교육 참석일 (@d.time.ToShortDateString()) 전 까지

    } @@ -73,7 +77,6 @@ }
    @@ -113,10 +114,10 @@ + = d.intval2 ? "02" : "01")">@(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >= d.intval2 ? "[참여가능]" : "[참여불가]")
    @if (Model.tabidx == 0 || Model.tabidx == 1) { // 전체, 시험 탭 - if (dType1CmStudyTime != 16 && dType1LectSDate > Convert.ToDateTime("2024-08-19 23:59:59")) + if (dType1CmStudyTime == 16 || dType1LectSDate < Convert.ToDateTime("2024-08-19")) + { + // 기준이 애매해서 if와 else를 바꿈 (임시사용) + } + else {

    ※ 24년 8월 22일 부터 건설기술진흥법 변경으로 집체교육 당일 교육장에서 시험평가가 진행됩니다.

    } @@ -171,16 +173,13 @@ @Html.HiddenFor(m => m.estno) -@section scriptsHeader{ - -} +@section scriptsHeader{ } @section scripts{ + } else { //서비스일 경우 - + }
    결제 진행중입니다. 잠시만 기다려주세요.
    @@ -59,4 +59,4 @@ else } } - + \ No newline at end of file