Пример #1
0
 private void Sports_CodeKeyDownEvent(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         Sports.ChangeDate = bbl.GetDate();
         if (!string.IsNullOrEmpty(Sports.TxtCode.Text))
         {
             if (!Sports.SelectData())
             {
                 Sports.Value1 = "202";
                 bbl.ShowMessage("E101");
                 Sports.SetFocus(1);
             }
         }
     }
 }
Пример #2
0
 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);
 }