Exemplo n.º 1
0
 public MarketPageUserViewModel()
 {
     usersLogic     = UsersLogic.GetInstance();
     historiesLogic = HistoriesLogic.GetInstance();
     Condition      = "Visible";
     FullName       = usersLogic.GetFullName();
     Checks         = new ObservableCollection <Check>(historiesLogic.GetChecks(UsersLogic.GetId()));
     SeeCheck       = new RelayCommand <int>(ThisCheck);
     ProductsLogic.GetInstance();
 }
 private void LoadProducts()
 {
     Task.Run(() =>
     {
         productsLogic = ProductsLogic.GetInstance();
         while (productsLogic.GetListProducts() == null)
         {
             ;
         }
         Products = new ObservableCollection <Product>(productsLogic.GetListProducts());
     });
 }
Exemplo n.º 3
0
 public OrderViewModel()
 {
     Condition        = "Visible";
     historiesLogic   = HistoriesLogic.GetInstance();
     productsLogic    = ProductsLogic.GetInstance();
     Products         = new ObservableCollection <Product>(productsLogic.GetListProducts());
     InCheck          = new ObservableCollection <Product>();
     FinishSum        = 0;
     ViewAboutProduct = new RelayCommand <int>(ViewProduct);
     AddToCheck       = new RelayCommand <int>(AddToBuy);
     DeleteProduct    = new RelayCommand <int>(DeleteAtCheck);
 }
Exemplo n.º 4
0
 public NewProductViewModel()
 {
     productsLogic = ProductsLogic.GetInstance();
     Condition     = "Visible";
 }