public void ShowEmployeeDeleteForm() { try { Pracownik employee = employees.GetActiveElement(); EmployeeForm form = new EmployeeForm(employee, functions); EmployeeFormController formController = new EmployeeFormController(form, Operation.Delete); formController.Queries = queriesEmployee; form.ShowDialog(); // odswiezenie danych SelectAllAtActiveWindow(); } catch (NullReferenceException ex) { } }
public void ShowEmployeeEditForm() { try { Pracownik employee = employees.GetActiveElement(); EmployeeForm form = new EmployeeForm(employee, functions); EmployeeFormController formController = new EmployeeFormController(form, Operation.Edit); formController.Queries = queriesEmployee; dr = form.ShowDialog(); // odswiezenie danych ReloadIfFormReturnedOK(); } catch (NullReferenceException ex) { // pusta tabela/? } }
// --- FORMULARZE public void ShowEmployeeAddForm() { EmployeeForm form = new EmployeeForm(functions); EmployeeFormController formController = new EmployeeFormController(form, Operation.Add); formController.Queries = queriesEmployee; dr = form.ShowDialog(); // odswiezenie danych ReloadIfFormReturnedOK(); }