/* //#20180413 웰컴카드 신규기능 추가 start,phj //#20180413 웰컴카드 신규기능 추가 end,phj */ using System; using System.Drawing; using System.Windows.Forms; using System.Data; using Cosmos.BaseFrame; using Cosmos.UserFrame; using Cosmos.ServiceProvider; using Cosmos.Common; using Cosmos.CommonManager; using Cosmos.UI; using System.Collections; using System.Text; namespace Cosmos.Win { public partial class frmWelcomCard : frm_PayMainBack { #region Variable private SManager sManager = new SManager(); // 이 객체를 통해 업무 Service 호출 private StateServer StateObject = (StateServer)StateServer.GetInstance(); // StateObject : StateServer Object (객체) private PosStatus m_cPosStatus = new PosStatus(); // 기본정보 참조 private TranStatus m_cTrnStatus = new TranStatus(); // 거래정보 참조 private DeviceStatus m_cDevStatus = new DeviceStatus(); // 디바이스 관리 private PosOLEDevice.DelegateOlePos delegatePos; private PosOLEDevice.DelegateIcReader delegateReader; // IC리더 콜백 private IDataProcessUs m_cDataService = null; private IDataCommonUs m_cDataCommon = null; // POS 공통함수 인터페이스 private IWelcomeCard m_cWelcomeCard = null; private IPaymentExpUs m_cHappyPoint = null; private ISignPadUs m_cDeviceSignPad = null; private IICReaderUs m_cDeviceICReader = null; /// /// POS 기능키 /// private string m_sPosMenuKey; public string SetPosMenuKey { set { this.m_sPosMenuKey = value; } } /// /// 오픈위치 0: 일반, 1:영업메뉴, 2:결제화면 /// private string m_sOpenKey; public string SetOpenKey { set { this.m_sOpenKey = value; } } //#20180413 웰컴카드 신규기능 추가 start, 20180621 //기존 /// /// 자동발급위한웰컴카드번호 /// private string m_sWccCardNo; public string SetWccCardNo { set { this.m_sWccCardNo = value; } } //============================================================================================================ //해피포인트에서 조회 시 웰컴카드 번호가 안 내려왔는데 //웰컴카드 발급창으로 넘올 수 있는데 고객등록 하기위해서 해피포인트 고객등록 조회 화면을 오픈하려고 하면 //같은 폼이기 때문에 오류가 날 수 있다. 그래서 해당 경우에는 해피포인트 고객등록 조회 화면을 오픈하지 않는다. //============================================================================================================ /// /// 해피포인트 조회(고객등록) 폼 오픈여부 /// private string m_bHPAppClient_CheckYN; public string SetHPAppClient_CheckYN { set { this.m_bHPAppClient_CheckYN = value; } } //#20180413 웰컴카드 신규기능 추가 end, 20180621 /// /// 더블 클릭 방지용 /// private bool bNotDoubleClik = false; /// /// 입력구분 /// private string m_sInPutType = ""; /// /// 입력데이터 /// private string m_sInPutData = ""; /// /// 카드데이터(암호화) /// private string m_sInEncData = ""; /// /// 마스킹데이터 /// private string m_sInMaskData = ""; /// /// 통신사선택 /// private string m_sInTelecom = ""; /// /// HPC - 회원번호 /// private string m_sInHP_CustNumer = ""; /// /// HPC - 웰컴카드번호 /// private string m_sInHP_WelcomeCard = ""; /// /// 등록건에서읽어온HP데이터등록시킬건지, 조회건에서읽어온HP데이터등록시킬건지 /// string m_sReadingHPData = ""; #endregion Variable #region 생성자 & 소멸자 public frmWelcomCard() { InitializeComponent(); base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw, true); m_cPosStatus = (PosStatus)StateObject.POS; // POS 기본정보 m_cTrnStatus = (TranStatus)StateObject.TRAN; // POS 거래정보 m_cDevStatus = (DeviceStatus)StateObject.DEVICE; m_cDataService = (IDataProcessUs)sManager.InitServiceInstance(ServiceLists.ASV_DATA_PROCESS.DLL, ServiceLists.ASV_DATA_PROCESS.DATA_SERVICE); m_cDataCommon = (IDataCommonUs)sManager.InitServiceInstance(ServiceLists.ASV_DATA_PROCESS.DLL, ServiceLists.ASV_DATA_PROCESS.DATA_COMMON); m_cWelcomeCard = (IWelcomeCard)sManager.InitServiceInstance(ServiceLists.BSV_PAYMENT.DLL, ServiceLists.BSV_PAYMENT.WELCOMECARD_ISSUE); m_cHappyPoint = (IPaymentExpUs)sManager.InitServiceInstance(ServiceLists.BSV_PAYMENT.DLL, ServiceLists.BSV_PAYMENT.POINTHAPPYPOINT); m_cDeviceSignPad = (ISignPadUs)sManager.InitServiceInstance(ServiceLists.AGENT_OLEDEVICE.DLL, ServiceLists.AGENT_OLEDEVICE.DEVICE_SIGNPAD); m_cDeviceICReader = (IICReaderUs)sManager.InitServiceInstance(ServiceLists.AGENT_OLEDEVICE.DLL, ServiceLists.AGENT_OLEDEVICE.DEVICE_ICREADER); // OLE 입력 델리게이트 생성 delegatePos = new PosOLEDevice.DelegateOlePos(OnDeviceEvent); delegateReader = new PosOLEDevice.DelegateIcReader(OnIcReaderCallBack); // IC리더 콜백 } private void frmWelcomCard_Load(object sender, EventArgs e) { UserLog.WriteLogFile(UserCom.LOG_IOS, UserCom.ERROR_LEVEL, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "frmWelcomCard Load"); InitControl(); } private void frmWelcomCard_Activated(object sender, EventArgs e) { PosOLEDevice.SetEventHandle(delegatePos); } private void frmWelcomCard_Deactivate(object sender, EventArgs e) { PosOLEDevice.SetEventHandle(null); } private void frmWelcomCard_FormClosing(object sender, FormClosingEventArgs e) { // 마우스(이중클릭방지) Point nPoint = System.Windows.Forms.Cursor.Position; Cursor.Clip = new System.Drawing.Rectangle(1024, 0, 1, 1); InDataToZeroFill(); // 1: 판매화면 폼 2: 결제화면 폼 if (m_sOpenKey == "1") { FormManager.SetFormAllControlMove(this, 216, 123); } // 마우스(이중클릭방지) Cursor.Clip = Screen.PrimaryScreen.Bounds; Cursor.Position = nPoint; UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", lblTitle.Text); } #endregion 생성자 & 소멸자 #region 폼 컨트롤 초기화 /// /// 폼 컨트롤 초기화 /// private void InitControl() { try { this.Location = new Point(0, 50); this.Size = new Size(1024, 525); FormManager.SetFormAllControlFont(this, m_cPosStatus.Base.FONT); FormManager.SetTextBoxGlobalInfo(this, m_cPosStatus.Global.m_stCultureMaster.nGroupingDigits, m_cPosStatus.Global.m_stCultureMaster.strGroupingSymbol, m_cPosStatus.Global.m_stCultureMaster.nDecimalDigits, m_cPosStatus.Global.m_stCultureMaster.strDecimalSymbol); string m_sEnterThemeColor = m_cPosStatus.ScnMst.ThemeColor; if (string.IsNullOrEmpty(m_sEnterThemeColor) == false) { if (m_sEnterThemeColor.Length == 9) { padInPut.ThemeColor = m_sEnterThemeColor; } } padInPut.ClearBtnText = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0817); padInPut.SearchBtnText = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1018); padInPut.Visible = true; // 영업메뉴에서 오픈한 사이즈 if (m_sOpenKey == "1") { this.Size = new Size(788, 402); //#20181015 결제창 엑박 관련 이미지 미사용 처리 start //기존 //picBack.Image = ImageManager.GetImage(BaseCom.NxImgPath, ImageManager.POP_SIZE_S); //#20181015 결제창 엑박 관련 이미지 미사용 처리 end FormManager.SetFormAllControlMove(this, -216, -123); FormManager.MovePopUpForm(this, false, m_cPosStatus.Sale.ScreenSizeUser); //InitPayMainBack(m_cPosStatus, m_cDataCommon, m_sPosMenuKey, PosConst.MOT_MSG_TYPE.PAY_STEP_1, ""); } // 결제화면에서 오픈한 사이즈 else { this.Location = new Point(0, 50); this.Size = new Size(1024, 525); picBack.Size = new Size(1024, 525); //#20181015 결제창 엑박 관련 이미지 미사용 처리 start //기존 //picBack.Image = ImageManager.GetImage(BaseCom.NxImgPath, ImageManager.PAY_MAIN_BACKGROUND); //#20181015 결제창 엑박 관련 이미지 미사용 처리 end //InitPayMainBack(m_cPosStatus, m_cDataCommon, m_sPosMenuKey, PosConst.MOT_MSG_TYPE.PAY_STEP_3, ""); } btnExit.Image = ImageManager.GetImage(BaseCom.NxImgPath, ImageManager.BTN_CLOSE); if (btnExit.Image != null) btnExit.Text = ""; //테마색상 적용! btnEnter.BackColor = CmUtil.GetColorToString(m_cPosStatus.ScnMst.ThemeColor); btnClientRegister.BackColor = CmUtil.GetColorToString(m_cPosStatus.ScnMst.ThemeColor); // 버튼 이름 btnEnter.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1134); btnClientRegister.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1135) + "\r\n" + MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1136); // 초기화 ClearCardInfo(); // 상단 제휴사 InitFuncMobileKind(); // 기능키 - 해피앱 고객등록 if (m_sPosMenuKey == PosKey.MENU_KEY.WELCOMECARD_HPAPP_REGISTER) { lblTitle.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1133); // 해피앱고객등록 (타이틀) btnEnter.Visible = false; btnClientRegister.Visible = true; // 상단 제휴사 가리기 foreach (Control control in this.Controls) { if (control is UI.CsmFunc) { control.Visible = false; } } } // 기능키 - 웰컴카드 발급 else { lblTitle.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1131); // 웰컴카드 발급 (타이틀) btnEnter.Visible = true; btnClientRegister.Visible = true; //#20180413 웰컴카드 신규기능 추가 start, 20180621 if (m_sWccCardNo != "") { txtCardNo.Value = m_sWccCardNo; } //#20180413 웰컴카드 신규기능 추가 end, 20180621 // 상단 제휴사 표시 foreach (Control control in this.Controls) { if (control is UI.CsmFunc) { control.Visible = true; } } } btnIcCard.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0132); btnRfCard.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0580); btnPopCard.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0878); btnPinPad.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0097); // 기능 버튼 설정 체크 FormManager.SetbtnMenu(txtCardNo, m_cDevStatus.ICReader.UseYn, null, null, null, btnPinPad); btnIcCard.Visible = false; btnRfCard.Visible = false; btnPopCard.Visible = false; btnPinPad.Visible = true; // 버튼 중복 방지 bNotDoubleClik = false; // 등록건에서읽어온HP데이터등록시킬건지, 조회건에서읽어온HP데이터등록시킬건지 m_sReadingHPData = ""; // 카드번호 txtCardNo.ReadOnly = false; txtCardNo.Select(); //if (m_sWccCardNo != "") //{ // // 발급조회 // //btnProc_Click(btnEnter, null); // // m_sInPutType = PosConst.POS_VAN_MASTER.INPUT_TYPE.VAN_MOBILE_SWIP; // m_sInPutData = m_sWccCardNo; // // txtCardNo.Value = m_sInPutData; // // //if (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.NORMAL) SearchTxtInPut(sScanCode); // txtCardNo_EditBoxKeyDownEvent(txtCardNo, PosKey.MENU_KEY.ENTER); //} } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message); } } #endregion #region 제휴카드 종류 화면 표시 /// /// 제휴카드 종류 화면 표시 /// private void InitFuncMobileKind() { try { m_sInTelecom = ""; // 선택한 통신사 fncMobileKind.VisibleUpDown = false; fncMobileKind.ClearFuncButtonInfo(); // 설정된 메뉴정보 초기화 fncMobileKind.SelectedBackColor = CmUtil.GetColorToString(m_cPosStatus.ScnMst.ThemeColor); fncMobileKind.SelectedForeColor = Color.WhiteSmoke; fncMobileKind.BackColor = Color.FromArgb(159, 159, 159); fncMobileKind.BorderColor = Color.FromArgb(159, 159, 159); fncMobileKind.BorderLineSize = 1; int iPntCnt = 0; for (int i = 0; i <= 2; i++) { //#20180629 결제할인수단 마스터에서 통신사를 미사용 처리시 멤버십카드 발급시 통신사 선택 항목이 안나오는 증상 수정 start //기존 /* string sPayWayCd = "", sPayDtlCd = "", sPayDtlName = "", sPosMenuKey = ""; sPayWayCd = ItemConst.TR_ITEM_ID.MOBILE_COM_POINT; if (i == 0) { sPayDtlCd = ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_SKT; sPosMenuKey = PosKey.MENU_KEY.SKT; } else if (i == 1) { sPayDtlCd = ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KTF; sPosMenuKey = PosKey.MENU_KEY.KT; } else if (i == 2) { sPayDtlCd = ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_LGT; sPosMenuKey = PosKey.MENU_KEY.LGT; } sPayDtlName = PosMstManager.GetMstPayDc(sPayWayCd, sPayDtlCd, PosMst.MST_PAY_DC.DATA.PAY_DC_NM); // 결제수단명 */ //변경 string sPayDtlName = "", sPosMenuKey = ""; if (i == 0) { sPosMenuKey = PosKey.MENU_KEY.SKT; sPayDtlName = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1161); } else if (i == 1) { sPosMenuKey = PosKey.MENU_KEY.KT; sPayDtlName = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1162); } else if (i == 2) { sPosMenuKey = PosKey.MENU_KEY.LGT; sPayDtlName = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1163); } //#20180629 결제할인수단 마스터에서 통신사를 미사용 처리시 멤버십카드 발급시 통신사 선택 항목이 안나오는 증상 수정 end if (sPayDtlName == "") continue; Cosmos.UI.CsmFunc.FuncBtnInfo cFuncInfo = new Cosmos.UI.CsmFunc.FuncBtnInfo(); cFuncInfo.sGroupCode = "00"; // 분류코드 cFuncInfo.nSeqNo = ++iPntCnt; // 표시순번 cFuncInfo.sFuncCode = sPosMenuKey; // 기능코드 cFuncInfo.sFuncText = sPayDtlName; // 기능 명 cFuncInfo.cBackColor = Color.White; // 백 컬러 cFuncInfo.cForeColor = Color.Black; // 명 컬러 cFuncInfo.fFontSize = 11; // 명 폰트 사이즈 cFuncInfo.nButtonSize = 0; // 버튼 사이즈(0:일반,1:가로확대,2:세로확대,3:가로세로확대) fncMobileKind.AddFuncButtonInfo(cFuncInfo); } fncMobileKind.SetFuncButtonCount(1, iPntCnt); // 버튼갯수 설정 fncMobileKind.DisplayFuncButton("00"); // 기능 버튼 표시 fncMobileKind.SelectFuncButton(""); } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message); } } private void fncMobileKind_FuncClickHandler(object sender, string sFuncCode) { try { // 기능키가 해피앱 고객등록 경우 이벤트 안타도록 한다. if (m_sPosMenuKey == PosKey.MENU_KEY.WELCOMECARD_HPAPP_REGISTER) return; if (sFuncCode == "") return; if (sFuncCode == PosKey.MENU_KEY.SKT) { m_sInTelecom = "S"; } else if (sFuncCode == PosKey.MENU_KEY.LGT) { m_sInTelecom = "L"; } else if (sFuncCode == PosKey.MENU_KEY.KT) { m_sInTelecom = "K"; } fncMobileKind.SelectFuncButton(""); fncMobileKind.SelectDispButton(sFuncCode, 0); //DisplayMobileUnityKind(); } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message); } } #endregion #region 여전법 대응 /// /// ZeroFill 초기화 /// private void InDataToZeroFill() { try { //여전법 대응! CmUtil.ZeroFillClear(ref m_sInPutType); //입력구분 CmUtil.ZeroFillClear(ref m_sInPutData); //입력번호 CmUtil.ZeroFillClear(ref m_sInEncData); //암호화번호 CmUtil.ZeroFillClear(ref m_sInMaskData); //마스킹번호 CmUtil.ZeroFillClear(ref m_sInTelecom); //통신사 CmUtil.ZeroFillClear(ref m_sInHP_CustNumer); //해피회원번호 CmUtil.ZeroFillClear(ref m_sInHP_WelcomeCard); //해피웰컴카드번호 //#20180413 웰컴카드 신규기능 추가 start, 20180621 //기존 //CmUtil.ZeroFillClear(ref m_sWccCardNo); //할인창에서넘어온카드번호 //#20180413 웰컴카드 신규기능 추가 end, 20180621 CmUtil.ZeroFillClear(ref m_sReadingHPData); // txtCardNo.Value = string.Empty; } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message); } } #endregion 여전법 대응 #region IC리더 콜백 관련 /// /// IC리더 콜백 설정 /// /// /// private void tmrIcCard_Tick(object sender, EventArgs e) { try { UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", tmrIcCard.Tag.ToString()); if (m_cDevStatus.ICReader.UseYn != true) // 여전법 인증여부(0:MSR, 1:IC) { tmrIcCard.Enabled = false; return; } if (tmrIcCard.Tag == null || tmrIcCard.Tag.ToString() == "") { // IC리더 콜백 설정 if (bNotDoubleClik) return; tmrIcCard.Enabled = false; //#20170918 IC 콜백 함수 변경 start //포인트창에서 해피제휴 신용카드 리딩시 IC 우선 거래로 인해 '카드를 읽혀 주세요' 팝업 나오는 현상 수정. //기존 m_cDeviceICReader.RegIcCallback(delegateReader); //변경 //string sApprID = PosMstManager.GetMstVan(ItemConst.TR_ITEM_ID.CREDITCARD_ITEM, ItemConst.TR_ITEM_ID.CREDITCARD.CREDIT_CARD, PosMst.MST_VAN.DATA.APPR_ID); //m_cDeviceICReader.RegIcCallbackCardInfo(sApprID, m_cDataService.IntParse(txtPayAmt.Text), delegateReaderCardInfo); //#20170918 IC 콜백 함수 변경 end } else if (tmrIcCard.Tag.ToString() == "MSR") { // MSR 카드 읽기 tmrIcCard.Enabled = false; tmrIcCard.Tag = ""; tmrIcCard.Interval = 500; bNotDoubleClik = false; txtCardNo_EditBoxKeyDownEvent(txtCardNo, PosKey.MENU_KEY.ENTER); tmrIcCard.Enabled = true; } else if (tmrIcCard.Tag.ToString() == "IC") { // IC리더 카드 읽기 tmrIcCard.Enabled = false; tmrIcCard.Tag = ""; tmrIcCard.Interval = 500; bNotDoubleClik = false; btnProc_Click(btnIcCard, null); } else tmrIcCard.Enabled = false; } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message); } } delegate void DelegateIcReaderCallBack(int rc, StringBuilder str); /// /// IC리더 콜백 함수 /// /// /// public void OnIcReaderCallBack(int num, StringBuilder str) { try { if (txtCardNo.InvokeRequired) { DelegateIcReaderCallBack d = new DelegateIcReaderCallBack(OnIcReaderCallBack); this.Invoke(d, new object[] { num, str }); } else { if (bNotDoubleClik) return; bNotDoubleClik = true; if (num == 1) { // IC 카드 tmrIcCard.Tag = "IC"; tmrIcCard.Interval = 100; } else { // MSR 카드 if (str.ToString().StartsWith("EN") == true) { ClearCardInfo(); // 카드 입력 정보 클리어 m_sInEncData = CmUtil.MidH(str.ToString(), 0, 512).Trim(); m_sInMaskData = CmUtil.MidH(str.ToString(), 512, 40).Trim(); m_sInPutData = m_sInMaskData; m_sInPutType = PosConst.POS_VAN_MASTER.INPUT_TYPE.VAN_SWIP; txtCardNo.Value = m_sInPutData; tmrIcCard.Tag = "MSR"; tmrIcCard.Interval = 100; } else { tmrIcCard.Interval = 500; } } tmrIcCard.Enabled = true; bNotDoubleClik = false; } } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message); bNotDoubleClik = false; } } /// /// IC리더 콜백 해지 /// private void UnRegIcCallback() { try { if (m_cDevStatus.ICReader.UseYn == true) // 여신전문금융업법 적용여부 체크 { tmrIcCard.Enabled = false; //#20170918 IC 콜백 함수 변경 start //포인트창에서 해피제휴 신용카드 리딩시 IC 우선 거래로 인해 '카드를 읽혀 주세요' 팝업 나오는 현상 수정. //기존 m_cDeviceICReader.UnRegIcCallback(); //변경 //m_cDeviceICReader.UnRegIcCallbackCardInfo(); //#20170918 IC 콜백 함수 변경 end } } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message); } } #endregion #region 전화번호 입력 처리 /// /// 전화번호 입력 처리 /// /// private bool GetPinPadData() { try { txtCardNo.Value = ""; ClearCardInfo(); // 카드 입력 정보 클리어 string sRsvStr = ""; if (m_cDeviceSignPad.GetMsg_SignPad(false, MessageManager.GetErrorMessage(POS_MESSAGE.LABEL.MSG_1137), ref sRsvStr) == false) { return false; } txtCardNo.Value = sRsvStr; return true; } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message); } return false; } #endregion 전화번호 입력 처리 #region Control Event // //버튼 입력 처리 // private void btnProc_Click(object sender, EventArgs e) { string sRet = UserCom.RST_ERR; try { if (bNotDoubleClik) return; bNotDoubleClik = true; //닫기버튼 if (((Cosmos.UI.CsmButton)sender) == btnExit) { sRet = CloseClick(); bNotDoubleClik = false; if (sRet != UserCom.RST_OK) return; this.DialogResult = DialogResult.Cancel; this.Close(); } else if (((Cosmos.UI.CsmButton)sender) == btnPinPad) // 핀패드 { if (PosMstManager.GetPosOption(POS_OPTION.OPT516) != "1") { WinManager.ErrorMessage(POS_MESSAGE.ERROR.MSG_0790); bNotDoubleClik = false; return; } UnRegIcCallback(); // IC리더 콜백 해지 if (GetPinPadData() == true) { bNotDoubleClik = false; txtCardNo_EditBoxKeyDownEvent(txtCardNo, PosKey.MENU_KEY.ENTER); } //if (txtCardNo.Value == "") tmrIcCard.Enabled = true; } //웰컴카드 발급버튼 else if (((Cosmos.UI.CsmButton)sender) == btnEnter) { if (PosMstManager.GetPosOption(POS_OPTION.OPT516) != "1") { WinManager.ErrorMessage(POS_MESSAGE.ERROR.MSG_0790); bNotDoubleClik = false; return; } sRet = WelcomeCardIssueClick(0); bNotDoubleClik = false; //#20180413 웰컴카드 신규기능 추가 start, 20180621 //기존 if (sRet != UserCom.RST_OK) return; this.DialogResult = DialogResult.OK; this.Close(); ////변경 //if (sRet != UserCom.RST_OK && m_bHPAppClient_CheckYN == "false") //{ // this.DialogResult = DialogResult.Cancel; // this.Close(); //} //else //{ // if (sRet != UserCom.RST_OK) return; // this.DialogResult = DialogResult.OK; // this.Close(); // //} //#20180413 웰컴카드 신규기능 추가 end, 20180621 } //해피앱 고객등록 else if (((Cosmos.UI.CsmButton)sender) == btnClientRegister) { if (PosMstManager.GetPosOption(POS_OPTION.OPT516) != "1") { WinManager.ErrorMessage(POS_MESSAGE.ERROR.MSG_0790); bNotDoubleClik = false; return; } btnEnter.Visible = false; // 발급버튼 sRet = WelcomeCardIssueClick(1); if (m_sPosMenuKey == PosKey.MENU_KEY.WELCOMECARD_ISSUE) { btnEnter.Visible = true; } // 발급버튼 bNotDoubleClik = false; if (sRet != UserCom.RST_OK) return; this.DialogResult = DialogResult.OK; this.Close(); } } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message); bNotDoubleClik = false; if (m_sPosMenuKey == PosKey.MENU_KEY.WELCOMECARD_ISSUE) { btnEnter.Visible = true; } // 발급버튼 } } #endregion Control Event #region DeviceEvent 관련 /// /// DeviceEvent 관련 /// /// /// /// /// public void OnDeviceEvent(string sDevice, string sData1, string sData2, string sData3) { switch (sDevice) { case PosConst.OPOS_DEVICE.SCANNER: this.Invoke(new EventHandler(OnScannerEvent)); break; } } /// /// Scanner Event /// /// /// private void OnScannerEvent(object source, EventArgs e) { string sScanCode = m_cDevStatus.Scanner.DataLabel; ScannerEvent(sScanCode); } /// /// 스캐너 입력 처리 /// /// 스캔데이터 private void ScannerEvent(string sScanCode) { try { if (sScanCode.Length > 0 && m_sInPutData == "") //if (sScanCode.Length > 0) { ClearCardInfo(); m_sInPutType = PosConst.POS_VAN_MASTER.INPUT_TYPE.VAN_MOBILE_SWIP; m_sInPutData = sScanCode; txtCardNo.Value = m_sInPutData; //if (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.NORMAL) SearchTxtInPut(sScanCode); txtCardNo_EditBoxKeyDownEvent(txtCardNo, PosKey.MENU_KEY.ENTER); } } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message); } } #endregion #region 텍스트박스 키 입력 이벤트 처리 /// /// 텍스트박스 키 입력 이벤트 처리 /// private void txtCardNo_EditBoxKeyDownEvent(object sender, string sFuncValue) { try { if (sFuncValue == PosKey.MENU_KEY.ENTER) { if (((Cosmos.UI.CsmPosEditBox)sender) == txtCardNo) { //기본조건 체크 if (CheckTxtInPut(sender) == false) { bNotDoubleClik = false; return; } if (m_sPosMenuKey == PosKey.MENU_KEY.WELCOMECARD_HPAPP_REGISTER) { // 해피앱 고객등록 btnProc_Click(btnClientRegister, null); } else { // 발급조회 btnProc_Click(btnEnter, null); } } } else if (sFuncValue == PosKey.MENU_KEY.CLEAR) { if (((Cosmos.UI.CsmPosEditBox)sender).ReadOnly == false) ((Cosmos.UI.CsmPosEditBox)sender).Text = ""; if (((Cosmos.UI.CsmPosEditBox)sender) == txtCardNo) { // 초기화 ClearCardInfo(); // 통신사 초기화 m_sInTelecom = ""; fncMobileKind.SelectFuncButton(""); // 카드번호 초기화 txtCardNo.ReadOnly = false; } } else if (sFuncValue == PosKey.MENU_KEY.ESC_PREVIOUS) { this.DialogResult = DialogResult.Cancel; this.Close(); } //padInPut.SetActiveControl = (Control)sender; } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message); } } private void txtCardNo_Enter(object sender, EventArgs e) { try { padInPut.SetActiveControl = (Control)sender; } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message); } } #endregion #region 카드 입력 정보 클리어 /// /// 카드 입력 정보 클리어 /// private void ClearCardInfo() { try { m_sInPutType = ""; // 입력구분 m_sInPutData = ""; // 입력데이터 m_sInEncData = ""; // 카드데이터 m_sInMaskData = ""; // 마스킹데이터 m_sInHP_CustNumer = ""; // HPC - 해피 고객번호 m_sInHP_WelcomeCard = ""; // HPC - 웰컴카드 번호 //m_sInTelecom = ""; // 통신사 선택 //fncMobileKind.SelectFuncButton(""); } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message); } } #endregion #region 텍스트박스 입력 유효성 체크 /// /// 텍스트박스 입력 유효성 체크 /// /// /// private bool CheckTxtInPut(object sender) { try { // 특정 문자값 제거 try { if (m_cDevStatus.Msr.STX != "" && txtCardNo.Value.StartsWith(m_cDevStatus.Msr.STX)) txtCardNo.Value = txtCardNo.Value.Substring(1); int iLastEtx = txtCardNo.Value.LastIndexOf(m_cDevStatus.Msr.ETX); if (m_cDevStatus.Msr.ETX != "" && iLastEtx > 0) txtCardNo.Value = CmUtil.MidH(txtCardNo.Value, 0, iLastEtx); } catch { } // 프리픽스 체크하기 string sPreFix = m_cWelcomeCard.WelcomeCard_PrefixCheck(txtCardNo.Value); if (txtCardNo.Value == "" || txtCardNo.Value.Length < 16) { //WinManager.ErrorMessage("PB웰컴카드 바코드를 스캔해주세요."); WinManager.ErrorMessage(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1144)); txtCardNo.Select(); txtCardNo.SelectText(); return false; } // 카드번호 길이 체크 if (sender == null || ((Cosmos.UI.CsmPosEditBox)sender) == txtCardNo) { // 입력된 카드번호 변경 체크 if (txtCardNo.Value != m_sInPutData) { // 카드 입력 정보 클리어 ClearCardInfo(); } // 입력타입 m_sInPutType = PosConst.POS_VAN_MASTER.INPUT_TYPE.VAN_KEYIN; // 입력된 번호 m_sInPutData = txtCardNo.Value; // 웰컴카드 번호 m_sInHP_WelcomeCard = txtCardNo.Value; // 웰컴카드 발급만 체크한다. if (m_sPosMenuKey == PosKey.MENU_KEY.WELCOMECARD_ISSUE) { // 발급버튼눌렀을경우에만체크한다. if (sender == null) { if (m_sInTelecom == "") { WinManager.ErrorMessage(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1146)); txtCardNo.Select(); txtCardNo.SelectText(); return false; } } } else if (m_sPosMenuKey == PosKey.MENU_KEY.WELCOMECARD_HPAPP_REGISTER) { // 통신사 초기화 m_sInTelecom = ""; fncMobileKind.SelectFuncButton(""); } } } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message); return false; } return true; } #endregion #region 웰컴카드 전문전송 private bool WelcomeCard_SetData(string sType) { string sRet = UserCom.RST_ERR; if (m_cTrnStatus.Head.TradeDiv != ItemConst.TRAN_DIV.NORMAL) return false; if (m_cPosStatus.Base.TrainingFlag == "1" || m_cPosStatus.Mst.TestStorYn == "1") return false; try { // 전문통신!!! string[] saRecvdData = null; sRet = m_cWelcomeCard.WelcomeCard_SendDataMake(PosConst.CANCEL_DIV.NORMAL, new string[] {sType, //웰컴타입 m_sInPutData, //카드번호 m_sInPutType, //입력구분 m_sInHP_CustNumer, //HPC - 회원번호 m_sInHP_WelcomeCard, //HPC - 웰컴카드번호 "", //웰컴카드 C:실물카드, A:해피App m_sInTelecom, //통신사구분 "", //할인대상금액 DateTime.Now.ToString("yyyyMMdd"), //거래일자(YYYYMMDD) DateTime.Now.ToString("HHmmss"), //거래시간(HHMMSS) "", //승인번호 m_sReadingHPData}, //HP등록건에서읽어올지, HP조회건에서읽어올지 ref saRecvdData); //if (sRet == UserCom.RST_OK && // saRecvdData != null && sType == PosConst.WELCOMECARD_TYPE.ISSUE_SEARCH ) //{ // if (saRecvdData[Column.WELCOMECARD_SEARCH_RECV.SEQ.sReqCode].Trim() == "50000" || //등록 가능한 카드 (즉 미발급된카드) // saRecvdData[Column.WELCOMECARD_SEARCH_RECV.SEQ.sReqCode].Trim() == "00200" || //마스터 미등록된 카드 // saRecvdData[Column.WELCOMECARD_SEARCH_RECV.SEQ.sReqCode].Trim() == "99993") // { // //WinManager.ErrorMessage("해피앱 고객등록 할 수 없습니다. 미발급 된 번호 입니다."); // WinManager.ErrorMessage(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1152)); // return false; // } //} if (sRet == UserCom.RST_OK) { if (saRecvdData != null && sType == PosConst.WELCOMECARD_TYPE.ISSUE_SEARCH) { if (saRecvdData[Column.WELCOMECARD_SEARCH_RECV.SEQ.sReqCode].Trim() == "50000" || //등록 가능한 카드 (즉 미발급된카드) saRecvdData[Column.WELCOMECARD_SEARCH_RECV.SEQ.sReqCode].Trim() == "00200" || //마스터 미등록된 카드 saRecvdData[Column.WELCOMECARD_SEARCH_RECV.SEQ.sReqCode].Trim() == "99993") { //WinManager.ErrorMessage("해피앱 고객등록 할 수 없습니다. 미발급 된 번호 입니다."); WinManager.ErrorMessage(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1152)); return false; } } return true; } else { return false; } } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message); return false; } } #endregion #region 닫기 버튼 클릭! private string CloseClick() { string sRet = UserCom.RST_ERR; try { UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "Close Click "); sRet = UserCom.RST_OK; return sRet; } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "CloseClick Exception : " + ex.Message); return UserCom.RST_ERR; } } #endregion #region 웰컴카드 발급버튼 클릭! (0: 발급버튼 1: 해피앱 고객등록 버튼) private string WelcomeCardIssueClick(int pType) { string sRet = UserCom.RST_ERR; string sMsg = string.Empty; bool bClientRegister = false; // 고객의 '해피앱 고객등록' 동의여부 (true: 고객동의 false: 고객미동의) bool bAvailability = true; // 현재 해피고객의 '해피앱 고객등록' 가능여부 (true: 가능 false: 불가능) if (PosMstManager.GetPosOption(POS_OPTION.OPT516) != "1") { WinManager.ErrorMessage(POS_MESSAGE.ERROR.MSG_0790); return sRet; } try { #region 발급 또는 해피앱 고객등록 버튼 선택 // 발급버튼 선택 if (pType == 0) { UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "[발급 버튼 선택] "); // 조건체크 if (CheckTxtInPut(null) == false) return sRet; // 통신사 체크 필수 if (m_sInTelecom == "") { WinManager.ErrorMessage(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1146)); return sRet; } // 발급조회 //if (WelcomeCard_SetData(PosConst.WELCOMECARD_TYPE.ISSUE_SEARCH) == false) return sRet; // 발급요청 if (WelcomeCard_SetData(PosConst.WELCOMECARD_TYPE.ISSUE_REGISTER) == false) return sRet; // 메세지 sMsg = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1140); } // 해피앱 고객등록 선택 else { UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "[해피앱 고객등록 버튼 선택] "); // 조건체크 if (CheckTxtInPut(txtCardNo) == false) return sRet; // 통신사 초기화 m_sInTelecom = ""; fncMobileKind.SelectFuncButton(""); // 발급조회 if (WelcomeCard_SetData(PosConst.WELCOMECARD_TYPE.ISSUE_SEARCH) == false) { return sRet; } //#20180619 웰컴카드 개선사항 start //영업메뉴에서 해피APP 고객등록으로 들어갈 때 메세지 표시 안함. //기존 sMsg = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1143); //#20180619 웰컴카드 개선사항 end } #endregion #region 해피앱 고객등록 동의여부 체크 //#20180619 웰컴카드 개선사항 start //영업메뉴에서 해피APP 고객등록으로 들어갈 때 메세지 표시 안함. //기존 //if (WinManager.QuestionMessage(sMsg) == true) //변경 //#20180413 웰컴카드 신규기능 추가 start, 20180621 //발급 성공하면 해피포인트 멤버십 등록 여부와 상관없이 ok로 리턴 //기존 //if (pType == 0) { if (WinManager.QuestionMessage(sMsg) == false) return UserCom.RST_ERR; } //변경 if (pType == 0) { if (WinManager.QuestionMessage(sMsg) == false) return UserCom.RST_OK; } //#20180413 웰컴카드 신규기능 추가 end, 20180621 //#20180619 웰컴카드 개선사항 end UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "[해피앱등록 동의여부] 동의"); // true: 해피앱 고객등록 동의 false: 해피앱 고객등록 미동의 bClientRegister = true; #region 해피포인트 데이터 검색 및 해피앱 고객등록 대상자인지 체크 m_sReadingHPData = string.Empty; // 현재 해피포인트 등록 건 있는지 체크하고 해피앱 고객등록 가능한 상태인지 체크한다. if (m_cWelcomeCard.ClientRegisterCheck(PosConst.WELCOMECARD_MSG.HP_REGISTER_DATA, new string[] { }, ref m_sInHP_CustNumer, ref m_sInHP_WelcomeCard) == true) { //m_sInHP_CustNumer : HP회원번호, m_sInHP_WelcomeCard : HP웰컴카드번호 //m_sInHP_WelcomeCard : 존재 시 이미 해피앱 등록고객으로 판단하고 추가적으로 해피앱 고객등록을 진행 할 수 없다. if (m_sInHP_WelcomeCard != "") { bAvailability = false; } // 웰컴카드 번호가 비어있으면 해피APP 고객등록 대상자임. if (m_sInHP_CustNumer == "") { bAvailability = false; } // 회원번호가 비어있으면 해피APP 고객등록 대상자가 아님. //bAvailability 현재 해피고객의 '해피앱 고객등록' 가능여부 (true: 가능 false: 불가능) if (bAvailability != false) { m_sReadingHPData = PosConst.WELCOMECARD_MSG.HP_REGISTER_DATA; } } else { // 현재 해피포인트 등록 건이 없다면 또는 등록은 되어 있으나 해피앱 고객등록 가능한 고객이 아니라면 // 해피포인트 조회 화면을 별도로 오픈하고 해피앱 고객등록이 가능한 고객인지 체크한다. // ※ 해피앱 고객등록 조건: 조회한 데이터가 해피앱인지? 회원번호는 있는지? 응답 전문에 웰컴카드 번호 유무? //#20180413 웰컴카드 신규기능 추가 end, 20180621 //기존 #region 기존소스 /* //#20180619 웰컴카드 개선사항 start //기존 //WinPay.ShowForm(new string[] { FormManager.FORM_PAY_POINT_HAPPY_POINT, PosKey.MENU_KEY.HAPPY_POINT_SCH, "0", m_sOpenKey }); //변경 //#20180413 웰컴카드 신규기능 추가 start, 20180621 //기존 //sRet = WinPay.ShowForm(new string[] { FormManager.FORM_PAY_POINT_HAPPY_POINT, PosKey.MENU_KEY.HAPPY_POINT_SCH, "0", m_sOpenKey }); //if (sRet != UserCom.RST_OK) return sRet; //변경 string sRetShow = WinPay.ShowForm(new string[] { FormManager.FORM_PAY_POINT_HAPPY_POINT, PosKey.MENU_KEY.HAPPY_POINT_SCH, "0", m_sOpenKey }); if (sRetShow != UserCom.RST_OK) return sRet; //#20180413 웰컴카드 신규기능 추가 end, 20180621 //#20180619 웰컴카드 개선사항 end */ #endregion //변경 if (m_bHPAppClient_CheckYN == "true") { string sRetShow = WinPay.ShowForm(new string[] { FormManager.FORM_PAY_POINT_HAPPY_POINT, PosKey.MENU_KEY.HAPPY_POINT_SCH, "0", m_sOpenKey }); if (sRetShow != UserCom.RST_OK) return sRet; } //#20180413 웰컴카드 신규기능 추가 end, 20180621 if (m_cWelcomeCard.ClientRegisterCheck(PosConst.WELCOMECARD_MSG.HP_SEARCH_DATA, new string[] { }, ref m_sInHP_CustNumer, ref m_sInHP_WelcomeCard) == true) { //true면 해피고객은 맞는데 해피앱 고객등록 대상자가 아님. False면 해피고객이 아님. if (m_sInHP_WelcomeCard != "") { bAvailability = false; } // 웰컴카드 번호가 비어있으면 해피APP 고객등록 대상자임. if (m_sInHP_CustNumer == "") { bAvailability = false; } // 회원번호가 비어있으면 해피APP 고객등록 대상자가 아님. //bAvailability 현재 해피고객의 '해피앱 고객등록' 가능여부 (true: 가능 false: 불가능) if (bAvailability != false) { m_sReadingHPData = PosConst.WELCOMECARD_MSG.HP_SEARCH_DATA; } } else { //#20180413 웰컴카드 신규기능 추가 start, 20180621, 20180622 WinManager.ErrorMessage(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1154)); //#20180413 웰컴카드 신규기능 추가 end, 20180621, 20180622 return sRet; } } //#20180413 웰컴카드 신규기능 추가 start, 20180621 if (m_bHPAppClient_CheckYN == "false") { if (bAvailability == false) { WinManager.ErrorMessage(MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0793)); this.DialogResult = DialogResult.Cancel; this.Close(); return sRet; } } //#20180413 웰컴카드 신규기능 추가 end, 20180621 #endregion UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "[해피앱 고객등록 가능여부] HP웰컴카드번호 :" + m_sInHP_WelcomeCard + ", HP회원번호 :" + m_sInHP_CustNumer + ", INPUT카드번호 :" + m_sInPutData); #region 해피에 등록된 웰컴카드 번호가 있으면 해피앱 고객등록 할 수 없다. 만약 등록하려던 웰컴카드 번호가 이미 해피에 연동된 번호일 때 발급취소를 진행하지 않는다. if (m_sInHP_WelcomeCard != "" && m_sInHP_WelcomeCard != m_sInPutData) { // 해피앱 별도 기능 일 때는 발급취소 안함. if (pType == 0) { // 발급취소 if (WelcomeCard_SetData(PosConst.WELCOMECARD_TYPE.ISSUE_CANCEL) == false) { UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "[발급취소] 실패"); } else { UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "[발급취소] 성공"); } } WinManager.ErrorMessage(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1147)); return sRet; } else if (m_sInHP_WelcomeCard != "" && m_sInHP_WelcomeCard == m_sInPutData) { WinManager.ErrorMessage(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1148)); return sRet; } // 고객등록 기본 조건은 해피앱이고 회원번호가 존재해야 하며 웰컴카드 번호가 없어야 한다. if (bAvailability == false) { WinManager.ErrorMessage(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1149)); return sRet; } #endregion #region 고객동의 받았고 해피앱 고객등록 가능자일 때 if (bClientRegister == true && bAvailability == true) { // HPC 고객등록 시도 if (WelcomeCard_SetData(PosConst.WELCOMECARD_TYPE.HPC_CLIENT_REGISTER) == true) { // POS SERVER 고객등록 시도 if (WelcomeCard_SetData(PosConst.WELCOMECARD_TYPE.POS_CLIENT_REGISTER) == true) { UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "[POS 고객등록] 성공"); } else { UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "[POS 고객등록] 실패"); } //#20180619 웰컴카드 개선사항 start //기존 //WinManager.ErrorMessage(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1150)); //#20180619 웰컴카드 개선사항 end } else { //#20180413 웰컴카드 신규기능 추가 start, 20180621 if (m_bHPAppClient_CheckYN == "false") { //if (bAvailability == false) //{ WinManager.ErrorMessage(MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0793)); this.DialogResult = DialogResult.Cancel; this.Close(); return sRet; //} } //#20180413 웰컴카드 신규기능 추가 end, 20180621 if (pType == 0) { // 발급취소 if (WelcomeCard_SetData(PosConst.WELCOMECARD_TYPE.ISSUE_CANCEL) == false) { //WinManager.ErrorMessage("발급취소 실패했습니다. 관리자에게 문의하세요."); UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "[발급취소] 실패"); } else { //WinManager.ErrorMessage("발급취소 성공했습니다. "); UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "[발급취소] 성공"); } } WinManager.ErrorMessage(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1151)); return sRet; } } #endregion WinManager.ErrorMessage(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1145)); //#20180619 웰컴카드 개선사항 start //영업메뉴에서 해피APP 고객등록으로 들어갈 때 메세지 표시 안함. //기존 //else //{ // // // UserLog.WriteLogFile(UserCom.LOG_IOS, // System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, // System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + // System.Reflection.MethodBase.GetCurrentMethod().Name + "()", // "[해피앱등록 동의여부] 미동의"); // // bClientRegister = false; // bAvailability = false; //} //#20180619 웰컴카드 개선사항 end #endregion sRet = UserCom.RST_OK; } catch (Exception ex) { WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "WelcomeCardIssueClick Exception : " + ex.Message); return UserCom.RST_ERR; } return sRet; } #endregion } }