Ejemplo n.º 1
0
        private void Categories(int CatID)
        {
            UserControl usc = null;

            GridMain.Children.Clear();

            TitleFunction.Text = "Các sản phẩm";
            usc = new UserControlHomeScreen(CatID);
            GridMain.Children.Add(usc);
        }
Ejemplo n.º 2
0
        private void ListViewMenu_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            UserControl usc = null;

            GridMain.Children.Clear();

            switch (((ListViewItem)((ListView)sender).SelectedItem).Name)
            {
            case "ItemHome":
                TitleFunction.Text = "TCH's Shop";
                var screen = new UserControlTypes();
                screen.Handler += Categories;
                GridMain.Children.Add(screen);
                break;

            case "ItemProduct":
                TitleFunction.Text = "Các sản phẩm";
                usc = new UserControlHomeScreen();
                GridMain.Children.Add(usc);
                break;

            //case "ItemBill":
            //    CakeShop_dbEntities db = new CakeShop_dbEntities();
            //    TitleFunction.Text = "Thanh toán";
            //    var data = db.BillDetails.ToList();
            //    usc = new UserControlCreateCakeBill(GridMain,data);
            //    GridMain.Children.Add(usc);
            //    break;
            case "ItemStatistical":
                TitleFunction.Text = "Thống kê";
                usc = new UserControlCharts();
                GridMain.Children.Add(usc);
                break;

            default:
                break;
            }
        }