示例#1
0
 private void txtCompanyName_KeyPress(object sender, KeyPressEventArgs e)
 {
     try
     {
         int ascii = e.KeyChar;
         DataValidator.AllowOnlyCharacter(ascii, e);
     }
     catch (Exception exc)
     {
         Utill.Common.ExceptionLogger.writeException("Customer-List", exc.StackTrace);
         MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
     }
 }
示例#2
0
 private void txtValue_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (cmbApply.SelectedIndex > 0)
     {
         if (cmbApply.SelectedIndex == 1 || cmbApply.SelectedIndex == 2)
         {
             DataValidator.AllowOnlyNumeric(e, ".");
         }
         else
         {
             int ascii = e.KeyChar;
             DataValidator.AllowOnlyCharacter(ascii, e);
         }
     }
 }
示例#3
0
        private void txtFromentryno_KeyPress(object sender, KeyPressEventArgs e)
        {
            int ascii = e.KeyChar;

            DataValidator.AllowOnlyCharacter(ascii, e);
        }