private void QlyThucDon_Load(object sender, EventArgs e)
        {
            List <GetFood_Result> lFood = cFood.GetFood("All", "Yes", "Yes");

            Point p = new Point(20, 10);

            for (int i = 0; i < lFood.Count; i++)
            {
                UCMonAnQlyThucDon MonAnn = new UCMonAnQlyThucDon(lFood[i].ID_Food.ToString(), lFood[i].Name.ToString(), lFood[i].Price.ToString(), lFood[i].Sale.ToString()
                                                                 , lFood[i].Status.ToString(), lFood[i].Active, lFood[i].Types.ToString());
                //listMonAn.Add(MonAnn);
                MonAnn.Location = p;
                pnMonAn.Controls.Add(MonAnn);
                p.Y = p.Y + 10 + MonAnn.Height;
            }
        }
Beispiel #2
0
        public void CreateFoodbtn(Panel Order)
        {
            CBill SBill = new CBill();

            them = SBill.GetID_Bill(location, ref ID_bill);
            CFood sFood = new CFood();
            List <GetFood_Result> dtFood = new List <GetFood_Result>();

            dtFood   = sFood.GetFood("All", "All", "Yes");
            listFood = dtFood;

            if (them == false)
            {
                LoadAmount(listCount);
            }
            else
            {
                for (int i = 0; i < dtFood.Count; i++)
                {
                    listCount.Add(0);
                }
            }
            CreateUser(Order);

            lb1 = new Label()
            {
                Location = new Point(20, 220)
            };
            lb1.AutoSize = true;
            this.Bill.Controls.Add(lb1);
            if (them == false)
            {
                load();
            }
            LoadAmount(OldListCount);
        }