private void txtStaffName_Validating(object sender, CancelEventArgs e) { if (!ValidateInput.ValidOnlyLetter(txtStaffName.Text, out errMsg)) { CancelValidatedEvent(grpStaffName, lblStaffNameError, e); } }
private void txtReaderName_Validating(object sender, CancelEventArgs e) { if (ValidateInput.IsEmpty(txtReaderName.Text, out errMsg)) { CancelValidatedEvent(grpReaderName, lblReaderNameError, e); } if (!ValidateInput.ValidOnlyLetter(txtReaderName.Text, out errMsg)) { CancelValidatedEvent(grpReaderName, lblReaderNameError, e); } }
private void txtGenreName_Validating(object sender, CancelEventArgs e) { if (ValidateInput.IsEmpty(txtGenreName.Text, out errMsg)) { errMsg = "Trường này không được trống"; CancelValidatedEvent(lblGenreNameError, e); } else if (!ValidateInput.ValidOnlyLetter(txtGenreName.Text, out errMsg)) { CancelValidatedEvent(lblGenreNameError, e); } }