public bool ErrorCheck() { if (string.IsNullOrWhiteSpace(txtPayment.Text)) { trgshbl.ShowMessage("E102"); txtPayment.Focus(); return(false); } DataTable dt = new DataTable(); dt = trgshbl.SimpleSelect1("70", ChangeDate.Replace("/", "-"), InOperatorCD); if (dt.Rows.Count > 0) { trgshbl.ShowMessage("E252"); return(false); } if (cboDenominationName.SelectedValue.ToString() == "-1") { trgshbl.ShowMessage("E102"); cboDenominationName.Focus(); return(false); } return(true); }
/// <summary> /// 入力必須エラーをチェックする /// </summary> private bool ErrorCheck() { if (!RequireCheck(new Control[] { ExchangeMoney, ExchangeDenomination })) // go that focus { return(false); } if (ExchangeDenomination.SelectedValue.ToString() == "-1") { trrnbl.ShowMessage("E102"); ExchangeDenomination.Focus(); ExchangeDenomination.MoveNext = false; ExchangeCount.MoveNext = false; return(false); } DataTable dt = new DataTable(); //dt = trrnbl.SimpleSelect1("70",null, storeCD,null,null); dt = trrnbl.SimpleSelect1("70", ChangeDate.Replace("/", "-"), storeCD); if (dt.Rows.Count > 0) { trrnbl.ShowMessage("E252"); return(false); } if (!RequireCheck(new Control[] { ExchangeCount })) // go that focus { return(false); } return(true); }
private void Save() { if (ErrorCheck()) { if (trgshbl.ShowMessage("Q101") == DialogResult.Yes) { DataTable dt = new DataTable(); dt = trgshbl.SimpleSelect1("70", ChangeDate.Replace("/", "-"), InOperatorCD); if (dt.Rows.Count > 0) { trgshbl.ShowMessage("E252"); } if (trgshbl.TempoRegiShiNyuuryoku_InsertUpdate(ddpe)) { trgshbl.ShowMessage("I101"); RunConsole();//exeRun <<<< PTK txtPayment.Clear(); txtPayment.Focus(); cboDenominationName.SelectedValue = "-1"; txtRemarks.Clear(); DisplayData(); } } } }
public bool ErrorCheck() { if (!RequireCheck(new Control[] { txtPayment, cboDenominationName })) { return(false); } DataTable dt = new DataTable(); dt = trntBL.SimpleSelect1("70", ChangeDate.Replace("/", "-"), StoreCD); if (dt.Rows.Count > 0) { trntBL.ShowMessage("E252"); return(false); } if (!string.IsNullOrWhiteSpace(txtCustomerCD.Text)) { DataTable dtCust = new DataTable(); dtCust = trntBL.SimpleSelect1("36", null, txtCustomerCD.Text); if (dtCust.Rows.Count < 1) { trntBL.ShowMessage("E101"); txtCustomerCD.Focus(); return(false); } } return(true); }
/// /// <summary> /// 登録ボタンを押下時データベースにInsertする /// </summary> public void Save() { if (ErrorCheck()) { if (ExchangeLabel.Text != ExchangeMoney.Text) { trrnbl.ShowMessage("E181"); ExchangeCount.Focus(); } else { if (trrnbl.ShowMessage("Q101") == DialogResult.Yes) { DataTable dt = new DataTable(); dt = trrnbl.SimpleSelect1("70", ChangeDate.Replace("/", "-"), storeCD); if (dt.Rows.Count > 0) { trrnbl.ShowMessage("E252"); } valid = false; mre = DepositHistoryEnity(); if (trrnbl.TempoRegiRyougaeNyuuryoku_Insert_Update(mre)) { trrnbl.ShowMessage("I101"); RunConsole(); //exeRun ExchangeDenomination.SelectedValue = "-1"; ExchangeMoney.Clear(); ExchangeCount.Clear(); ExchangeLabel.Text = ""; Remark.Clear(); ExchangeMoney.Focus(); } else { trrnbl.ShowMessage("S001"); } } else { PreviousCtrl.Focus(); //Remark.Focus(); } } } }
private bool ErrorCheck() { if (!RequireCheck(new Control[] { txtDate, DepositGaku })) // go that focus { return(false); } DataTable dt = new DataTable(); dt = trtjb.SimpleSelect1("71", ChangeDate.Replace("/", "-"), storeCD, txtDate.Text); if (dt.Rows.Count > 0) { trtjb.ShowMessage("E252"); return(false); } return(true); }
private void Save() { if (ErrorCheck()) { if (trntBL.ShowMessage("Q101") == DialogResult.Yes) { DataTable dt = new DataTable(); dt = trntBL.SimpleSelect1("70", ChangeDate.Replace("/", "-"), StoreCD); if (dt.Rows.Count > 0) { trntBL.ShowMessage("E252"); } ddpe = GetDepositEntity(); if (trntBL.TempoNyuukinTouroku_D_DepositHistory_InsertUpdate(ddpe)) { if (!string.IsNullOrWhiteSpace(txtCustomerCD.Text)) { dce = GetDCollectData(); trntBL.TempoNyuukinTouroku_D_Collect_Insert(dce); } trntBL.ShowMessage("I101"); RunConsole(); txtPayment.Clear(); txtPayment.Focus(); cboDenominationName.SelectedValue = "-1"; txtCustomerCD.Clear(); lblCustomerName.Text = string.Empty; txtRemarks.Clear(); DisplayData(); chkAdvanceFlg.Enabled = chkAdvanceFlg.Checked = false; } } else { PreviousCtrl.Focus(); } } }
/// <summary> /// 登録ボタンを押下時データベースにInsertする /// </summary> public void Save() { if (ErrorCheck()) { { if (trtjb.ShowMessage("Q101") == DialogResult.Yes) { DataTable dt = new DataTable(); dt = trtjb.SimpleSelect1("70", ChangeDate.Replace("/", "-"), storeCD, txtDate.Text); if (dt.Rows.Count > 0) { trtjb.ShowMessage("E252"); } mre = DepositHistoryEnity(); if (trtjb.TempoRegiTsurisenJyunbi_Insert_Update(mre)) { trtjb.ShowMessage("I101"); RunConsole(); txtDate.Clear(); DepositGaku.Clear(); Remark.Clear(); txtDate.Focus(); } else { trtjb.ShowMessage("S001"); } } else { DepositGaku.Focus(); } } } }