public ProfileBarVM(ProfileBarUC profileBarUC) { CurrentModel = new ProfileBarModel(profileBarUC.Shop); this.profileBarUC = profileBarUC; MyCommand = new SpecialCommand(); MyCommand.callComplete += UpdateShop; }
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); }
private void shopAreaBtnBis_Click(object sender, RoutedEventArgs e) { Shop shop = new Shop(); shopAreaUC = new ShopAreaUC(shop.Id); profileBarUC = new ProfileBarUC(shop); ((MainWindow)System.Windows.Application.Current.MainWindow).inner_grid.Children.Clear(); ((MainWindow)System.Windows.Application.Current.MainWindow).shopAreaGrid.Children.Clear(); ((MainWindow)System.Windows.Application.Current.MainWindow).profile_grid.Children.Add(profileBarUC); ((MainWindow)System.Windows.Application.Current.MainWindow).content_grid.Children.Add(shopAreaUC); }
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); }
public bool findShopByLogin(string id, string password) { Shop shop = MyBl.findShopByLogin(id, password); if (shop == null) { return(false); } else { shop.UpdateLists(); shopAreaUC = new ShopAreaUC(shop.Id); profileBarUC = new ProfileBarUC(shop); ((MainWindow)System.Windows.Application.Current.MainWindow).mainVM.UpdateShop(shop); ((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).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); return(true); } }