Ejemplo n.º 1
0
        private void ShowOrder(Order showOrder)
        {
            lv_Order.Items.Clear();
            showOrder.items = takeOrder_Service.RetrieveOrderItems(showOrder);

            foreach (Item item in showOrder.items)
            {
                ListViewItem listViewItem = new ListViewItem(item.Name);
                listViewItem.SubItems.Add(item.Amount.ToString());
                listViewItem.SubItems.Add(item.Price.ToString());

                lv_Order.Items.Add(listViewItem);
            }
            lv_Order.Show();
        }
Ejemplo n.º 2
0
        public Order_Table(Order order, string view)
        {
            this.view = view;

            InitializeComponent();
            //timer needed for refresh
            timer          = new Timer();
            timer.Interval = (1000);
            timer.Tick    += new EventHandler(timer1_Tick);
            timer.Start();
            //retrieve the current order items
            this.order  = order;
            order.items = take.RetrieveOrderItems(order);
            //the time the order was created
            lbl_timetbl.Text = order.TimeStamp.ToString("hh:mm:ss");
            ShowOrder();
        }