Inheritance: ViewModelBase
Exemplo n.º 1
0
 public MainWindowVM(EventAggregator eventAggregator,
                     CustomerService customerService,
                     ProductService productService,
                     CategoryService categoryService,
                     OrderService orderService,
                     InventoryItemService inventoryService)
 {
     _customersVM = new CustomersVM(customerService);
     _customersVM.LoadCustomersCommand.Execute(null);
     _productsVM = new ProductsVM(productService, this);
     _productsVM.LoadProductsCommand.Execute(null);
     _categoriesVM = new CategoriesVM(categoryService);
     _categoriesVM.LoadCategoriesCommand.Execute(null);
     _ordersVM = new OrdersVM(orderService, this, eventAggregator);
     _ordersVM.LoadOrdersCommand.Execute(null);
     _inventoryItemsVM = new InventoryItemsVM(inventoryService, this);
     _inventoryItemsVM.LoadInventoryCommand.Execute(null);
 }
Exemplo n.º 2
0
 public MainWindowVM(EventAggregator eventAggregator,
                     CustomerService customerService,
                     ProductService productService,
                     CategoryService categoryService,
                     OrderService orderService,
                     InventoryItemService inventoryService)
 {
     _customersVM = new CustomersVM(customerService);
     _customersVM.LoadCustomersCommand.Execute(null);
     _productsVM = new ProductsVM(productService, this);
     _productsVM.LoadProductsCommand.Execute(null);
     _categoriesVM = new CategoriesVM(categoryService);
     _categoriesVM.LoadCategoriesCommand.Execute(null);
     _ordersVM = new OrdersVM(orderService, this, eventAggregator);
     _ordersVM.LoadOrdersCommand.Execute(null);
     _inventoryItemsVM = new InventoryItemsVM(inventoryService, this);
     _inventoryItemsVM.LoadInventoryCommand.Execute(null);
 }