public ProductViewModel(FilterViewModel filter, UserWrapper user, DictionaryViewModel dic, UserAuthenticationWrapper authUser) { _dictionaryVM = dic; _user = user; _filter = filter; _authenticationUser = authUser; Products = new BindableCollection <ProductWrapper>(); CreatedProduct = ProductWrapper.CreateEmptyProduct(_user); GenerateXMLReport = new AsyncRelayCommand(execute => GenerateXML(), canExecute => { return(true); }); UpdateCommand = new AsyncRelayCommand(execute => Update(), canExecute => { return(true); }); }
private async Task GoToProductVM(object sender, EventArgs e) { if (_dictionaryVM == null) { DictionaryVM = new DictionaryViewModel(); await DictionaryVM.Load(); } if (_productVM == null) { _productVM = new ProductViewModel(Filter, _authenticationVM.User.User, DictionaryVM, _authenticationVM.User); } await _productVM.Load(); IsUserAuthenticated = true; DisplayedView = _productVM; /* do dokończenia */ }