private void tbxUnit_Validating(object sender, CancelEventArgs e)
 {
     if (tbxUnit.Text == null)
     {
         e.Cancel = true;
     }
     else
     {
         ValidatingUtil.Validating(tbxUnit, Convert.ToDouble(tbxUnit.Text) == 0, e);
     }
 }
 private void tbxMax_Validating(object sender, CancelEventArgs e)
 {
     ValidatingUtil.Validating(tbxName, Convert.ToInt32(tbxMax.Text.Trim()) < Convert.ToInt32(tbxCurrent.Text.Trim()), "จำนวนความจุต้องไม่ตำกว่าจำนวนปัจจุบัน", e);
 }
 private void tbxName_Validating(object sender, CancelEventArgs e)
 {
     ValidatingUtil.Validating(tbxName, 0, e);
 }
Example #4
0
 private void cbx_Validating(object sender, CancelEventArgs e)
 {
     ValidatingUtil.Validating((ComboBox)sender, ((ComboBox)sender).SelectedValue == null, e);
 }
Example #5
0
 private void cbxText_Validating(object sender, CancelEventArgs e)
 {
     ValidatingUtil.Validating((ComboBox)sender, ((ComboBox)sender).Text.Trim().Length == 0, e);
 }
Example #6
0
 private void cbxSuppliesType_Validating(object sender, CancelEventArgs e)
 {
     ValidatingUtil.Validating(cbxSuppliesType, cbxSuppliesType.SelectedValue == null, e);
 }
Example #7
0
 private void tbxSuppliesName_Validating(object sender, CancelEventArgs e)
 {
     ValidatingUtil.Validating(tbxSuppliesName, tbxSuppliesName.Text.Length == 0, e);
 }
 private void tbxUnit_Validating(object sender, System.ComponentModel.CancelEventArgs e)
 {
     ValidatingUtil.Validating(tbxUnit, Convert.ToDouble(tbxUnit.Text) == 0, "ต้องมากกว่า 0", e);
 }
 private void tbxName_Validating(object sender, System.ComponentModel.CancelEventArgs e)
 {
     ValidatingUtil.Validating(tbxName, 0, e);
 }
 private void cbxBy_Validating(object sender, CancelEventArgs e)
 {
     ValidatingUtil.Validating(cbxBy, cbxBy.SelectedValue == null, e);
 }
 private void tbxSymptom_Validating(object sender, CancelEventArgs e)
 {
     ValidatingUtil.Validating(tbxSymptom, tbxSymptom.Text.Trim().Length == 0, e);
 }