コード例 #1
0
        public ActionResult Return_Url(string id)
        {
            var order = order_Service.GetOrder(id);

            ViewBag.Order   = order;
            ViewBag.Account = customer_Service.GetCustomer(order.Email);
            ViewBag.Address = address_Service.GetOrderAddresses().Find(x => x.Order_ID == order.Order_ID);
            ViewBag.Items   = order_Service.GetOrderItems(order.Order_ID);
            ViewBag.Total   = order_Service.GetOrderTotal(order.Order_ID);
            return(View());
        }
コード例 #2
0
ファイル: OrderForm.cs プロジェクト: Muskan610/OrderingSystem
 public List <OrderItem> getOrderItems(int orderID)
 {
     return(order_service.GetOrderItems(orderID));
 }
コード例 #3
0
ファイル: OrderUI.cs プロジェクト: PietNeerschiet/Chapoo1819
        private void ShowPanel(string panelName)
        {
            // Hide all panels
            HideAllPanels();

            //Show designated panel
            if (panelName == "menu")
            {
                SetTableColors();
                pnl_Menu.Show();
            }
            else if (panelName == "tableMenu")
            {
                pnl_TableMenu.Show();
                lbl_TableNumber.Text = "Tafel: " + TableNumber;

                if (tableButtons[TableNumber - 1].BackColor == Color.Red)
                {
                    btn_TableInUse.Text = "Zet tafel niet bezet";
                }
                else
                {
                    btn_TableInUse.Text = "Zet tafel bezet";
                }
            }
            else if (panelName == "takeOrder")
            {
                pnl_TakeOrder.Show();

                ResetButtons(true);

                cb_Quantity.SelectedIndex = 0;
                OverviewButtomText();
            }
            else if (panelName == "OverviewOrder")
            {
                pnl_OverviewOrder.Show();

                lbl_OrderOverQuantity.Hide();
                btn_AddQuantity.Hide();
                btn_RemoveQuantity.Hide();
                btn_RemoveItem.Hide();

                listViewOrderOverview.Items.Clear();

                foreach (OrderItem item in orderItems)
                {
                    ListViewItem lvItem = new ListViewItem(new string[] { item.MenuProduct.Name, item.Quantity.ToString(), item.Comment });
                    lvItem.Tag = item;
                    listViewOrderOverview.Items.Add(lvItem);
                }
            }
            else if (panelName == "ViewOrders")
            {
                pnl_ViewOrders.Show();

                lbl_OrdersQuantity.Hide();
                btn_OrdersDelete.Hide();
                btn_OrdersMinus.Hide();
                btn_OrdersPlus.Hide();

                btn_OrdersBackCancel.Text    = "Terug";
                btn_OrdersChangeConfirm.Text = "Wijzig";

                orderItems = order_Service.GetOrderItems(TableNumber);

                listViewViewOrders.Items.Clear();

                ViewOrders viewOrders = ViewOrders.MakeInstances(orderItems);

                foreach (OrderItem item in viewOrders.GetSortedItems())
                {
                    ListViewItem lvItem = new ListViewItem(new string[] { item.MenuProduct.Name, item.Quantity.ToString(), item.Comment });
                    lvItem.Tag = item;
                    listViewViewOrders.Items.Add(lvItem);
                }
            }

            //else if (panelName == "....")
            //{
            //    pnl_,,,.Show();
            //}
        }