public WarehouseFormController(WarehouseForm form, Operation operation)
 {
     this.form = form;
     form.SetController(this);
     this.operation = operation;
     SetFormTitle();
     SetTextBoxesState();
 }
예제 #2
0
 public void ShowWarehouseEditForm()
 {
     try
     {
         Część part = warehouse.GetActiveElement();
         WarehouseForm form = new WarehouseForm(part, statuses);
         WarehouseFormController formController = new WarehouseFormController(form, Operation.Edit);
         formController.Queries = queriesWarehouse;
         dr = form.ShowDialog();
         // odswiezenie danych
         ReloadIfFormReturnedOK();
     }
     catch (NullReferenceException ex)
     {
         // pusta tabela/?
     }
 }
예제 #3
0
        public void ShowWarehouseDeleteForm()
        {
            try
            {
                Część part = warehouse.GetActiveElement();
                WarehouseForm form = new WarehouseForm(part, statuses);
                WarehouseFormController formController = new WarehouseFormController(form, Operation.Delete);
                formController.Queries = queriesWarehouse;
                form.ShowDialog();
                // odswiezenie danych
                SelectAllAtActiveWindow();
            }
            catch (NullReferenceException ex)
            {

            }
        }
예제 #4
0
 // --- FILTRY
 public void ShowWarehouseAddForm()
 {
     WarehouseForm form = new WarehouseForm(statuses);
     WarehouseFormController formController = new WarehouseFormController(form, Operation.Add);
     formController.Queries = queriesWarehouse;
     dr = form.ShowDialog();
     // odswiezenie danych
     ReloadIfFormReturnedOK();
 }
 public WarehouseFormController(WarehouseForm form)
 {
     this.form = form;
     form.SetController(this);
 }