示例#1
0
        void LoadOrdersList()
        {
            btn_RefreshOrders.Show();
            OrdStatusbtn.Show();

            All_Order_Items = ProcessOrder.Get_All_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);
            }
            OrdStatusbtn.BackColor = Color.Aqua;
            OrdStatusbtn.Text      = "CHANGE ORDER STATUS";
        }
        void LoadOrdersList()
        {
            isOrdersList = true;
            btn_RefreshOrders.Show();
            OrdStatusbtn.Show();

            SetHeight(listViewORDERS, 26);

            All_Order_Items = ProcessOrder.Get_All_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);
            }
            OrdStatusbtn.BackColor = Color.Aqua;
            OrdStatusbtn.Text      = "CHANGE ORDER STATUS";

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