示例#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);
                }
            }
        }