시험응시 문구 수정 및 토스 도메인 변경
This commit is contained in:
parent
d5c0b04f89
commit
6f234a18ac
|
|
@ -1072,31 +1072,29 @@ namespace NP.Base
|
|||
[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;//첨부파일 만들기
|
||||
|
|
@ -1104,13 +1102,21 @@ namespace NP.Base
|
|||
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);
|
||||
|
||||
//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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,14 +15,18 @@
|
|||
.SingleOrDefault();
|
||||
|
||||
// 예외처리 과정코드들?
|
||||
List<long> allowLectNos = Array
|
||||
.ConvertAll("104069,102553,105325,104402,106226,62683,104419".Split(','), long.Parse)
|
||||
.ToList();
|
||||
//List<long> 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;
|
||||
|
||||
}
|
||||
<ul class="lctpTab col3">
|
||||
<li class="@(Model.tabidx == 0 ? "current" : "")"><a onclick="gotab(0, this)" style="@(Model.tabidx == 0 ? "cursor: default;" : "")" href="#;">전체</a></li>
|
||||
|
|
@ -33,12 +37,12 @@
|
|||
<input type="hidden" id="hdndType1StudyTime" value="@dType1CmStudyTime" />
|
||||
<input type="hidden" id="hdnlectSDate" value="@dType1LectSDate" />
|
||||
<input type="hidden" id="hdnCurrentProgresRate" value="@currentProgresRate" />
|
||||
|
||||
<input type="hidden" id="hdnExCheck" value="@isExCheck.ToString()" />
|
||||
<table>
|
||||
<tbody>
|
||||
@foreach (var d in Model.Datas.Where(w => w.dtype > -1))
|
||||
{
|
||||
ViewBag.exCheck = allowLectNos.IndexOf(Model.croomlectno) > -1 ? true : false;
|
||||
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
|
|
@ -58,7 +62,7 @@
|
|||
|
||||
@if (d.dtype == 1)
|
||||
{ // 최종평가
|
||||
if (d.intval6 == 16 && d.time2 < Convert.ToDateTime("2024-08-19 00:00:00"))
|
||||
if (d.intval6 == 16 || (d.time2 < Convert.ToDateTime("2024-08-19")))
|
||||
{
|
||||
<p>참여조건 : 진도율 @(d.intval2)% 이상 / 집체교육 참석일 (@d.time.ToShortDateString()) 전 까지</p>
|
||||
}
|
||||
|
|
@ -73,7 +77,6 @@
|
|||
}
|
||||
</th>
|
||||
|
||||
|
||||
@*
|
||||
// 시험 응시 버튼
|
||||
/*
|
||||
|
|
@ -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)) // 조건 ③ 또는 조건 ④ <-- 요 부분을 다시 물어보자
|
||||
{
|
||||
<td>
|
||||
<input type="hidden" name="cmEcondition" value="@d.intval2" />
|
||||
|
|
@ -113,10 +114,10 @@
|
|||
<input type="hidden" name="cmEcondition" value="@d.intval2" />
|
||||
<input type="hidden" name="lectSDate" value="@d.time2" />
|
||||
<input type="hidden" name="lectEDate" value="@d.time" />
|
||||
<input type="hidden" name="isDateInRange" value="@IsDateInRange(d.time2, d.time).ToString()" />
|
||||
<a href="javascript:;" onclick="msg('24년 8월 22일 부터 건설기술진흥법 변경으로 <br>집체교육 당일 교육장에서 시험평가가 진행됩니다.')"
|
||||
class="evaType@(d.intval4 == 1 ? "04" : d.intval3 == 1 ? "03" : d.intval3 == 0 && d.intval >= d.intval2 ? "02" : "01")">@(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >= d.intval2 ? "[참여가능]" : "[참여불가]")</a>
|
||||
</td>
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -126,16 +127,13 @@
|
|||
<a href="javascript:;" onclick="eva(@d.dtype, @d.intval10, @(d.intval4 == 1 ? 4 : d.intval3 == 1 ? 3 : d.intval3 == 0 && d.intval >= d.intval2 ? 2 : 1))"
|
||||
class="evaType@(d.intval4 == 1 ? "04" : d.intval3 == 1 ? "03" : d.intval3 == 0 && d.intval >= d.intval2 ? "02" : "01")">@(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >= d.intval2 ? "[참여가능]" : "[참여불가]")</a>
|
||||
</td>
|
||||
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
|
||||
@*
|
||||
// 하단 문구
|
||||
// - 16시간 교육X or 신청일이 2024-08-19 이후
|
||||
*@
|
||||
|
||||
@if (Model.Datas.Where(w => w.dtype > -1).Count() < 1)
|
||||
{
|
||||
<tr>
|
||||
|
|
@ -150,7 +148,11 @@
|
|||
<th colspan="2" style="text-align: center; font-weight: normal; height: 100px;">
|
||||
@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
|
||||
{
|
||||
<p><b>※ 24년 8월 22일 부터 건설기술진흥법 변경으로 집체교육 당일 교육장에서 시험평가가 진행됩니다.</b></p>
|
||||
}
|
||||
|
|
@ -171,16 +173,13 @@
|
|||
@Html.HiddenFor(m => m.estno)
|
||||
</form>
|
||||
|
||||
@section scriptsHeader{
|
||||
|
||||
}
|
||||
@section scriptsHeader{ }
|
||||
|
||||
@section scripts{
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
@ -216,10 +215,8 @@
|
|||
/// <returns>true/false</returns>
|
||||
public bool IsDateInRange(DateTime startDate, DateTime endDate)
|
||||
{
|
||||
// 현재일자
|
||||
DateTime currentDate = DateTime.Now;
|
||||
// 현재일자가 시작일 이상 && 종료일 이하인지 확인
|
||||
return startDate <= currentDate && currentDate <= endDate;
|
||||
return startDate <= DateTime.Now && DateTime.Now <= endDate;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
@if (ViewBag.isPayTest == "1")
|
||||
{
|
||||
//테스트일 경우
|
||||
<script language="javascript" src="https://pretest.tosspayments.com:7443/xpay/js/xpay_crossplatform.js" type="text/javascript"></script>
|
||||
<script language="javascript" src="https://xpay-sandbox.tosspayments.com/xpay/js/xpay_crossplatform.js" type="text/javascript"></script>
|
||||
}
|
||||
else
|
||||
{
|
||||
//서비스일 경우
|
||||
<script language="javascript" src="https://xpayvvip.tosspayments.com/xpay/js/xpay_crossplatform.js" type="text/javascript"></script>
|
||||
<script language="javascript" src="https://xpay.tosspayments.com/xpay/js/xpay_crossplatform.js" type="text/javascript"></script>
|
||||
}
|
||||
<br />
|
||||
<div style="border: 1px solid #ddd; color: red; font-weight: bold; font-size: 13px; text-align: center; padding: 15px;">결제 진행중입니다. 잠시만 기다려주세요.</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue