예제 #1
0
        private void AddNewEmployee()
        {
            FmEmployeeEditor fmEmployeeEditor = new FmEmployeeEditor();

            if (fmEmployeeEditor.ShowDialog() == DialogResult.OK)
            {
                List <Employee> employees = new List <Employee>(GetEmployees());
                FillCtlEmployees(employees);
            }
        }
예제 #2
0
        private void EditSelectedClient()
        {
            if (ctlEmployees.SelectedCells.Count > 0)
            {
                Employee employee = (Employee)ctlEmployees.SelectedCells[0].OwningRow.DataBoundItem;

                FmEmployeeEditor fmEmployeeEditor = new FmEmployeeEditor(employee);
                if (fmEmployeeEditor.ShowDialog() == DialogResult.OK)
                {
                    List <Employee> employees = new List <Employee>(GetEmployees());
                    FillCtlEmployees(employees);
                }
            }
        }