public ImportJobMappingStepViewModel(IRepositoryFactory <IImportRepository> repositoryFactory, IRepositoryFactory <ICatalogRepository> catalogRepositoryFactory, ImportJob item, WizardViewModelBare parentVM, IImportJobEntityFactory importFactory, IViewModelsFactory <IPickAssetViewModel> assetVmFactory, IViewModelsFactory <IColumnMappingViewModel> mappingVmFactory, IImportService importService, ImportEntityType[] entityImporters, IAuthenticationContext authContext) : base(repositoryFactory, catalogRepositoryFactory, importFactory, item, parentVM, assetVmFactory, mappingVmFactory, importService, entityImporters, authContext) { }
protected ImportJobViewModelBack(IUnityContainer container, ICatalogEntityFactory entityFactory, ImportJob item, WizardViewModelBare parentVM, bool isSingleDialogEditing) { Container = container; _entityFactory = entityFactory; InnerItem = _originalItem = item; _parentViewModel = parentVM; IsSingleDialogEditing = isSingleDialogEditing; _importService = Container.Resolve <IImportService>(); _itemRepository = Container.Resolve <IImportRepository>(); if (isSingleDialogEditing) { _originalItem = InnerItem; OpenItemCommand = new DelegateCommand(() => { var navigationmanager = container.Resolve <NavigationManager>(); NavigationData = new NavigationItem(InnerItem.ImportJobId, NavigationNames.HomeName, NavigationNames.MenuName, this); navigationmanager.Navigate(NavigationData); }); CancelCommand = new DelegateCommand <object>(OnCancelCommand); SaveChangesCommand = new DelegateCommand <object>((x) => OnSaveChangesCommand(), (x) => { return(IsModified); }); MinimizeCommand = new DelegateCommand(() => MinimizableViewRequestedEvent(this, null)); } else { InitializePropertiesForViewing(); } FilePickCommand = new DelegateCommand(RaiseFilePickInteractionRequest); CreateMappingCommand = new DelegateCommand(RaiseCreateMappingInteractionRequest); CancelConfirmRequest = new InteractionRequest <Confirmation>(); CommonConfirmRequest = new InteractionRequest <Confirmation>(); CommonConfirmRequest2 = new InteractionRequest <Confirmation>(); UpdateImporterCommand = new DelegateCommand <EntityImporterBase>((x) => OnImporterChangesCommand(x)); UpdatePropertySetCommand = new DelegateCommand <PropertySet>((x) => OnPropertySetChangesCommand(x)); CatalogChangedCommand = new DelegateCommand <CatalogBase>((x) => OnCatalogChangesCommand(x)); ItemEditCommand = new DelegateCommand <MappingItem>((x) => RaiseItemEditInteractionRequest(x), x => x != null); ItemClearCommand = new DelegateCommand <MappingItem>((x) => RaiseItemClearInteractionRequest(x), x => x != null); }
protected ImportJobViewModel( IRepositoryFactory <IImportRepository> repositoryFactory, IRepositoryFactory <ICatalogRepository> catalogRepositoryFactory, IImportJobEntityFactory importJobFactory, ImportJob item, WizardViewModelBare parentVM, IViewModelsFactory <IPickAssetViewModel> assetVmFactory, IViewModelsFactory <IColumnMappingViewModel> mappingVmFactory, IImportService importService, ImportEntityType[] entityImporters, IAuthenticationContext authContext) : base(importJobFactory, item, true) { EntityImporters = entityImporters; _parentViewModel = parentVM; _assetVmFactory = assetVmFactory; _mappingVmFactory = mappingVmFactory; _importService = importService; _authContext = authContext; _repositoryFactory = repositoryFactory; _catalogRepositoryFactory = catalogRepositoryFactory; CommandInit(); }
public ImportJobViewModelNew( NavigationManager navManager, ICatalogEntityFactory entityFactory, ICatalogRepository catalogRepository, IImportRepository importRepository, ImportJob item, WizardViewModelBare parentVM, IColumnMappingEditViewModel mappingEditVM, IColumnMappingViewModel columnMappingVM, IImportService importService, IPickAssetViewModel pickAssetVM, bool isSingleDialogEditing) { _entityFactory = entityFactory; InnerItem = _originalItem = item; _parentViewModel = parentVM; IsSingleDialogEditing = isSingleDialogEditing; _itemRepository = importRepository; _mappingEditVM = mappingEditVM; _columnMappingVM = columnMappingVM; _pickAssetVM = pickAssetVM; _importService = importService; _catalogRepository = catalogRepository; ViewTitle = new ViewTitleBase() { Title = "Import job", SubTitle = DisplayName.ToUpper() }; if (isSingleDialogEditing) { _originalItem = InnerItem; OpenItemCommand = new DelegateCommand(() => { NavigationData = new NavigationItem(InnerItem.ImportJobId, NavigationNames.HomeName, NavigationNames.MenuName, this); navManager.Navigate(NavigationData); }); CancelCommand = new DelegateCommand <object>(OnCancelCommand); SaveChangesCommand = new DelegateCommand <object>((x) => OnSaveChangesCommand(), (x) => { return(IsModified); }); MinimizeCommand = new DelegateCommand(() => MinimizableViewRequestedEvent(this, null)); } else { InitializePropertiesForViewing(); } FilePickCommand = new DelegateCommand(RaiseFilePickInteractionRequest); CreateMappingCommand = new DelegateCommand(RaiseCreateMappingInteractionRequest); CancelConfirmRequest = new InteractionRequest <Confirmation>(); CommonConfirmRequest = new InteractionRequest <Confirmation>(); CommonConfirmRequest2 = new InteractionRequest <Confirmation>(); UpdateImporterCommand = new DelegateCommand <EntityImporterBase>((x) => OnImporterChangesCommand(x)); UpdatePropertySetCommand = new DelegateCommand <PropertySet>((x) => OnPropertySetChangesCommand(x)); CatalogChangedCommand = new DelegateCommand <CatalogBase>((x) => OnCatalogChangesCommand(x)); ItemEditCommand = new DelegateCommand <MappingItem>((x) => RaiseItemEditInteractionRequest(x), x => x != null); ItemClearCommand = new DelegateCommand <MappingItem>((x) => RaiseItemClearInteractionRequest(x), x => x != null); }