示例#1
0
        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)
            {

            }
        }
示例#2
0
 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)
     {
     }
 }
示例#3
0
 // --- FORMULARZE
 public void ShowOrderAddForm()
 {
     OrderForm form = new OrderForm();
     OrderFormController formController = new OrderFormController(form, Operation.Add);
     formController.Queries = queriesOrder;
     dr = form.ShowDialog();
     ReloadIfFormReturnedOK();
 }
示例#4
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)
            {

            }
        }
示例#5
0
 public void ShowOrderDeleteForm()
 {
     if (MessageBox.Show("Czy chcesz usunąć zamówienie?", "Wypożyczalnia", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         Zamówienie order = orders.GetActiveElement();
         OrderForm form = new OrderForm(order);
         OrderFormController formController = new OrderFormController(form, Operation.Delete);
         formController.OrderQuery = queriesOrder;
         formController.WarehouseQuery = queriesWarehouse;
         formController.Delete();
         dr = DialogResult.OK;
         ReloadIfFormReturnedOK();
     }
 }
示例#6
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();
        }