public MainViewModel()
        {
            AddProductCommand     = new MyCommand(AddProduct);
            ModifyProductCommand  = new MyCommand(ModifyProduct);
            DeleteProductCommand  = new MyCommand(DeleteProduct);
            ChangeSelectedProduct = new MyCommand(OnProductChanged);

            ProductRepository = new ProductRepostiory();
            ProductRepository.ChangeInCollection += OnProductsChanged;

            Products = ProductRepository.GetAllProduct();
            Product  = new Product();
            Product.SellStartDate = DateTime.Now;
            InitComboBox();
            if (Product != null)
            {
                InitModifyProduct();
            }
        }
Beispiel #2
0
 public MainWindowModel()
 {
     FireCommand = new MyCommand(Fire);
 }