Esempio n. 1
0
        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)
            {

            }
        }
Esempio n. 2
0
        // --- 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();
        }