private void LoadProducts()
 {
     Task.Run(() =>
     {
         productsLogic = ProductsLogic.GetInstance();
         while (productsLogic.GetListProducts() == null)
         {
             ;
         }
         Products = new ObservableCollection <Product>(productsLogic.GetListProducts());
     });
 }
 private void Waiting()
 {
     Task.Run(() =>
     {
         while (newProductViewModel.Condition == "Visible")
         {
             ;
         }
         Products = new ObservableCollection <Product>(productsLogic.GetListProducts());
     });
 }
Пример #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);
 }