private void txtItemCls_KeyPress(object sender, KeyPressEventArgs e) { if (!KeyPressJudge.IsStr(e.KeyChar)) { e.Handled = true; } }
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; } }
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; } } }