private bool ErrorCheck(int Type) { if (!string.IsNullOrEmpty(Shiiresaki.TxtCode.Text)) { if (!Shiiresaki.IsExists(2)) { sss_bl.ShowMessage("E101"); Shiiresaki.SetFocus(1); return(false); } } switch (Type) { case 1: if (!RequireCheck(new Control[] { txtPayCloseDate })) //Step1 { return(false); } if (!sss_bl.Select_PaymentClose(dpch_entity, 1)) //Step2 { sss_bl.ShowMessage("S013"); cboProcessType.Focus(); return(false); } if (sss_bl.Select_PaymentClose(dpch_entity, 2)) //Step3 { sss_bl.ShowMessage("S014"); cboProcessType.Focus(); return(false); } break; case 2: if (!RequireCheck(new Control[] { txtPayCloseDate })) //Step1 { return(false); } if (!sss_bl.Select_PaymentClose(dpch_entity, 3)) //Step2 { sss_bl.ShowMessage("S013"); cboProcessType.Focus(); return(false); } if (sss_bl.Select_PaymentClose(dpch_entity, 4)) //Step3 { sss_bl.ShowMessage("S015"); cboProcessType.Focus(); return(false); } break; } return(true); }
private bool ErrorCheck() { if (!String.IsNullOrEmpty(Shiiresaki.TxtCode.Text)) { if (!Shiiresaki.IsExists(2)) { bbl.ShowMessage("E101"); Shiiresaki.SetFocus(1); return(false); } } if (!String.IsNullOrEmpty(Maker.TxtCode.Text)) { if (!Maker.IsExists(2)) { bbl.ShowMessage("E101"); Maker.SetFocus(1); return(false); } } if (!String.IsNullOrEmpty(SearchBrand.TxtCode.Text)) { if (!SearchBrand.IsExists(2)) { bbl.ShowMessage("E101"); SearchBrand.SetFocus(1); return(false); } } if (!String.IsNullOrEmpty(jan.TxtCode.Text)) { if (!jan.IsExists(2)) { bbl.ShowMessage("E101"); jan.SetFocus(1); return(false); } } if (!String.IsNullOrEmpty(sku.TxtCode.Text)) { if (!sku.IsExists(2)) { bbl.ShowMessage("E101"); sku.SetFocus(1); return(false); } } if (!String.IsNullOrEmpty(Sports.TxtCode.Text)) { if (!Sports.IsExists(2)) { bbl.ShowMessage("E101"); Sports.SetFocus(1); return(false); } } if (!String.IsNullOrEmpty(TB_ShinkitorokuF.Text) && !String.IsNullOrEmpty(TB_ShinkitorokuT.Text)) { if (Convert.ToDateTime(TB_ShinkitorokuF.Text) > Convert.ToDateTime(TB_ShinkitorokuT.Text)) { bbl.ShowMessage("E104"); TB_ShinkitorokuF.Focus(); return(false); } } if (!String.IsNullOrEmpty(TB_RackNoF.Text) && !String.IsNullOrEmpty(TB_RackNoT.Text)) { if (String.Compare(TB_RackNoF.Text, TB_RackNoT.Text) == 1) { bbl.ShowMessage("E106"); TB_RackNoF.Focus(); return(false); } } if (!String.IsNullOrEmpty(TB_SaiShuhenkobiF.Text) && !String.IsNullOrEmpty(TB_SaiShuhenkobiT.Text)) { if (Convert.ToDateTime(TB_SaiShuhenkobiF.Text) > Convert.ToDateTime(TB_SaiShuhenkobiT.Text)) { bbl.ShowMessage("E104"); TB_SaiShuhenkobiF.Focus(); return(false); } } if (!String.IsNullOrEmpty(TB_ShoninbiF.Text) && !String.IsNullOrEmpty(TB_ShoninbiT.Text)) { if (Convert.ToDateTime(TB_ShoninbiF.Text) > Convert.ToDateTime(TB_ShoninbiT.Text)) { bbl.ShowMessage("E104"); TB_ShoninbiF.Focus(); return(false); } } return(true); }