Пример #1
0
        private void lokalButton_Click(object sender, EventArgs e)
        {
            panelOfOrderForms.Visible  = false;
            panelAllOrders.Visible     = false;
            panelOfMenuContent.Visible = true;
            panelOrderTree.Visible     = true;
            Order order = new Order();

            listOrder.Add(order);
            listOrder.Last().getTypeOfOrder = "LOKAL";
            drawMenuCategory menu           = new drawMenuCategory(listOrder.Last());

            menu.addCategoriesToPanel(panelOfMenuContent);
            menu.addTreeViewToPanel(panelOrderTree);
        }
Пример #2
0
        private void OrderButton_Click(object sender, EventArgs e)
        {
            orderButton b = sender as orderButton;

            panelOfOrderForms.Visible  = false;
            panelAllOrders.Visible     = false;
            panelOfMenuContent.Visible = true;
            panelOrderTree.Visible     = true;
            drawMenuCategory menu = new drawMenuCategory(b.getOrder);

            menu.updateTreeViewForExistingOrder(b.getOrder);
            menu.addCategoriesToPanel(panelOfMenuContent);
            menu.addTreeViewToPanel(panelOrderTree);
            clickedOrder = b.getId;
        }
Пример #3
0
        private void dowozButton_Click(object sender, EventArgs e)
        {
            List <Label> labelList = new List <Label>();

            newDelivery = new DeliveryForm();
            newDelivery.ShowDialog();
            if (newDelivery.getDelivery != null)
            {
                newDeliveryInfo            = newDelivery.getDelivery;
                panelOfOrderForms.Visible  = false;
                panelOfMenuContent.Visible = true;
                panelDeliveryInfo.Visible  = true;
                panelOrderTree.Visible     = true;
                Order order = new Order();
                listOrder.Add(order);
                listOrder.Last().getTypeOfOrder = "DOWOZ";
                listOrder.Last().getDelivery    = newDeliveryInfo;
                drawMenuCategory menu           = new drawMenuCategory(listOrder.Last());
                menu.addCategoriesToPanel(panelOfMenuContent);
                menu.addTreeViewToPanel(panelOrderTree);
                foreach (Label label in panelDeliveryInfo.Controls.OfType <Label>())
                {
                    if (label.Text == "NR TELEFONU:")
                    {
                        label.Text += " " + newDeliveryInfo.getPhoneNumber;
                    }
                    if (label.Text == "ADRES:")
                    {
                        label.Text += " " + newDeliveryInfo.getStreet + "   " + newDeliveryInfo.getStreetNumber + " / " + newDeliveryInfo.getFlatNumber;
                    }
                    if (label.Text == "FORMA PŁATNOŚCI:")
                    {
                        label.Text += " " + newDeliveryInfo.getPayForm;
                    }
                }
                panelDeliveryInfo.Visible = true;
                panelAllOrders.Visible    = false;
            }
        }