public CreateItemViewModel( IViewModelsFactory<IItemOverviewStepViewModel> overviewVmFactory, IViewModelsFactory<IItemPropertiesStepViewModel> propertiesVmFactory, IViewModelsFactory<IItemPricingStepViewModel> pricingVmFactory, IViewModelsFactory<IEditorialReviewViewModel> reviewVmFactory, Item item, IViewModel parentEntityVM, ICatalogEntityFactory entityFactory) { _itemModel = new ItemStepModel { InnerItem = item, ParentEntityVM = parentEntityVM, ParentWizard = this }; var allParameters = new[] { new KeyValuePair<string, object>("itemModel", _itemModel) }; // properties Step must be created first var propertiesStep = propertiesVmFactory.GetViewModelInstance(allParameters); // this step is created second, but registered first RegisterStep(overviewVmFactory.GetViewModelInstance(allParameters)); RegisterEditorialReviewStep(item, entityFactory, reviewVmFactory); // properties Step is registered third RegisterStep(propertiesStep); pricingStep4 = pricingVmFactory.GetViewModelInstance(allParameters); // this step is added or removed at RUNTIME // RegisterStep(pricingStep4); item.StartDate = DateTime.Today; }
public CreateItemViewModel( IViewModelsFactory <IItemOverviewStepViewModel> overviewVmFactory, IViewModelsFactory <IItemPropertiesStepViewModel> propertiesVmFactory, IViewModelsFactory <IItemPricingStepViewModel> pricingVmFactory, IViewModelsFactory <IEditorialReviewViewModel> reviewVmFactory, Item item, IViewModel parentEntityVM, ICatalogEntityFactory entityFactory) { _itemModel = new ItemStepModel { InnerItem = item, ParentEntityVM = parentEntityVM, ParentWizard = this }; var allParameters = new[] { new KeyValuePair <string, object>("itemModel", _itemModel) }; // properties Step must be created first var propertiesStep = propertiesVmFactory.GetViewModelInstance(allParameters); // this step is created second, but registered first RegisterStep(overviewVmFactory.GetViewModelInstance(allParameters)); RegisterEditorialReviewStep(item, entityFactory, reviewVmFactory); // properties Step is registered third RegisterStep(propertiesStep); pricingStep4 = pricingVmFactory.GetViewModelInstance(allParameters); // this step is added or removed at RUNTIME // RegisterStep(pricingStep4); item.StartDate = DateTime.Today; }
public ItemOverviewStepViewModel( IRepositoryFactory <ICatalogRepository> repositoryFactory, IViewModelsFactory <IPropertyValueBaseViewModel> vmFactory, ICatalogEntityFactory entityFactory, IAuthenticationContext authContext, ItemStepModel itemModel) : base(repositoryFactory, null, vmFactory, entityFactory, authContext, itemModel, null) { PropertiesAndValues = stepModel.PropertiesAndValues; }
public ItemPricingStepViewModel( IRepositoryFactory <ICatalogRepository> repositoryFactory, IRepositoryFactory <IPricelistRepository> pricelistRepositoryFactory, ICatalogEntityFactory entityFactory, IAuthenticationContext authContext, ItemStepModel itemModel, IViewModelsFactory <IPriceViewModel> priceVmFactory) : base(repositoryFactory, pricelistRepositoryFactory, null, entityFactory, authContext, itemModel, priceVmFactory) { IsInitializingPricing = true; }
public ItemPropertiesStepViewModel( IRepositoryFactory <ICatalogRepository> repositoryFactory, IViewModelsFactory <IPropertyValueBaseViewModel> vmFactory, ICatalogEntityFactory entityFactory, IAuthenticationContext authContext, ItemStepModel itemModel) : base(repositoryFactory, null, vmFactory, entityFactory, authContext, itemModel, null) { PropertiesAndValues = new ObservableCollection <PropertyAndPropertyValueBase>(); stepModel.PropertiesAndValues = PropertiesAndValues; }
protected ItemStepViewModel( IRepositoryFactory <ICatalogRepository> repositoryFactory, IRepositoryFactory <IPricelistRepository> pricelistRepositoryFactory, IViewModelsFactory <IPropertyValueBaseViewModel> vmFactory, ICatalogEntityFactory entityFactory, IAuthenticationContext authContext, ItemStepModel itemModel, IViewModelsFactory <IPriceViewModel> priceVmFactory) : base(repositoryFactory, pricelistRepositoryFactory, vmFactory, entityFactory, itemModel.InnerItem, authContext, priceVmFactory) { stepModel = itemModel; }
public ItemPricingStepViewModel( IRepositoryFactory<ICatalogRepository> repositoryFactory, IRepositoryFactory<IPricelistRepository> pricelistRepositoryFactory, ICatalogEntityFactory entityFactory, IAuthenticationContext authContext, ItemStepModel itemModel, IViewModelsFactory<IPriceViewModel> priceVmFactory) : base(repositoryFactory, pricelistRepositoryFactory, null, entityFactory, authContext, itemModel, priceVmFactory) { IsInitializingPricing = true; }
public ItemPropertiesStepViewModel( IRepositoryFactory<ICatalogRepository> repositoryFactory, IViewModelsFactory<IPropertyValueBaseViewModel> vmFactory, ICatalogEntityFactory entityFactory, IAuthenticationContext authContext, ItemStepModel itemModel) : base(repositoryFactory, null, vmFactory, entityFactory, authContext, itemModel, null) { PropertiesAndValues = new ObservableCollection<PropertyAndPropertyValueBase>(); stepModel.PropertiesAndValues = PropertiesAndValues; }
public ItemOverviewStepViewModel( IRepositoryFactory<ICatalogRepository> repositoryFactory, IViewModelsFactory<IPropertyValueBaseViewModel> vmFactory, ICatalogEntityFactory entityFactory, IAuthenticationContext authContext, ItemStepModel itemModel) : base(repositoryFactory, null, vmFactory, entityFactory, authContext, itemModel, null) { PropertiesAndValues = stepModel.PropertiesAndValues; }
protected ItemStepViewModel( IRepositoryFactory<ICatalogRepository> repositoryFactory, IRepositoryFactory<IPricelistRepository> pricelistRepositoryFactory, IViewModelsFactory<IPropertyValueBaseViewModel> vmFactory, ICatalogEntityFactory entityFactory, IAuthenticationContext authContext, ItemStepModel itemModel, IViewModelsFactory<IPriceViewModel> priceVmFactory) : base(repositoryFactory, pricelistRepositoryFactory, vmFactory, entityFactory, itemModel.InnerItem, authContext, priceVmFactory) { stepModel = itemModel; }