private void AddNewEmployee() { FmEmployeeEditor fmEmployeeEditor = new FmEmployeeEditor(); if (fmEmployeeEditor.ShowDialog() == DialogResult.OK) { List <Employee> employees = new List <Employee>(GetEmployees()); FillCtlEmployees(employees); } }
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); } } }