示例#1
0
        void LoadOrdersHistoryList()
        {
            btn_RefreshOrders.Hide();
            OrdStatusbtn.Hide();

            All_Order_Items = ProcessOrder.Get_All_READY_Orders(IsChef(currentUser.jobType));

            listViewORDERS.Clear();
            listViewORDERS.GridLines = true;
            listViewORDERS.View      = View.Details;
            listViewORDERS.Columns.Add("Order ID", 100, HorizontalAlignment.Left);
            listViewORDERS.Columns.Add("Item Name", 150, HorizontalAlignment.Left);
            listViewORDERS.Columns.Add("Sub Type", 100, HorizontalAlignment.Left);
            listViewORDERS.Columns.Add("Table Number", 150, HorizontalAlignment.Left);
            listViewORDERS.Columns.Add("Time", 100, HorizontalAlignment.Left);

            foreach (OrderItem OI in All_Order_Items)
            {
                ListViewItem Ord = new ListViewItem(OI.Order_Id.ToString());
                Ord.Tag = OI;
                Ord.SubItems.Add(OI.Item_name);
                Ord.SubItems.Add(OI.Sub_Type);
                Ord.SubItems.Add(OI.Table_num.ToString());
                Ord.SubItems.Add(OI.Time);
                listViewORDERS.Items.Add(Ord);
            }
        }
        void LoadOrdersHistoryList()
        {
            btn_RefreshOrders.Hide();
            OrdStatusbtn.Hide();

            SetHeight(listViewORDERS, 26);

            All_Order_Items = ProcessOrder.Get_All_READY_Orders(IsChef(currentUser.jobType));

            listViewORDERS.Clear();
            listViewORDERS.GridLines = true;
            listViewORDERS.View      = View.Details;
            listViewORDERS.Columns.Add("Order ID", 80, HorizontalAlignment.Left);
            listViewORDERS.Columns.Add("Item Name", 200, HorizontalAlignment.Left);
            listViewORDERS.Columns.Add("Sub Type", 100, HorizontalAlignment.Left);
            listViewORDERS.Columns.Add("Table Number", 100, HorizontalAlignment.Left);
            listViewORDERS.Columns.Add("Time", 100, HorizontalAlignment.Left);

            foreach (OrderItem OI in All_Order_Items)
            {
                ListViewItem Ord = new ListViewItem(OI.Order_Id.ToString());
                Ord.Tag = OI;
                Ord.SubItems.Add(OI.Item_name);
                Ord.SubItems.Add(OI.Sub_Type);
                Ord.SubItems.Add(OI.Table_num.ToString());
                Ord.SubItems.Add(OI.Time.Substring(0, 8));
                listViewORDERS.Items.Add(Ord);
            }

            ordersToolStripMenuItem.BackColor        = SystemColors.Control;
            ordersHistoryToolStripMenuItem.BackColor = SystemColors.ActiveBorder;
        }