private void txtOperatorID_Validating(object sender, CancelEventArgs e) { string operatorCode = txtOperatorID.Text; if (!string.IsNullOrEmpty(operatorCode)) { _operator = _oqcService.GetOperatorByCode(operatorCode); if (_operator == null) { Ultils.EditTextErrorMessage(txtOperatorID, "Opeator code không tồn tại trong hệ thống!"); } else { txtLineID.Focus(); } } }
private void txtOperatorID_Validating(object sender, CancelEventArgs e) { string operatorCode = txtOperatorID.Text; if (string.IsNullOrEmpty(operatorCode)) { Ultils.TextControlNotNull(txtOperatorID, "Operator"); txtOperatorID.SelectAll(); } else { var operators = _oqcService.GetOperatorByCode(operatorCode); if (operators == null) { Ultils.EditTextErrorMessage(txtOperatorID, "Opeator code không tồn tại trong hệ thống!"); } else { _operator = operators; } } }