private void btnLogin_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtOperatorID.Text)) { Ultils.TextControlNotNull(txtOperatorID, "Operator ID"); } else if (string.IsNullOrEmpty(txtLineID.Text)) { Ultils.TextControlNotNull(txtLineID, "Line ID"); } else if (string.IsNullOrEmpty(txtOperationID.Text)) { Ultils.TextControlNotNull(txtOperationID, "Operation ID"); } else { var user = new User() { OperatorCode = _operator.OperatorID, OperatorName = _operator.OperatorName, LineID = int.Parse(txtLineID.EditValue.ToString()), OperationID = int.Parse(txtOperationID.EditValue.ToString()) }; Program.CurrentUser = user; Hide(); if (Program.CurrentUser != null) { var qa = new FormQACheck(); qa.ShowDialog(); } } }