From df7d796102a4a95925a30a37d941ad1a0fde0d94 Mon Sep 17 00:00:00 2001 From: kdh0120 Date: Tue, 16 Nov 2021 00:59:17 +0000 Subject: [PATCH] =?UTF-8?q?<=EA=B8=B0=EB=8A=A5=EA=B0=9C=EC=84=A0>=20?= =?UTF-8?q?=ED=86=B5=ED=95=A9=ED=85=8C=EC=8A=A4=ED=8A=B8=EB=AA=A9=EB=A1=9D?= =?UTF-8?q?=20.=20544=20=EA=B5=90=EC=9C=A1=EC=8B=A0=EC=B2=AD=EC=8B=9C=20?= =?UTF-8?q?=ED=9A=8C=EC=82=AC=EC=A0=95=EB=B3=B4=20=ED=99=95=EC=9D=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EC=9D=BC=EB=B6=80(=EB=8B=B4=EB=8B=B9?= =?UTF-8?q?=EC=9E=90=EC=84=B1=EB=AA=85,=20=EB=8B=B4=EB=8B=B9=EC=9E=90?= =?UTF-8?q?=EC=97=B0=EB=9D=BD=EC=B2=98,=20=EA=B3=84=EC=82=B0=EC=84=9C?= =?UTF-8?q?=EB=B0=9B=EC=9D=84=EC=9D=B4=EB=A9=94=EC=9D=BC)=201.=20=EA=B3=A0?= =?UTF-8?q?=EA=B0=9D=EC=82=AC=EC=A0=95=EB=B3=B4=20=EB=B6=88=EB=9F=AC?= =?UTF-8?q?=EC=98=A4=EA=B8=B0=20=EC=9D=BC=EB=B6=80=20=EC=A0=9C=EC=99=B8=20?= =?UTF-8?q?2.=20=EA=B5=90=EC=9C=A1=EC=8B=A0=EC=B2=AD=EC=8B=9C=20=EA=B3=A0?= =?UTF-8?q?=EA=B0=9D=EC=82=AC=20=EC=A0=95=EB=B3=B4=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=EC=9D=BC=EB=B6=80=20=EC=A0=9C=EC=99=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dao/MyBatis/Maps/CM.xml | 6 ++-- FO/Controllers/CourseController.cs | 46 +++++++++++++++++++++--------- FO/Views/Course/ApplyEdu.cshtml | 16 +++++------ Model/PPLog.cs | 7 +++++ 4 files changed, 50 insertions(+), 25 deletions(-) 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; }