public WarehouseFormController(WarehouseForm form, Operation operation) { this.form = form; form.SetController(this); this.operation = operation; SetFormTitle(); SetTextBoxesState(); }
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/? } }
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) { } }
// --- 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); }