public void ShowOrderEditForm() { try { Zamówienie order = orders.GetActiveElement(); OrderForm form = new OrderForm(order); OrderFormController formController = new OrderFormController(form, Operation.Edit); formController.Queries = queriesOrder; dr = form.ShowDialog(); ReloadIfFormReturnedOK(); } catch (NullReferenceException ex) { } }
public void ShowOrderDeleteForm() { try { Zamówienie order = orders.GetActiveElement(); OrderForm form = new OrderForm(order); OrderFormController formController = new OrderFormController(form, Operation.Delete); formController.Queries = queriesOrder; form.ShowDialog(); SelectAllAtActiveWindow(); } catch (NullReferenceException ex) { } }
public void ShowOrderEditForm() { try { Zamówienie order = orders.GetActiveElement(); OrderForm form = new OrderForm(order); OrderFormController formController = new OrderFormController(form, Operation.Edit); formController.OrderQuery = queriesOrder; formController.WarehouseQuery = queriesWarehouse; form.PartsNotAddedToOrder = queriesOrder.SelectPartsAvailableToOrder(); form.PartsAddedToOrder = queriesOrder.SelectPartsByOrder((int)order.Zamówienie_ID); form.SetColumns(); dr = form.ShowDialog(); ReloadIfFormReturnedOK(); } catch (NullReferenceException) { } }
// --- FORMULARZE public void ShowOrderAddForm() { OrderForm form = new OrderForm(); OrderFormController formController = new OrderFormController(form, Operation.Add); formController.Queries = queriesOrder; dr = form.ShowDialog(); ReloadIfFormReturnedOK(); }
// --- FORMULARZE public void ShowOrderAddForm() { OrderForm form = new OrderForm(); OrderFormController formController = new OrderFormController(form, Operation.Add); formController.OrderQuery = queriesOrder; formController.WarehouseQuery = queriesWarehouse; form.PartsNotAddedToOrder = queriesOrder.SelectPartsAvailableToOrder(); form.PartsAddedToOrder = form.PartsNotAddedToOrder.Clone(); form.SetColumns(); dr = form.ShowDialog(); ReloadIfFormReturnedOK(); }