private void txtItemCls_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (!KeyPressJudge.IsStr(e.KeyChar))
     {
         e.Handled = true;
     }
 }
Example #2
0
 private void txtName_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (KeyPressJudge.IsStr(e.KeyChar) || KeyPressJudge.IsBackKey(e.KeyChar) || e.KeyChar == 8 || Char.IsDigit(e.KeyChar))
     {
     }
     else
     {
         e.Handled = true;
     }
 }
Example #3
0
 private void txtSupName_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (!KeyPressJudge.IsStr(e.KeyChar))
     {
         e.Handled = true;
     }
     if (KeyPressJudge.IsBackKey(e.KeyChar) == false && e.KeyChar != 8)
     {
         if (StringHelper.GetLength(txtSupName.Text) >= 100)
         {
             e.Handled = true;
         }
     }
 }