private void buttonSearch_Click(object sender, EventArgs e) //ok { int searchEmpId = Convert.ToInt32(textBoxSearchId.Text); Employee emp = new Employee(); emp = emp.SearchEmployeeById(searchEmpId); if (emp != null) { textBoxEmployeeId.Text = (emp.EmployeeId).ToString(); textBoxFirstName.Text = emp.FirstName; textBoxLastName.Text = emp.LastName; textBoxJobTitle.Text = emp.JobTitle; textBoxUserType.Text = emp.UserType; textBoxPassword.Text = emp.Password; textBoxEmail.Text = emp.Email; textBoxSearchId.Clear(); } else { MessageBox.Show("Employee not found!"); textBoxSearchId.Clear(); } }