Пример #1
0
        // --- --- --- --- --- PRACOWNIK --- --- --- --- --- //
        #region Pracownik
        // --- 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();
        }
Пример #2
0
 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)
     {
     }
 }
Пример #3
0
 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/?
     }
 }