public ClientFormController(ClientForm form, Operation operation)
 {
     this.form = form;
     form.SetController(this);
     this.operation = operation;
     SetFormTitle();
     SetTextBoxesState();
 }
Example #2
0
 public void ShowClientEditForm()
 {
     try
     {
         Klient client = clients.GetActiveElement();
         ClientForm form = new ClientForm(client);
         ClientFormController formController = new ClientFormController(form, Operation.Edit);
         formController.Queries = queriesClient;
         dr = form.ShowDialog();
         // odswiezenie danych
         ReloadIfFormReturnedOK();
     }
     catch (NullReferenceException ex)
     {
         // pusta tabela/?
     }
 }
Example #3
0
 // --- FORMULARZE
 public void ShowClientAddForm()
 {
     ClientForm form = new ClientForm();
     ClientFormController formController = new ClientFormController(form, Operation.Add);
     formController.Queries = queriesClient;
     dr = form.ShowDialog();
     // odswiezenie danych
     ReloadIfFormReturnedOK();
 }
 public ClientFormController(ClientForm form)
 {
     this.form = form;
     form.SetController(this);
 }