public HomeController(IRepository repo) : base(repo) { bLogicObj = new MyBl(repo); LayoutViewModel layoutModel = new LayoutViewModel(); layoutModel.PersonDetails = PersonDetails; ViewBag.LayoutModel = layoutModel; }
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); }
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"; }
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); }
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); }
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); }
internal bool CheckShopExist() { return(MyBl.CheckShopExist(MyShop.Id)); }
internal bool CheckIceCream() { return(MyBl.CheckIceCream(MyIC.Id, MyIC.ShopId)); }