Example #1
0
 private void DPNumber_Validated(object sender, EventArgs e)
 {
     if (ComboCentral.Text == string.Empty || ComboCabina.Text == string.Empty || DPNumber.Text == string.Empty)
     {
         ComboCentral.Focus();
     }
     else
     {
         if (vrify(pr.ReturnUpperString(DPNumber.Text)))
         {
             MessageBox.Show("البكس موجود بالفعل", "Erorr", MessageBoxButtons.OK, MessageBoxIcon.Error);
             DPNumber.Clear();
             DPNumber.Focus();
         }
         else
         {
             AreaDP.Focus();
         }
     }
 }
 private void CabinaCabel_Validated(object sender, EventArgs e)
 {
     if (button1.Text == "حفظ")
     {
         if (combocent.Text == string.Empty || CabinaCabel.Text == string.Empty || ComboType.Text == string.Empty)
         {
             combocent.Focus();
         }
         else
         {
             if (vrify(pr.ReturnUpperString(CabinaCabel.Text)))
             {
                 MessageBox.Show("الكبينة موجودة بالفعل", "Erorr", MessageBoxButtons.OK, MessageBoxIcon.Error);
                 CabinaCabel.Focus();
                 CabinaCabel.SelectionStart  = 0;
                 CabinaCabel.SelectionLength = CabinaCabel.Text.Length;
             }
             else
             {
                 tetarea.Focus();
             }
         }
     }
 }