//선불카드 신청 public async void CmdCardRequest() { try { alert = new Alert(Localization.Resource.Common_Alert_1); alert.ShowDialog(); return; if (CardReqList.Where(w => w.status == "01").Count() + CardReqList.Where(w => w.status == "02").Count() + CardReqList.Where(w => w.status == "03").Count() + CardReqList.Where(w => w.status == "04").Count() + CardReqList.Where(w => w.status == "05").Count() >= 1) { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_9); alert.ShowDialog(); return; } IsBusy = true; //타계정 선불카드 미리 체크. using (RequestCardCheckModel req = new RequestCardCheckModel()) { req.userMobile = userPhoneNumber; req.userNm = userNm; using (ResponseCardCheckModel res = await WebApiLib.AsyncCall <ResponseCardCheckModel, RequestCardCheckModel>(req)) { if (res.resultStrCode == "000") { if (res.data.failCd == "989") { alert = new Alert(Localization.Resource.CertifyMyPage_Alert_3); alert.ShowDialog(); return; } else if (res.data.failCd == "987") { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_17); alert.ShowDialog(); return; } } } } if (!userCountry.Equals("82")) { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_13); alert.ShowDialog(); return; } else if (string.IsNullOrWhiteSpace(userPost)) { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_1); alert.ShowDialog(); return; } else if (string.IsNullOrWhiteSpace(userAddr1)) { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_2); alert.ShowDialog(); return; } else if (string.IsNullOrWhiteSpace(userAddr2)) { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_3); alert.ShowDialog(); return; } else if (string.IsNullOrWhiteSpace(userBirthDay.Trim())) { alert = new Alert(Localization.Resource.CertifyMyPage_Alert_1); alert.ShowDialog(); return; } else if (!userBirthDay.Length.Equals(8)) { alert = new Alert(Localization.Resource.CertifyMyPage_Alert_2); alert.ShowDialog(); return; } else if (!BirthDayCheck()) { alert = new Alert(Localization.Resource.CertifyMyPage_Alert_2); alert.ShowDialog(); return; } else if (!AdultCheck()) { alert = new Alert(Localization.Resource.MemberInfo_Pop_4); alert.ShowDialog(); return; } else if (string.IsNullOrWhiteSpace(userPhoneNumber.Trim())) { alert = new Alert(Localization.Resource.CertifyMyPage_Alert_3); alert.ShowDialog(); return; } else if (userPhoneOriNumber != userPhoneNumber) { int phoneCheck = 0; using (RequestPhoneNumberCheckModel req = new RequestPhoneNumberCheckModel()) { req.userMobile = userPhoneNumber.Trim(); using (ResponsePhoneNumberCheckModel res = await WebApiLib.AsyncCall <ResponsePhoneNumberCheckModel, RequestPhoneNumberCheckModel>(req)) { if (res.resultStrCode == "000") { phoneCheck = res.data.result; // 0이면 중복아님, 1이면 중복 if (phoneCheck.Equals(1)) { alert = new Alert(Localization.Resource.MemberInfo_Pop_5); alert.ShowDialog(); return; } } } } } string alertMsg = string.Empty; if (bOnline) { alertMsg = Localization.Resource.RechargeDepositWithdraw_Card_Pop_18 + "\n" + Localization.Resource.RechargeDepositWithdraw_Card_Pop_21; } else if (bOffline) { alertMsg = Localization.Resource.RechargeDepositWithdraw_Card_Pop_18 + "\n" + Localization.Resource.RechargeDepositWithdraw_Card_Pop_19 + "\n" + Localization.Resource.RechargeDepositWithdraw_Card_Pop_20; } alert = new Alert(alertMsg, Alert.ButtonType.YesNo, 400, 165); if (alert.ShowDialog() == true) { //회원정보 저장 using (RequestUserInsUdtModel req = new RequestUserInsUdtModel()) { req.userEmail = userEmail; req.birthDay = userBirthDay; req.userMobile = userPhoneNumber.Replace("-", ""); req.regIp = MainViewModel.LoginDataModel.regIp; using (ResponseUserInsUdtModel res = await WebApiLib.AsyncCall <ResponseUserInsUdtModel, RequestUserInsUdtModel>(req)) { if (res.resultStrCode == "000") { //카드 신청 using (RequestCardReqModel req2 = new RequestCardReqModel()) { string payMtd = string.Empty; req2.userEmail = userEmail; req2.postCd = userPost; req2.adrs = userAddr1; req2.dtlAdrs = userAddr2; req2.amount = cardReqPrc; if (bOnline) { if (bCardPayment) { req2.inMthCd = "3"; } else { req2.inMthCd = "4"; } req2.sendMthCd = "2"; } else if (bOffline) { req2.inMthCd = "2"; req2.sendMthCd = "1"; } req2.reqType = "1"; //온라인 고정 req2.userMobile = userPhoneNumber; req2.userNm = userNm; using (ResponseCardReqModel res2 = await WebApiLib.AsyncCall <ResponseCardReqModel, RequestCardReqModel>(req2)) { if (res.resultStrCode == "000") { string resResult = res2.data.failCd; if (resResult.Equals("999")) { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_4); alert.ShowDialog(); } else if (resResult.Equals("998")) { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_5); alert.ShowDialog(); } else if (resResult.Equals("997")) { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_6); alert.ShowDialog(); } else if (resResult.Equals("996")) { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_7); alert.ShowDialog(); } else if (resResult.Equals("995")) { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_8); alert.ShowDialog(); } else if (resResult.Equals("993")) { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_9); alert.ShowDialog(); } else if (resResult.Equals("987")) { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_17); alert.ShowDialog(); } else { if (bOnline) { if (bCardPayment) { payMtd = "3"; } else { payMtd = "4"; } DanalPay dp = new DanalPay(res2.data.orderId, userPhoneNumber.Replace("-", ""), payMtd); dp.WindowStartupLocation = WindowStartupLocation.CenterScreen; if (dp.ShowDialog() == false) { using (RequestGetCardStatusModel req3 = new RequestGetCardStatusModel()) { req3.orderId = res2.data.orderId; using (ResponseGetCardStatusModel res3 = await WebApiLib.AsyncCall <ResponseGetCardStatusModel, RequestGetCardStatusModel>(req3)) { if (res3.resultStrCode == "000") { string status = res3.data.status; if (status.Equals("07")) { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_4_3_8); alert.ShowDialog(); } else { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_10); alert.ShowDialog(); } } } } } } else { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_10); alert.ShowDialog(); } GetUserInfo(); bOnline = true; CmdSendCard(); GetCardRequestList(); } IsBusy = false; } } } } } } } } catch (Exception ex) { SysLog.Error("Message[{0}], StackTrace[{1}]", ex.Message, ex.StackTrace); } finally { IsBusy = false; } }
//카드 등록 URL public void CmdCardRegedit() { try { //alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_15); //alert.ShowDialog(); //return; if (CardReqList != null) { if (CardReqList.Where(w => w.status == "01").Count() + CardReqList.Where(w => w.status == "02").Count() > 0) { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_16); alert.ShowDialog(); return; } //발송완료 상태가 1개라도 있으면 if (CardReqList.Where(w => w.status == "03").Count() > 0) { //등록완료가 1개 이상이면 if (CardReqList.Where(w => w.status == "04").Count() >= 1) { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_9); alert.ShowDialog(); return; } } //발송완료 상태가 1개라도 있으면 if (CardReqList.Where(w => w.status == "03").Count() > 0) { //등록완료나 카드해재 기록이 있으면 카드추가등록 if (CardReqList.Where(w => w.status == "04").Count() > 0 || CardReqList.Where(w => w.status == "99").Count() > 0) { ProcessStartInfo info = new ProcessStartInfo(); info.FileName = "iexplore.exe"; info.UseShellExecute = true; info.WindowStyle = ProcessWindowStyle.Maximized; info.CreateNoWindow = true; info.Arguments = "http://moacard.joy365.kr/card_addLogin.asp?uid=" + MainViewModel.LoginDataModel.userEmail; Process process = new Process(); Process.Start(info); } //없으면 신규가입 및 카드등록 else { ProcessStartInfo info = new ProcessStartInfo(); info.FileName = "iexplore.exe"; info.UseShellExecute = true; info.WindowStyle = ProcessWindowStyle.Maximized; info.CreateNoWindow = true; info.Arguments = "http://moacard.joy365.kr/Info.asp?Uid=" + MainViewModel.LoginDataModel.userEmail; Process process = new Process(); Process.Start(info); } } else { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_14, 330); alert.ShowDialog(); } } else { alert = new Alert(Localization.Resource.RechargeDepositWithdraw_Card_Pop_14, 330); alert.ShowDialog(); } } catch (Exception ex) { SysLog.Error("Message[{0}], StackTrace[{1}]", ex.Message, ex.StackTrace); } }