コード例 #1
0
        public HomeController(IRepository repo) : base(repo)
        {
            bLogicObj = new MyBl(repo);
            LayoutViewModel layoutModel = new LayoutViewModel();

            layoutModel.PersonDetails = PersonDetails;
            ViewBag.LayoutModel       = layoutModel;
        }
コード例 #2
0
 internal void UpdateIceCream()
 {
     MyIC.UpdateData();
     MyBl.UpdateIceCream(oldIceCream, MyIC);
     shopAreaUC = new ShopAreaUC(MyIC.ShopId);
     ((MainWindow)System.Windows.Application.Current.MainWindow).content_grid.Children.Clear();
     ((MainWindow)System.Windows.Application.Current.MainWindow).content_grid.Children.Add(shopAreaUC);
 }
コード例 #3
0
        private void Shop_Selected(object sender, SelectionChangedEventArgs e)
        {
            IceCreamComboBox.IsEnabled = true;
            Shop shop = ShopComboBox.SelectedItem as Shop;

            IceCreamComboBox.ItemsSource       = MyBl.GetIceCreamFromShop(shop.Id);
            IceCreamComboBox.DisplayMemberPath = "Presentation";
            IceCreamComboBox.SelectedValuePath = "Presentation";
        }
コード例 #4
0
        public void UpdateShop(Shop updateShop, Shop currentShop)
        {
            MyBl.UpdateShop(updateShop, currentShop);
            shopAreaUC   = new ShopAreaUC(currentShop.Id);
            profileBarUC = new ProfileBarUC(currentShop);
            ((MainWindow)System.Windows.Application.Current.MainWindow).content_grid.Children.Clear();
            ((MainWindow)System.Windows.Application.Current.MainWindow).profile_grid.Children.Clear();

            ((MainWindow)System.Windows.Application.Current.MainWindow).content_grid.Children.Add(shopAreaUC);
            ((MainWindow)System.Windows.Application.Current.MainWindow).profile_grid.Children.Add(profileBarUC);
        }
コード例 #5
0
 internal void AddShop()
 {
     MyBl.AddShop(MyShop);
     MyShop.UpdateLists();
     shopAreaUC   = new ShopAreaUC(MyShop.Id);
     profileBarUC = new ProfileBarUC(MyShop);
     ((MainWindow)System.Windows.Application.Current.MainWindow).mainVM.UpdateShop(MyShop);
     ((MainWindow)System.Windows.Application.Current.MainWindow).content_grid.Children.Clear();
     ((MainWindow)System.Windows.Application.Current.MainWindow).inner_grid.Children.Clear();
     ((MainWindow)System.Windows.Application.Current.MainWindow).content_grid.Children.Add(shopAreaUC);
     ((MainWindow)System.Windows.Application.Current.MainWindow).profile_grid.Children.Add(profileBarUC);
 }
コード例 #6
0
        private void Search(object sender, RoutedEventArgs e)
        {
            string Taste = TasteComboBox.SelectedItem.ToString();



            IEnumerable <BE.IceCream> IceCreams = MyBl.FindListIceCream(Taste, Energy.Value, Calories.Value, Proteins.Value, Median.Value);

            // IEnumerable<BE.IceCream> IceCreams = MyBl.GetAllIceCream();
            listIceCreamUC = new ListIceCreamUC(IceCreams);
            ((MainWindow)System.Windows.Application.Current.MainWindow).content_grid.Children.Clear();
            ((MainWindow)System.Windows.Application.Current.MainWindow).content_grid.Children.Add(listIceCreamUC);
        }
コード例 #7
0
 internal bool CheckShopExist()
 {
     return(MyBl.CheckShopExist(MyShop.Id));
 }
コード例 #8
0
 internal bool CheckIceCream()
 {
     return(MyBl.CheckIceCream(MyIC.Id, MyIC.ShopId));
 }