/// <summary> /// 발행 button Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnPrint_Click(object sender, EventArgs e) { if (_bDisable) { return; } ChildManager.ShowProgress(true); SetControlDisable(true); try { if (ChkPrint()) { POSPrinterUtils.Instance.PrintIQ_P001(true, dtPrint, _totalCnt, _totalAmt); } } catch (Exception ex) { LogUtils.Instance.LogException(ex); } finally { SetControlDisable(false); ChildManager.ShowProgress(false); //출력후 폼종료 this.Close(); } }
/// <summary> /// 상품교환권 확인 /// </summary> void CheckExchange() { ChildManager.ShowProgress(true); SetControlDisable(true); //중복 및 건수확인 if (!ChkDup()) { ChildManager.ShowProgress(false); SetControlDisable(false); return; } try { PG01ReqData reqData = new PG01ReqData(); reqData.GiftChangeNo = txtTicketNo.Text.ToString(); PG01DataTask pg01 = new PG01DataTask(reqData); pg01.TaskCompleted += new WSWD.WmallPos.FX.NetComm.Tasks.TaskCompletedHandler(pg01_TaskCompleted); pg01.Errored += new WSWD.WmallPos.FX.NetComm.Client.ErrorHandler(pg01_Errored); pg01.ExecuteTask(); } catch (Exception ex) { LogUtils.Instance.LogException(ex); ChildManager.ShowProgress(false); SetControlDisable(false); } }
/// <summary> /// 전문통신(PP01 or PP02) /// </summary> /// <param name="strType">전문구분</param> /// <param name="strNumber">입력번호</param> private void GetServerRegister(string strType, string strNumber) { ChildManager.ShowProgress(true); SetControlDisable(true); try { if (this.InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate() { txtCustName.Text = ""; txtGradeName.Text = ""; txtDelayPoint.Text = ""; txtAbtyPoint.Text = ""; txtCltePoint.Text = ""; txtRemark.Text = ""; strCustNo = ""; msgBar.Text = strMsg15; }); } else { txtCustName.Text = ""; txtGradeName.Text = ""; txtDelayPoint.Text = ""; txtAbtyPoint.Text = ""; txtCltePoint.Text = ""; txtRemark.Text = ""; strCustNo = ""; msgBar.Text = strMsg15; } _returnData = null; //Application.DoEvents(); if (strType == "1") { var pp01 = new PP01DataTask(strNumber); //TEST ->"2701900057818" pp01.TaskCompleted += new WSWD.WmallPos.FX.NetComm.Tasks.TaskCompletedHandler(pp01_TaskCompleted); pp01.Errored += new WSWD.WmallPos.FX.NetComm.Client.ErrorHandler(pp01_Errored); pp01.ExecuteTask(); } else if (strType == "2") { POSDeviceManager.SignPad.ClearPinDataRequest(); //전화번호 var pp02 = new PP02DataTask(strNumber); //TEST ->"01088673503" pp02.TaskCompleted += new WSWD.WmallPos.FX.NetComm.Tasks.TaskCompletedHandler(pp02_TaskCompleted); pp02.Errored += new WSWD.WmallPos.FX.NetComm.Client.ErrorHandler(pp02_Errored); pp02.ExecuteTask(); } } catch (Exception) { ChildManager.ShowProgress(false); SetControlDisable(false); } }
/// <summary> /// 발행 button Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnPrint_Click(object sender, EventArgs e) { if (_bDisable || dtPrint == null || dtPrint.Rows.Count <= 0) { return; } ChildManager.ShowProgress(true); SetControlDisable(true); try { if (ChkPrint()) { POSPrinterUtils.Instance.SetPrintAccount(true, FXConsts.RECEIPT_NAME_POS_ED_P001, null, null, dtPrint, 2); } } catch (Exception ex) { LogUtils.Instance.LogException(ex); } finally { SetControlDisable(false); ChildManager.ShowProgress(false); //출력후 폼종료 this.Close(); } }
/// <summary> /// PP01전문통신 오류 /// </summary> /// <param name="errorMessage"></param> /// <param name="lastException"></param> void pp01_Errored(string errorMessage, Exception lastException) { ChildManager.ShowProgress(false); if (this.InvokeRequired) { this.Invoke((MethodInvoker) delegate() { _PP01RespData = null; bCust = false; txtCardNo.Text = ""; txtCustName.Text = ""; txtGradeName.Text = ""; txtAbtyPoint.Text = ""; txtCardNo.SetFocus(); StatusMessage = strMsg11; SetControlDisable(false); Application.DoEvents(); }); } else { _PP01RespData = null; bCust = false; txtCardNo.Text = ""; txtCustName.Text = ""; txtGradeName.Text = ""; txtAbtyPoint.Text = ""; txtCardNo.SetFocus(); StatusMessage = strMsg11; SetControlDisable(false); Application.DoEvents(); } }
/// <summary> /// 상품교환권확인결과 /// </summary> /// <param name="responseData"></param> void task_TaskCompleted(WSWD.WmallPos.FX.Shared.NetComm.Response.TaskResponseData responseData) { ChildManager.ShowProgress(false); if (responseData.Response.ResponseState == WSWD.WmallPos.FX.Shared.NetComm.SocketTrxnResType.Success) { // confirm input giftno; var resp = responseData.DataRecords.ToDataRecords <PG01RespData>()[0]; if (this.InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate() { ConfirmNewGiftData(resp.PayAmt, resp.EtcData, m_inputGiftNo); }); } else { ConfirmNewGiftData(resp.PayAmt, resp.EtcData, m_inputGiftNo); } } else { this.StatusMessage = responseData.Response.ErrorMessage; if (!m_scannedGiftNo) { //2015.08.26 정광호 수정 ResetInputs(false); //ResetInputs(); } } }
/// <summary> /// TR전송, 결락전송 데이터 결과 /// </summary> /// <param name="ds"></param> public void SetTRData(DataSet ds) { if (ds == null || ds.Tables.Count != 2 || ds.Tables[0] == null || ds.Tables[1] == null) { ChildManager.ShowProgress(false); msgBar.Text = strMsg09; SetControlDisable(false); return; } _dsTR = ds.Copy(); msgBarProgress.Text = string.Format("0/{0}", ds.Tables[0].Rows.Count.ToString()); if (ds.Tables[0].Rows.Count <= 0) { ChildManager.ShowProgress(false); msgBar.Text = strMsg09; SetControlDisable(false); } else { TransData(); } Application.DoEvents(); }
/// <summary> /// 지류카드 button Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnCard_Click(object sender, EventArgs e) { if (_bDisable) { return; } try { ChildManager.ShowProgress(true); SetControlDisable(true); if (ChkPrint() && strCustNo != null && strCustNo.Length > 0) { POSPrinterUtils.Instance.PrintPT_P001_CARD(strCustNo, txtCustName.Text); } } catch (Exception ex) { LogUtils.Instance.LogException(ex); } finally { SetControlDisable(false); ChildManager.ShowProgress(false); } }
/// <summary> /// POS Close /// </summary> void ProcessPOSClose() { if (_bDisable) { return; } if (txtSaleDate.Text.Length <= 0) { return; } osiMsgBar01.MessageText = ""; osiMsgBar02.MessageText = ""; osiMsgBar03.MessageText = ""; osiMsgBar04.MessageText = ""; osiMsgBar05.MessageText = ""; osiMsgBar06.MessageText = ""; osiMsgBar07.MessageText = ""; osiMsgBar01.ItemStatus = OpenItemStatus.None; osiMsgBar02.ItemStatus = OpenItemStatus.None; osiMsgBar03.ItemStatus = OpenItemStatus.None; osiMsgBar04.ItemStatus = OpenItemStatus.None; osiMsgBar05.ItemStatus = OpenItemStatus.None; osiMsgBar06.ItemStatus = OpenItemStatus.None; osiMsgBar07.ItemStatus = OpenItemStatus.None; if (_bAuto) { //화면 표출 메세지 설정 msgBar.Text = strMsg03; ChildManager.ShowProgress(true); SetControlDisable(true); Application.DoEvents(); SetMsgBar(osiMsgBar01, OpenItemStatus.None, strMsg04); SetMsgBar(osiMsgBar02, OpenItemStatus.None, strMsg05); m_Presenter.SetTran(osiMsgBar01, osiMsgBar02); } else { if (ShowMessageBox(MessageDialogType.Question, null, string.Format("{0} {1}", txtSaleDate.Text, strMsg02)) == DialogResult.Yes) { ChildManager.ShowProgress(true); SetControlDisable(true); //화면 표출 메세지 설정 msgBar.Text = strMsg03; Application.DoEvents(); SetMsgBar(osiMsgBar01, OpenItemStatus.None, strMsg04); SetMsgBar(osiMsgBar02, OpenItemStatus.None, strMsg05); m_Presenter.SetTran(osiMsgBar01, osiMsgBar02); } } }
/// <summary> /// /// </summary> /// <param name="showProgress"></param> public void ShowProgressMessage(bool showProgress) { ChildManager.ShowProgress(showProgress, MSG_VAN_REQ_PROCESSING); if (!showProgress) { ModeProcessing = false; } }
/// <summary> /// 조회, 저장등의 DB, TRAN 시 Control Enable/Disable /// </summary> void SetControlDisable(bool bDisable) { ChildManager.ShowProgress(bDisable); _bDisable = bDisable; if (this.InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate() { foreach (var item in this.Controls) { if (item.GetType().Name.ToString().ToLower() == "keypad") { WSWD.WmallPos.POS.FX.Win.UserControls.KeyPad key = (WSWD.WmallPos.POS.FX.Win.UserControls.KeyPad)item; key.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "inputtext") { WSWD.WmallPos.POS.FX.Win.UserControls.InputText txt = (WSWD.WmallPos.POS.FX.Win.UserControls.InputText)item; txt.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "button") { WSWD.WmallPos.POS.FX.Win.UserControls.Button btn = (WSWD.WmallPos.POS.FX.Win.UserControls.Button)item; btn.Enabled = !_bDisable; } } }); } else { foreach (var item in this.Controls) { if (item.GetType().Name.ToString().ToLower() == "keypad") { WSWD.WmallPos.POS.FX.Win.UserControls.KeyPad key = (WSWD.WmallPos.POS.FX.Win.UserControls.KeyPad)item; key.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "inputtext") { WSWD.WmallPos.POS.FX.Win.UserControls.InputText txt = (WSWD.WmallPos.POS.FX.Win.UserControls.InputText)item; txt.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "button") { WSWD.WmallPos.POS.FX.Win.UserControls.Button btn = (WSWD.WmallPos.POS.FX.Win.UserControls.Button)item; btn.Enabled = !_bDisable; } } //Application.DoEvents(); } }
/// <summary> /// 적용 button Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnSave_Click(object sender, EventArgs e) { if (_bDisable) { return; } if (grd == null || grd.RowCount <= 0) { return; } ChildManager.ShowProgress(true); SetControlDisable(true); try { bool bAdd = false; string[] str = new string[grd.RowCount]; for (int i = 0; i < grd.RowCount; i++) { DataRow dr = (System.Data.DataRow)(grd.GetRow(i).ItemData); str[i] = dr["ColNum"].ToString(); bAdd = true; } if (bAdd) { PG02ReqData reqData = new PG02ReqData(str); PG02DataTask pg02 = new PG02DataTask(reqData); pg02.TaskCompleted += new WSWD.WmallPos.FX.NetComm.Tasks.TaskCompletedHandler(pg02_TaskCompleted); pg02.Errored += new WSWD.WmallPos.FX.NetComm.Client.ErrorHandler(pg02_Errored); pg02.ExecuteTask(); } else { ChildManager.ShowProgress(false); SetControlDisable(false); } } catch (Exception) { ChildManager.ShowProgress(false); SetControlDisable(false); } }
/// <summary> /// 합계 점검 조회 내역 셋팅 /// </summary> /// <param name="ds">합계 점검 조회 내역 결과</param> public void SetTranPrint(DataSet ds, BasketHeader _bpHeader) { if (osiMsgBar01.ItemStatus != OpenItemStatus.OK || osiMsgBar02.ItemStatus != OpenItemStatus.OK) { ChildManager.ShowProgress(false); SetControlDisable(false); return; } try { if (ChkPrint()) { if (ds != null && ds.Tables.Count > 0 && ds.Tables[0] != null) { if (POSPrinterUtils.Instance.SetPrintAccount(true, FXConsts.RECEIPT_NAME_POS_ED_P002, _bpHeader, null, ds.Tables[0], 2).ToString().Length > 0) { osiMsgBar03.MessageText = strMsg05; osiMsgBar03.ItemStatus = OpenItemStatus.OK; Application.DoEvents(); } else { osiMsgBar03.MessageText = strMsg06; osiMsgBar03.ItemStatus = OpenItemStatus.Error; Application.DoEvents(); } } } } catch (Exception ex) { LogUtils.Instance.LogException(ex); osiMsgBar03.MessageText = strMsg06; osiMsgBar03.ItemStatus = OpenItemStatus.Error; Application.DoEvents(); } if (osiMsgBar03.ItemStatus == OpenItemStatus.OK) { //AppConfig.ini 파일 초기화 SetInitConfig(); } else { ChildManager.ShowProgress(false); SetControlDisable(false); return; } }
/// <summary> /// 전문확인 오류 /// </summary> /// <param name="errorMessage"></param> /// <param name="lastException"></param> void task_Errored(string errorMessage, Exception lastException) { ChildManager.ShowProgress(false); this.BeginInvoke((MethodInvoker) delegate() { this.StatusMessage = errorMessage; if (!m_scannedGiftNo) { //2015.08.26 정광호 수정 ResetInputs(false); //ResetInputs(); } }); }
/// <summary> /// 실행 button Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnRun_Click(object sender, EventArgs e) { if (_bDisable) { return; } if (txtCasNm.Tag == null || txtCasNm.Tag.ToString().Length <= 0 || txtSaleDate.Text.Length <= 0 || m_Presenter == null) { return; } try { osiMsgBar01.MessageText = ""; osiMsgBar02.MessageText = ""; osiMsgBar03.MessageText = ""; osiMsgBar04.MessageText = ""; osiMsgBar05.MessageText = ""; osiMsgBar06.MessageText = ""; osiMsgBar07.MessageText = ""; osiMsgBar01.ItemStatus = OpenItemStatus.None; osiMsgBar02.ItemStatus = OpenItemStatus.None; osiMsgBar03.ItemStatus = OpenItemStatus.None; osiMsgBar04.ItemStatus = OpenItemStatus.None; osiMsgBar05.ItemStatus = OpenItemStatus.None; osiMsgBar06.ItemStatus = OpenItemStatus.None; osiMsgBar07.ItemStatus = OpenItemStatus.None; if (ShowMessageBox(MessageDialogType.Question, null, string.Format("{0} {1}", txtCasNm.Text, strMsg02)) == DialogResult.Yes) { ChildManager.ShowProgress(true); SetControlDisable(true); //화면 표출 메세지 설정 msgBar.Text = strMsg03; Application.DoEvents(); m_Presenter.SetTran(osiMsgBar01, osiMsgBar02); } } catch (Exception ex) { LogUtils.Instance.LogException(ex); ChildManager.ShowProgress(false); SetControlDisable(false); } }
/// <summary> /// 합계 점검 조회 내역 셋팅 /// </summary> /// <param name="ds">합계 점검 조회 내역 결과</param> public void SetTranPrint(DataSet ds, BasketHeader bpHeader) { if (osiMsgBar01.ItemStatus != OpenItemStatus.OK || osiMsgBar02.ItemStatus != OpenItemStatus.OK) { ChildManager.ShowProgress(false); SetControlDisable(false); return; } _bpHeader = bpHeader; _dtPrint = null; _dtPrint = ds.Tables[0].Copy(); timerChk.Tag = "0"; timerChk.Interval = 3000; //3초 간격으로 10번 확인 timerChk.Tick += new EventHandler(timerChk_Tick); timerChk.Enabled = true; }
void pu01Task_Errored(string errorMessage, Exception lastException) { ChildManager.ShowProgress(false); if (this.InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate() { msgBar.Text = strMsg08; SetControlDisable(false); }); } else { msgBar.Text = strMsg08; SetControlDisable(false); } }
/// <summary> /// TR전송, 결락전송 Click Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnTrans_Click(object sender, EventArgs e) { if (_bDisable) { return; } _dsTR = null; iRow = 0; strType = ""; if (txtTransDate.Text.Length != 10 || m_Presenter == null) { return; } DateTime dtTime = DateTime.Now; if (!DateTime.TryParse(txtTransDate.Text, out dtTime)) { return; } WSWD.WmallPos.POS.FX.Win.UserControls.Button btn = (WSWD.WmallPos.POS.FX.Win.UserControls.Button)sender; strType = btn == btnTransTr ? "0" : "1"; string strMsg_01 = strType == "0" ? strMsg05 : strMsg06; string strMsg_02 = strType == "0" ? strMsg03 : strMsg04; if (ShowMessageBox(MessageDialogType.Question, null, string.Format("{0} {1}", txtTransDate.Text, strMsg_01)) == DialogResult.Yes) { ChildManager.ShowProgress(true); SetControlDisable(true); //화면 표출 메세지 설정 msgBarProgress.Text = string.Format("0/0"); colorProgressBar1.Percentage = 0; msgBar.Text = strMsg_02; Application.DoEvents(); //TR전송, 결락전송 데이터 조회 m_Presenter.GetTRData(strType); } }
/// <summary> /// 전문통신(PP01) /// </summary> private void GetServerRegister() { if (this.InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate() { if (_bDisable || txtCardNo.Text.Length != 13) { return; } ChildManager.ShowProgress(true); SetControlDisable(true); bCust = false; _PP01RespData = null; var pp01 = new PP01DataTask(txtCardNo.Text); //TEST ->"2701900057818" pp01.TaskCompleted += new WSWD.WmallPos.FX.NetComm.Tasks.TaskCompletedHandler(pp01_TaskCompleted); pp01.Errored += new WSWD.WmallPos.FX.NetComm.Client.ErrorHandler(pp01_Errored); pp01.ExecuteTask(); }); } else { if (_bDisable || txtCardNo.Text.Length != 13) { return; } ChildManager.ShowProgress(true); SetControlDisable(true); bCust = false; _PP01RespData = null; var pp01 = new PP01DataTask(txtCardNo.Text); //TEST ->"2701900057818" pp01.TaskCompleted += new WSWD.WmallPos.FX.NetComm.Tasks.TaskCompletedHandler(pp01_TaskCompleted); pp01.Errored += new WSWD.WmallPos.FX.NetComm.Client.ErrorHandler(pp01_Errored); pp01.ExecuteTask(); } }
/// <summary> /// PP04전문통신 오류 /// </summary> /// <param name="errorMessage"></param> /// <param name="lastException"></param> void pp04_Errored(string errorMessage, Exception lastException) { ChildManager.ShowProgress(false); if (this.InvokeRequired) { this.Invoke((MethodInvoker) delegate() { StatusMessage = strMsg11; SetControlDisable(false); Application.DoEvents(); }); } else { StatusMessage = strMsg11; SetControlDisable(false); Application.DoEvents(); } }
/// <summary> /// PP01전문통신 오류 /// </summary> /// <param name="errorMessage"></param> /// <param name="lastException"></param> void pp01_Errored(string errorMessage, Exception lastException) { ChildManager.ShowProgress(false); if (this.InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate() { _returnData = null; txtCardNo.Text = ""; txtCustName.Text = ""; txtGradeName.Text = ""; txtDelayPoint.Text = ""; txtAbtyPoint.Text = ""; txtCltePoint.Text = ""; txtRemark.Text = ""; strCustNo = ""; txtCardNo.SetFocus(); msgBar.Text = strMsg11; SetControlDisable(false); }); } else { _returnData = null; txtCardNo.Text = ""; txtCustName.Text = ""; txtGradeName.Text = ""; txtDelayPoint.Text = ""; txtAbtyPoint.Text = ""; txtCltePoint.Text = ""; txtRemark.Text = ""; strCustNo = ""; txtCardNo.SetFocus(); msgBar.Text = strMsg11; SetControlDisable(false); } }
/// <summary> /// /// </summary> /// <param name="giftNo"></param> private void ValidateGiftNo(bool scanned, string giftNo) { // reset status message StatusMessage = MSG_INPUT; m_scannedGiftNo = scanned; if (!ValidateInputGiftNo(scanned, giftNo)) { return; } m_inputGiftNo = giftNo; var task = new PG01DataTask(new PG01ReqData() { GiftChangeNo = giftNo }); task.Errored += new WSWD.WmallPos.FX.NetComm.Client.ErrorHandler(task_Errored); task.TaskCompleted += new WSWD.WmallPos.FX.NetComm.Tasks.TaskCompletedHandler(task_TaskCompleted); ChildManager.ShowProgress(true); task.ExecuteTask(); }
/// <summary> /// 발행 button Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnPrint_Click(object sender, EventArgs e) { if (_bDisable) { return; } ChildManager.ShowProgress(true); SetControlDisable(true); try { if (ChkPrint()) { DataRow[] drCnt = null; DataRow[] drAmt = null; if (dtPrint != null) { drCnt = dtPrint.Select("col01 = 'cnt'"); drAmt = dtPrint.Select("col01 = 'amt'"); } POSPrinterUtils.Instance.PrintIQ_P002(true, drCnt, drAmt, _totalCntSale, _totalCntRetn, _totalAmtRenr, _totalAmtSale); } } catch (Exception ex) { LogUtils.Instance.LogException(ex); } finally { SetControlDisable(false); ChildManager.ShowProgress(false); //출력후 폼종료 this.Close(); } }
/// <summary> /// TR전송, 결락전송 전문Upload /// </summary> private void TransData() { if (_dsTR.Tables[0].Rows.Count < iRow + 1) { ChildManager.ShowProgress(false); msgBar.Text = strMsg07; SetControlDisable(false); return; } DataRow[] drFilter = _dsTR.Tables[1].Select(string.Format("NO_TRXN = '{0}'", _dsTR.Tables[0].Rows[iRow][0].ToString())); if (drFilter != null && drFilter.Length > 0) { DataTable dt = _dsTR.Tables[1].Clone(); DataRow NewDr; foreach (DataRow drTemp in drFilter) { NewDr = dt.NewRow(); for (int i = 0; i < dt.Columns.Count; i++) { NewDr[i] = drTemp[i] != null ? drTemp[i].ToString() : ""; } dt.Rows.Add(NewDr); } iRow++; var pu01Task = new PU01DataTaskManual(strType, dt); pu01Task.TaskCompleted += new WSWD.WmallPos.FX.NetComm.Tasks.TaskCompletedHandler(pu01Task_TaskCompleted); pu01Task.Errored += new WSWD.WmallPos.FX.NetComm.Client.ErrorHandler(pu01Task_Errored); pu01Task.ExecuteTask(); } }
/// <summary> /// AppConfig.ini 파일 초기화 /// </summary> private void SetInitConfig() { try { ConfigData.Current.AppConfig.PosInfo.CasNo = string.Empty; //계산원 코드 ConfigData.Current.AppConfig.PosInfo.CasName = string.Empty; //계산원명 ConfigData.Current.AppConfig.PosInfo.CasPass = string.Empty; //계산원 비밀번호 int iShiftCount = TypeHelper.ToInt32(ConfigData.Current.AppConfig.PosInfo.ShiftCount) + 1; ConfigData.Current.AppConfig.PosInfo.ShiftCount = iShiftCount > 9 ? iShiftCount.ToString() : "0" + iShiftCount.ToString(); //정산차수 ConfigData.Current.AppConfig.Save(); osiMsgBar04.MessageText = strMsg07; osiMsgBar04.ItemStatus = OpenItemStatus.OK; Application.DoEvents(); FrameBaseData.Current.OnDataChanged(FrameBaseDataItem.ConfigChanged, null); ChildManager.OnLoggedOut(); } catch (Exception ex) { LogUtils.Instance.LogException(ex); osiMsgBar04.MessageText = strMsg08; osiMsgBar04.ItemStatus = OpenItemStatus.Error; Application.DoEvents(); } finally { ChildManager.ShowProgress(false); SetControlDisable(false); //화면 종료 this.Close(); } }
public void ShowProgress(bool showProgress) { ChildManager.ShowProgress(showProgress); }
/// <summary> /// SAT011 업데이트 확인완료 /// </summary> /// <param name="iCnt">업데이트 실패 개수</param> public void SetTranConfirm(int iCnt) { string strMsg = string.Empty; if (iCnt == 0) { _bComplete = true; SetMsgBar(osiMsgBar03, OpenItemStatus.OK, strMsg20); if (_bAuto) { //종료메시지 strMsg = string.Format(WSWD.WmallPos.FX.Shared.ConfigData.Current.SysMessage.GetMessage("00322"), txtSaleDate.Text, strMsg25); // 정산지 출력 - Journal Print SetPrint(0); //저널파일 FTP 전송 if (!SetFTP()) { _bDisable = false; btnRun.Enabled = true; btnClose.Enabled = true; ChildManager.ShowProgress(false); SetControlDisable(false); //this.DialogResult = DialogResult.Cancel; return; } // 정산지 출력 SetPrint(1); //AppConfig.ini 파일 초기화 if (!SetInitConfig()) { _bDisable = false; btnRun.Enabled = true; btnClose.Enabled = true; ShowMessageBox(WSWD.WmallPos.FX.Shared.MessageDialogType.Information, "", strMsg12); ChildManager.ShowProgress(false); SetControlDisable(false); // this.DialogResult = DialogResult.Cancel; } else { ShowMessageBox(WSWD.WmallPos.FX.Shared.MessageDialogType.Information, "", strMsg); ChildManager.ShowProgress(false); SetControlDisable(false); this.DialogResult = DialogResult.OK; } _bDisable = false; btnRun.Enabled = true; btnClose.Enabled = true; } else { //종료메시지 strMsg = string.Format(WSWD.WmallPos.FX.Shared.ConfigData.Current.SysMessage.GetMessage("00322"), txtSaleDate.Text, strMsg24); //정산지 출력 - Journal Print SetPrint(0); //저널파일 FTP 전송 if (!SetFTP()) { msgBar.Text = strMsg01; _bDisable = false; btnRun.Enabled = true; btnClose.Enabled = true; ChildManager.ShowProgress(false); SetControlDisable(false); return; } //정산지 출력 SetPrint(1); //AppConfig.ini 파일 초기화 if (!SetInitConfig()) { msgBar.Text = strMsg01; ShowMessageBox(WSWD.WmallPos.FX.Shared.MessageDialogType.Information, "", strMsg12); _bDisable = false; btnRun.Enabled = true; btnClose.Enabled = true; ChildManager.ShowProgress(false); SetControlDisable(false); return; } else { ShowMessageBox(WSWD.WmallPos.FX.Shared.MessageDialogType.Information, "", strMsg); #region 포스 종료 ChildManager.ShowProgress(false); SetControlDisable(false); //화면 종료 this.DialogResult = DialogResult.OK; //시스템 종료 InitiateSystemShutdown("\\\\127.0.0.1", null, 0, false, false); #endregion } } } else { //SAT011 업데이트 확인실패 if (TypeHelper.ToInt32(timerChk.Tag.ToString()) > 10) { SetMsgBar(osiMsgBar03, OpenItemStatus.Error, strMsg19); //에러메시지 확인 strMsg = string.Format(WSWD.WmallPos.FX.Shared.ConfigData.Current.SysMessage.GetMessage("00393"), strMsg07, iCnt.ToString(), Environment.NewLine, strMsg08); string[] strBtnNm = new string[1]; strBtnNm[0] = WSWD.WmallPos.FX.Shared.ConfigData.Current.SysMessage.GetMessage("00045"); //strBtnNm[1] = WSWD.WmallPos.FX.Shared.ConfigData.Current.SysMessage.GetMessage("00190"); ShowMessageBox(MessageDialogType.Warning, null, strMsg, strBtnNm); timerChk.Tag = "0"; timerChk.Enabled = true; //if (ShowMessageBox(MessageDialogType.Question, null, strMsg, strBtnNm) == DialogResult.Yes) //{ // //m_Presenter.GetTranConfirm(); // timerChk.Tag = "0"; // timerChk.Interval = 3000; //3초 간격으로 10번 확인 // timerChk.Tick += new EventHandler(timerChk_Tick); // timerChk.Enabled = true; //} //else //{ // _bDisable = false; // btnRun.Enabled = true; // btnClose.Enabled = true; // ChildManager.ShowProgress(false); // SetControlDisable(false); // //화면 종료 // this.DialogResult = DialogResult.Cancel; // if (!_bAuto) // { // //시스템 종료 // InitiateSystemShutdown("\\\\127.0.0.1", null, 0, false, false); // } //} } else { timerChk.Enabled = true; } } }
/// <summary> /// 포인트 적립 전문통신 완료 이벤트 /// </summary> /// <param name="responseData"></param> void pp03_TaskCompleted(WSWD.WmallPos.FX.Shared.NetComm.Response.TaskResponseData responseData) { ChildManager.ShowProgress(false); if (responseData.Response.ResponseState == SocketTrxnResType.Success) { var data = responseData.DataRecords.ToDataRecords <PP03RespData>(); if (data.Length > 0) { if (this.InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate() { BasketPointSave bp = new BasketPointSave(); bp.BasketType = BasketTypes.BasketPointSave; //구분자 bp.FgProgRes = "1"; //포인트처리결과값 bp.NoCard = data[0].CardNo; //카드번호 bp.PointNmMember = data[0].CustName; //포인트회원명 bp.AmPoint = data[0].IssuePoint; //발생포인트 bp.AmMarkNotDay = data[0].AnniversaryPoint; //기념일적용점수 bp.AmMarkEvt = data[0].EventPoint; //행사적용점수 //bp.AmPointAdd3 = data[0].AnniversaryPoint; //추가포인트3 bp.AmPointUsable = data[0].AbtyPoint; //가용점수 bp.AmPointAccu = data[0].CltePoint; //누적점수 bp.AmPointDelay = data[0].DelayPoint; //유예점수 bp.CustGrade = data[0].GradeCode; //고객등급 bp.CustGradeNm = data[0].GradeName; //고객등급명 bp.Remark = data[0].Remark; //비고 bp.NoAppr = data[0].ApprNo; //승인번호 bp.NoPointMember = data[0].CustNo; //포인트회원번호 //bp.ClassMember = data[0].; //회원종류 bp.InputWcc = _cust.InputWcc; //입력형태 bp.PointEvtCode = data[0].PointEventCode; //적용된 포인트 적립 행사 코드 bp.PointEvtName = data[0].PointEventName; //적용된 포인트 적립 행사 명 this.ReturnResult.Clear(); this.ReturnResult.Add("POINT_DATA", bp); this.DialogResult = DialogResult.OK; SetControlDisable(false); }); } else { BasketPointSave bp = new BasketPointSave(); bp.BasketType = BasketTypes.BasketPointSave; //구분자 bp.FgProgRes = "1"; //포인트처리결과값 bp.NoCard = data[0].CardNo; //카드번호 bp.PointNmMember = data[0].CustName; //포인트회원명 bp.AmPoint = data[0].IssuePoint; //발생포인트 bp.AmMarkNotDay = data[0].AnniversaryPoint; //기념일적용점수 bp.AmMarkEvt = data[0].EventPoint; //행사적용점수 //bp.AmPointAdd3 = data[0].; //추가포인트3 bp.AmPointUsable = data[0].AbtyPoint; //가용점수 bp.AmPointAccu = data[0].CltePoint; //누적점수 bp.AmPointDelay = data[0].DelayPoint; //유예점수 bp.CustGrade = data[0].GradeCode; //고객등급 bp.CustGradeNm = data[0].GradeName; //고객등급명 bp.Remark = data[0].Remark; //비고 bp.NoAppr = data[0].ApprNo; //승인번호 bp.NoPointMember = data[0].CustNo; //포인트회원번호 //bp.ClassMember = data[0].; //회원종류 bp.InputWcc = _cust.InputWcc; //입력형태 bp.PointEvtCode = data[0].PointEventCode; //적용된 포인트 적립 행사 코드 bp.PointEvtName = data[0].PointEventName; //적용된 포인트 적립 행사 명 this.ReturnResult.Clear(); this.ReturnResult.Add("POINT_DATA", bp); this.DialogResult = DialogResult.OK; SetControlDisable(false); } } } else if (responseData.Response.ResponseState == WSWD.WmallPos.FX.Shared.NetComm.SocketTrxnResType.NoInfo) { if (this.InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate() { txtCardNo.Text = ""; msgBar.Text = responseData.Response.ErrorMessage.ToString(); SetControlDisable(false); }); } else { txtCardNo.Text = ""; msgBar.Text = responseData.Response.ErrorMessage.ToString(); SetControlDisable(false); } } else { if (this.InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate() { msgBar.Text = responseData.Response.ErrorMessage.ToString(); SetControlDisable(false); }); } else { msgBar.Text = responseData.Response.ErrorMessage.ToString(); SetControlDisable(false); } } }
/// <summary> /// 조회, 저장등의 DB, TRAN 시 Control Enable/Disable /// </summary> void SetControlDisable(bool bDisable) { ChildManager.ShowProgress(bDisable); _bDisable = bDisable; if (!bDisable) { if (POSDeviceManager.Scanner != null) { POSDeviceManager.Scanner.DataEvent += new POSDataEventHandler(Scanner_DataEvent); //Scanner Event } } else { if (POSDeviceManager.Scanner != null) { POSDeviceManager.Scanner.DataEvent -= new POSDataEventHandler(Scanner_DataEvent); //Scanner Event } } if (this.InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate() { foreach (var item in this.ContainerPanel.Controls) { if (item.GetType().Name.ToString().ToLower() == "keypad") { WSWD.WmallPos.POS.FX.Win.UserControls.KeyPad key = (WSWD.WmallPos.POS.FX.Win.UserControls.KeyPad)item; key.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "inputtext") { WSWD.WmallPos.POS.FX.Win.UserControls.InputText txt = (WSWD.WmallPos.POS.FX.Win.UserControls.InputText)item; txt.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "button") { WSWD.WmallPos.POS.FX.Win.UserControls.Button btn = (WSWD.WmallPos.POS.FX.Win.UserControls.Button)item; btn.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "gridpanel") { WSWD.WmallPos.POS.FX.Win.UserControls.GridPanel grd = (WSWD.WmallPos.POS.FX.Win.UserControls.GridPanel)item; grd.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "panel") { Panel pnl = (Panel)item; pnl.Enabled = !_bDisable; } } }); } else { foreach (var item in this.ContainerPanel.Controls) { if (item.GetType().Name.ToString().ToLower() == "keypad") { WSWD.WmallPos.POS.FX.Win.UserControls.KeyPad key = (WSWD.WmallPos.POS.FX.Win.UserControls.KeyPad)item; key.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "inputtext") { WSWD.WmallPos.POS.FX.Win.UserControls.InputText txt = (WSWD.WmallPos.POS.FX.Win.UserControls.InputText)item; txt.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "button") { WSWD.WmallPos.POS.FX.Win.UserControls.Button btn = (WSWD.WmallPos.POS.FX.Win.UserControls.Button)item; btn.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "gridpanel") { WSWD.WmallPos.POS.FX.Win.UserControls.GridPanel grd = (WSWD.WmallPos.POS.FX.Win.UserControls.GridPanel)item; grd.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "panel") { Panel pnl = (Panel)item; pnl.Enabled = !_bDisable; } } } //Application.DoEvents(); }
/// <summary> /// 전문(TR, 결락) 전송완료 /// </summary> /// <param name="responseData"></param> void pu01Task_TaskCompleted(TaskResponseData responseData) { if (responseData.Response.ResponseState == SocketTrxnResType.Success) { if (this.InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate() { if (_dsTR.Tables[0].Rows.Count > 0) { colorProgressBar1.Percentage = (int)(Convert.ToDouble(iRow) / Convert.ToDouble(_dsTR.Tables[0].Rows.Count) * 100); } else { colorProgressBar1.Percentage = 0; } msgBarProgress.Text = string.Format("{0}/{1}", iRow, _dsTR.Tables[0].Rows.Count.ToString()); TransData(); }); } else { if (_dsTR.Tables[0].Rows.Count > 0) { colorProgressBar1.Percentage = (int)(Convert.ToDouble(iRow) / Convert.ToDouble(_dsTR.Tables[0].Rows.Count) * 100); } else { colorProgressBar1.Percentage = 0; } msgBarProgress.Text = string.Format("{0}/{1}", iRow, _dsTR.Tables[0].Rows.Count.ToString()); TransData(); } } else if (responseData.Response.ResponseState == WSWD.WmallPos.FX.Shared.NetComm.SocketTrxnResType.NoInfo) { ChildManager.ShowProgress(false); if (this.InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate() { msgBar.Text = responseData.Response.ErrorMessage.ToString(); SetControlDisable(false); }); } else { msgBar.Text = responseData.Response.ErrorMessage.ToString(); SetControlDisable(false); } } else { ChildManager.ShowProgress(false); if (this.InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate() { msgBar.Text = responseData.Response.ErrorMessage.ToString(); SetControlDisable(false); }); } else { msgBar.Text = responseData.Response.ErrorMessage.ToString(); SetControlDisable(false); } } }