Example #1
0
        private void reloadProducts()
        {
            loadInfoOrder(_billSell);
            DetailBillSellService detailBillSellService = new DetailBillSellService(new CoffeShopContext());
            var    listDetail = detailBillSellService.GetDetailBillSell(_billSell);
            fORDER f1         = Application.OpenForms.OfType <fORDER>().FirstOrDefault();

            if (f1 != null)
            {
                if (checkOrderd)
                {
                    f1.orderProducts(_billSell);
                    f1.showListProductOrder(listDetail);
                }
                else
                {
                    f1.flpOrdered.Controls.Clear();
                    uc_AreaNormal.Instance.preLoad();
                    uc_AreaVIP.Instance.preLoad();
                }
            }
        }
Example #2
0
        private void label1_Click(object sender, EventArgs e)
        {
            fORDER.checkStatus = true;
            fORDER.staticTable = table;
            fORDER f1 = Application.OpenForms.OfType <fORDER>().FirstOrDefault();

            if (f1 != null)
            {
                f1.showTableInMenu(table, index);
                if (_billSell != null)
                {
                    BillSellService       billSellService       = new BillSellService(new CoffeShopContext());
                    DetailBillSellService detailBillSellService = new DetailBillSellService(new CoffeShopContext());
                    var listDetail = detailBillSellService.GetDetailBillSell(_billSell);
                    f1.showListProductOrder(listDetail);
                }
                else
                {
                    f1.flpOrdered.Controls.Clear();
                }
            }
            loadInfoOrder(_billSell);
        }