Exemplo n.º 1
0
        private void AddEmployeeButton_Click(object sender, EventArgs e)
        {
            var addEmployee = new EditEmployeeForm();

            addEmployee.ShowDialog();
            RefreshEmployeesListBox();
        }
Exemplo n.º 2
0
        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();
        }