Пример #1
0
 public UCMenu(Form_Restaurant form1)
 {
     foodDrinkBLL = new FoodDrinkBLL();
     lstFood      = new List <FoodDrink>();
     lstDrink     = new List <FoodDrink>();
     mainform     = form1;
     InitializeComponent();
     //InitializeWorker();
     LoadData();
 }
Пример #2
0
 public UCOrder_Pay(Form_Restaurant form, List <OrderDetail> orderDetails, int EmployeeID, int TableID, int CustomerID)
 {
     CusID          = CustomerID;
     tableBLL       = new TableBLL();
     orDer          = new Order();
     orderBLL       = new OrderBLL();
     orderDetailBLL = new OrderDetailBLL();
     foodDrinkBLL   = new FoodDrinkBLL();
     EmpID          = EmployeeID;
     TabID          = TableID;
     mainform       = form;
     lsOrderDetail  = orderDetails;
     InitializeComponent();
     LoadData();
 }
Пример #3
0
 public UCMenu_Order(Form_Restaurant form1, int EmployeeID, int TableID, int CustomerID)
 {
     lstFood        = new List <FoodDrink>();
     lstDrink       = new List <FoodDrink>();
     CusID          = CustomerID;
     EmpID          = EmployeeID;
     TabID          = TableID;
     orderDetailBLL = new OrderDetailBLL();
     foodDrinkBLL   = new FoodDrinkBLL();
     lsFood_Order   = new List <FoodDrink>();
     lsNumeric      = new List <myNumericUpDown>();
     lsFood         = foodDrinkBLL.GetListFoodDrink();
     lsOrder        = new List <OrderDetail>();
     mainform       = form1;
     InitializeComponent();
     LoadData();
 }
Пример #4
0
 public UCMenu_Edit(Form_Restaurant form1)
 {
     lstFood       = new List <FoodDrink>();
     lstDrink      = new List <FoodDrink>();
     foodDrinkBLL  = new FoodDrinkBLL();
     lstFoodDrink  = foodDrinkBLL.GetListFoodDrink();
     lslabelName   = new List <myLabelEdit>();
     lslabelPrice  = new List <myLabelEdit>();
     lsdescription = new List <myLabelEdit>();
     lspicBox      = new List <myButtonEdit>();
     lspicDelete   = new List <myButtonEdit>();
     lstxtName     = new List <myTextEdit>();
     lstxtPrice    = new List <myTextEdit>();
     lstxtDes      = new List <myTextEdit>();
     lspicEdit     = new List <myButtonEdit>();
     mainform      = form1;
     InitializeComponent();
     btnSave.Enabled   = false;
     btnSave.Visible   = false;
     btnCancel.Enabled = false;
     btnCancel.Visible = false;
     lsFoodDrink_Temp  = foodDrinkBLL.GetListFoodDrink();
     LoadData();
 }
Пример #5
0
        public void LoadLegend(SortedDictionary <int, float> totalall)
        {
            FoodDrinkBLL foodDrinkBLL             = new FoodDrinkBLL();
            Dictionary <string, float> lsFoodName = new Dictionary <string, float>();

            foreach (var item in totalall)
            {
                string name = foodDrinkBLL.GetFoodDrinkName(item.Key);
                if (name != null)
                {
                    lsFoodName[name] = item.Value;
                }
            }

            int count = 1;
            int x = 0, y = 0, z = 0;
            int pX = 3, pY = 5;

            foreach (var item in lsFoodName)
            {
                if (count > 5)
                {
                    break;
                }
                Bunifu.Framework.UI.BunifuCheckbox cb1 = new Bunifu.Framework.UI.BunifuCheckbox();

                //Chart1.colorSet.Add(Color.FromArgb(255, 128, 255));
                //Chart1.colorSet.Add(Color.FromArgb(128, 128, 255));
                //Chart1.colorSet.Add(Color.FromArgb(128, 255, 255));
                //Chart1.colorSet.Add(Color.FromArgb(128, 255, 128));
                //Chart1.colorSet.Add(Color.FromArgb(255, 255, 128));
                if (count == 1)
                {
                    //55, 101, 177
                    x = 255; y = 128; z = 255;
                }
                if (count == 2)
                {
                    //87, 151, 255
                    x = 128; y = 128; z = 255;
                }
                if (count == 3)
                {
                    //17, 128, 193
                    x = 201; y = 255; z = 255;
                }
                if (count == 4)
                {
                    //241, 77, 255
                    x = 255; y = 192; z = 128;
                }
                if (count == 5)
                {
                    //148, 38, 131
                    x = 255; y = 255; z = 128;
                }
                count++;
                cb1.BackColor       = Color.FromArgb(x, y, z);
                cb1.CheckedOnColor  = Color.FromArgb(x, y, z);
                cb1.ChechedOffColor = Color.FromArgb(x, y, z);
                cb1.Size            = new Size(20, 20);
                cb1.ForeColor       = Color.FromArgb(x, y, z);
                cb1.Location        = new Point(pX, pY);

                Label lName = new Label();
                lName.Text     = item.Key;
                lName.Location = new Point(pX + 26, pY);



                Label lPercent = new Label();
                lPercent.Text     = item.Value.ToString();
                lPercent.AutoSize = false;
                lPercent.Size     = new Size(80, 23);
                lPercent.Location = new Point(pX + 132, pY);


                panelLegend.Controls.Add(cb1);
                panelLegend.Controls.Add(lName);
                // panelLegend.Controls.Add(lPercent);

                pY += 26;
            }
        }
Пример #6
0
 public Form_AddFood(Form_Restaurant f)
 {
     mainform     = f;
     foodDrinkBLL = new FoodDrinkBLL();
     InitializeComponent();
 }