private void AddEmployeeButton_Click(object sender, EventArgs e) { var addEmployee = new EditEmployeeForm(); addEmployee.ShowDialog(); RefreshEmployeesListBox(); }
private void EditEmployeeButton_Click(object sender, EventArgs e) { var checkedEmployees = new List <Employee>(); foreach (var checkedEmployeeItem in EmployeeListBox.CheckedItems) { checkedEmployees.Add(EmployeeRepo.GetEmployeeByOib(checkedEmployeeItem.ToString().GetOib())); } if (checkedEmployees.Count == 0) { return; } foreach (var employee in checkedEmployees) { var editProject = new EditEmployeeForm(employee); editProject.ShowDialog(); } RefreshEmployeesListBox(); }