diff --git a/Dao/MyBatis/Maps/CM.xml b/Dao/MyBatis/Maps/CM.xml
index efd9427..4563543 100644
--- a/Dao/MyBatis/Maps/CM.xml
+++ b/Dao/MyBatis/Maps/CM.xml
@@ -2017,9 +2017,9 @@
,bkind =#bkind#
,fgnobno=#fgnobno#
,eino=#eino#
- ,mname=#mname#
- ,mphone =case when #mphone# is not null then HEX(AES_ENCRYPT(#mphone#, )) else mphone end
- ,taxemail =case when #taxemail# is not null then HEX(AES_ENCRYPT(#taxemail#, )) else taxemail end
+
+
+
where asno=#asno#
diff --git a/FO/Controllers/CourseController.cs b/FO/Controllers/CourseController.cs
index b025899..1cf2183 100644
--- a/FO/Controllers/CourseController.cs
+++ b/FO/Controllers/CourseController.cs
@@ -842,19 +842,20 @@ namespace NP.FO.Controllers
vm.Assign = Dao.Get("cm.assign.applyedu", new Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault();
if (vm.Assign != null)
{
- if (!string.IsNullOrEmpty(vm.Assign.MphoneFormat) && vm.Assign.MphoneFormat.IndexOf("-") >= 0)
- {
- string[] mphoneArr = vm.Assign.MphoneFormat.Split('-');
- vm.Assign.mphone1 = mphoneArr.Length > 0 ? mphoneArr[0] : string.Empty;
- vm.Assign.mphone2 = mphoneArr.Length > 1 ? mphoneArr[1] : string.Empty;
- vm.Assign.mphone3 = mphoneArr.Length > 2 ? mphoneArr[2] : string.Empty;
- }
- if (!string.IsNullOrEmpty(vm.Assign.taxemail) && vm.Assign.taxemail.IndexOf("@") >= 0)
- {
- string[] taxemailArr = vm.Assign.taxemail.Split('@');
- vm.Assign.taxemail1 = taxemailArr.Length > 0 ? taxemailArr[0] : string.Empty;
- vm.Assign.taxemail2 = taxemailArr.Length > 1 ? taxemailArr[1] : string.Empty;
- }
+ vm.Assign.mname = null;
+ //if (!string.IsNullOrEmpty(vm.Assign.MphoneFormat) && vm.Assign.MphoneFormat.IndexOf("-") >= 0)
+ //{
+ //string[] mphoneArr = vm.Assign.MphoneFormat.Split('-');
+ //vm.Assign.mphone1 = mphoneArr.Length > 0 ? mphoneArr[0] : string.Empty;
+ //vm.Assign.mphone2 = mphoneArr.Length > 1 ? mphoneArr[1] : string.Empty;
+ //vm.Assign.mphone3 = mphoneArr.Length > 2 ? mphoneArr[2] : string.Empty;
+ //}
+ //if (!string.IsNullOrEmpty(vm.Assign.taxemail) && vm.Assign.taxemail.IndexOf("@") >= 0)
+ //{
+ //string[] taxemailArr = vm.Assign.taxemail.Split('@');
+ //vm.Assign.taxemail1 = taxemailArr.Length > 0 ? taxemailArr[0] : string.Empty;
+ //vm.Assign.taxemail2 = taxemailArr.Length > 1 ? taxemailArr[1] : string.Empty;
+ //}
vm.FileList = new List() { };
if (vm.Assign.fgnobno != null)
{
@@ -894,7 +895,24 @@ namespace NP.FO.Controllers
if (vm.pplno != 0)
{
- vm.PPLog = Dao.Get("pay.pplogs", new Hashtable() { { "pplno", vm.pplno }, { "userno", SUserInfo.UserNo } }).FirstOrDefault();
+ vm.PPLog = Dao.Get("pay.pplogs", new Hashtable() { { "pplno", vm.pplno }, { "userno", SUserInfo.UserNo } }).FirstOrDefault();
+ if(vm.Assign != null)
+ {
+ vm.Assign.mname = vm.PPLog.mname;
+ if (!string.IsNullOrEmpty(vm.PPLog.MphoneFormat) && vm.PPLog.MphoneFormat.IndexOf("-") >= 0)
+ {
+ string[] mphoneArr = vm.PPLog.MphoneFormat.Split('-');
+ vm.Assign.mphone1 = mphoneArr.Length > 0 ? mphoneArr[0] : string.Empty;
+ vm.Assign.mphone2 = mphoneArr.Length > 1 ? mphoneArr[1] : string.Empty;
+ vm.Assign.mphone3 = mphoneArr.Length > 2 ? mphoneArr[2] : string.Empty;
+ }
+ if (!string.IsNullOrEmpty(vm.PPLog.taxemail) && vm.PPLog.taxemail.IndexOf("@") >= 0)
+ {
+ string[] taxemailArr = vm.PPLog.taxemail.Split('@');
+ vm.Assign.taxemail1 = taxemailArr.Length > 0 ? taxemailArr[0] : string.Empty;
+ vm.Assign.taxemail2 = taxemailArr.Length > 1 ? taxemailArr[1] : string.Empty;
+ }
+ }
}
return View(vm);
}
diff --git a/FO/Views/Course/ApplyEdu.cshtml b/FO/Views/Course/ApplyEdu.cshtml
index 209fb19..f1bc4b5 100644
--- a/FO/Views/Course/ApplyEdu.cshtml
+++ b/FO/Views/Course/ApplyEdu.cshtml
@@ -562,12 +562,12 @@
setv("Assign_bkind", capResult.obj.bkind);
setv("Assign_eino", capResult.obj.eino);
setv("eino", capResult.obj.eino);
- setv("Assign_mname", capResult.obj.mname);
- setv("Assign_mphone1", mphone1);
- setv("Assign_mphone2", mphone2);
- setv("Assign_mphone3", mphone3);
- setv("Assign_taxemail1", taxemail1);
- setv("Assign_taxemail2", taxemail2);
+ //setv("Assign_mname", capResult.obj.mname);
+ //setv("Assign_mphone1", mphone1);
+ //setv("Assign_mphone2", mphone2);
+ //setv("Assign_mphone3", mphone3);
+ //setv("Assign_taxemail1", taxemail1);
+ //setv("Assign_taxemail2", taxemail2);
}
}
function setScd() {
@@ -668,8 +668,8 @@
//else if (isrebate && (check("Assign_post", null, "우편번호를 등록해주세요.") || check("Assign_address1", null, "주소를 등록해주세요.") || check("Assign_address2", null, "상세주소를 등록해주세요."))) { }
//else if (isrebate && check("Assign_btype", null, "업태를 등록해주세요.")) { }
//else if (isrebate && check("Assign_bkind", null, "종목을 등록해주세요.")) { }
- //else if (isrebate && (check("Assign_taxemail1", null, "계산서받을 이메일을 등록해주세요.") || check("Assign_taxemail2", null, "계산서받을 이메일을 등록해주세요."))) { }
- //else if (isrebate && !isemail(assign_taxemail)) { focus("Assign_taxemail1"); msg("올바른 이메일주소를 입력해주세요."); }
+ else if (isrebate && (check("Assign_taxemail1", null, "계산서받을 이메일을 등록해주세요.") || check("Assign_taxemail2", null, "계산서받을 이메일을 등록해주세요."))) { }
+ else if (isrebate && !isemail(assign_taxemail)) { focus("Assign_taxemail1"); msg("올바른 이메일주소를 입력해주세요."); }
else if (isCompanyInfoCheck && (check("Assign_post", null, "우편번호를 등록해주세요.") || check("Assign_address1", null, "주소를 등록해주세요.") || check("Assign_address2", null, "상세주소를 등록해주세요."))) { }
else if (isCompanyInfoCheck && check("Assign_btype", null, "업태를 등록해주세요.")) { }
else if (isCompanyInfoCheck && check("Assign_bkind", null, "종목을 등록해주세요.")) { }
diff --git a/Model/PPLog.cs b/Model/PPLog.cs
index 1f9155d..204e988 100644
--- a/Model/PPLog.cs
+++ b/Model/PPLog.cs
@@ -39,6 +39,13 @@ namespace NP.Model
public String eino { get; set; }
public String mname { get; set; }
public String mphone { get; set; }
+ public String MphoneFormat
+ {
+ get
+ {
+ return string.IsNullOrEmpty(mphone) || mphone.Replace("-", "").Length < 10 ? (mphone ?? "") : mphone.Replace("-", "").Length == 10 ? string.Format("{0}-{1}-{2}", mphone.Replace("-", "").Substring(0, 3), mphone.Replace("-", "").Substring(3, 3), mphone.Replace("-", "").Substring(6)) : string.Format("{0}-{1}-{2}", mphone.Replace("-", "").Substring(0, 3), mphone.Replace("-", "").Substring(3, 4), mphone.Replace("-", "").Substring(7));
+ }
+ }
public String taxemail { get; set; }
public String userpno { get; set; }