Ejemplo n.º 1
0
 public StoreViewModel(Window user, Window invoice, Window inventory, Window product)
 {
     addUserViewModel      = new AddPersonViewModel();
     addInventoryViewModel = new AddInventoryViewModel();
     addInvoiceViewModel   = new AddInvoiceViewModel();
     addProductViewModel   = new AddProductViewModel();
     AddPersonCommand      = new AddPersonButtonCommand(this);
     AddInventoryCommand   = new AddInventoryButtonCommand(this);
     AddInvoiceCommand     = new AddInvoiceButtonCommand(this);
     AddProductCommand     = new AddProductButtonCommand(this);
     this.user             = user;
     this.invoice          = invoice;
     this.inventory        = inventory;
     this.product          = product;
 }
Ejemplo n.º 2
0
        public StoreViewModel(Window user, Window invoice, Window inventory, Window product)
        {
            this.store = new Store();

            addUserViewModel      = new AddPersonViewModel(this.store);
            addInventoryViewModel = new AddInventoryViewModel(this.store);
            addInvoiceViewModel   = new AddInvoiceViewModel(this.store);
            addProductViewModel   = new AddProductViewModel(this.store);
            viewAllViewModel      = new ViewAllViewModel(this.store);
            viewAllProductsModel  = new ViewAllProductsModel(this.store);
            viewAllEventsModel    = new ViewAllEventsModel(this.store);


            AddViewAllCommand      = new AddViewAllCommand(this);
            ViewAllProductsCommand = new ViewAllProductsCommand(this);
            ViewAllEventsCommand   = new ViewAllEventsCommand(this);
            AddPersonCommand       = new AddPersonButtonCommand(this);
            AddInventoryCommand    = new AddInventoryButtonCommand(this);
            AddInvoiceCommand      = new AddInvoiceButtonCommand(this);
            AddProductCommand      = new AddProductButtonCommand(this);
        }