public TreeVirtualCatalogViewModel( IViewModelsFactory<ITreeCategoryViewModel> vmFactory, IViewModelsFactory<IVirtualCatalogViewModel> virtualCatalogVmFactory, IViewModelsFactory<ICatalogDeleteViewModel> catalogDeleteVmFactory, CatalogBase item, IRepositoryFactory<ICatalogRepository> repositoryFactory, IAuthenticationContext authContext, INavigationManager navigationManager) : base(repositoryFactory, authContext) { InnerItem = item; _vmFactory = vmFactory; _catalogDeleteVmFactory = catalogDeleteVmFactory; EmbeddedHierarchyEntry = this; ViewTitle = new ViewTitleBase { SubTitle = "VIRTUAL CATALOG", Title = (item != null && !string.IsNullOrEmpty(item.Name)) ? item.Name : "" }; OpenItemCommand = new DelegateCommand(() => { if (NavigationData == null) { var editVM = virtualCatalogVmFactory.GetViewModelInstance(new KeyValuePair<string, object>("item", InnerItem) , new KeyValuePair<string, object>("parentTreeVM", this)); NavigationData = ((IClosable)editVM).NavigationData; } navigationManager.Navigate(NavigationData); }); }
public MainFulfillmentViewModel( IInventoryHomeViewModel inventoryVm, IPicklistHomeViewModel picklistVm, IRmaHomeViewModel rmaVm, IViewModelsFactory<ICompleteShipmentViewModel> completeShipmentVmFactory, IRepositoryFactory<IOrderRepository> orderRepositoryFactory, IOrderService orderService, IAuthenticationContext authContext) { ViewTitle = new ViewTitleBase { Title = "Fulfillment", SubTitle = "FULFILLMENT SERVICE" }; _inventoryHomeVm = inventoryVm; _inventoryHomeVm.ParentViewModel = this; _picklistHomeVm = picklistVm; _picklistHomeVm.ParentViewModel = this; _rmaHomeVm = rmaVm; _rmaHomeVm.ParentViewModel = this; _completeShipmentVmFactory = completeShipmentVmFactory; _orderRepositoryFactory = orderRepositoryFactory; _authContext = authContext; _orderService = orderService; PopulateTabItems(); CompleteShipmentCommand = new DelegateCommand(RaiseCompleteShipment); CommonConfirmRequest = new InteractionRequest<Confirmation>(); CommonNotifyRequest = new InteractionRequest<Notification>(); }
public CatalogPromotionViewModel( IRepositoryFactory<IAppConfigRepository> appConfigRepositoryFactory, IRepositoryFactory<IMarketingRepository> repositoryFactory, IRepositoryFactory<ICatalogRepository> catalogRepositoryFactory, IRepositoryFactory<IPricelistRepository> pricelistRepositoryFactory, IViewModelsFactory<ISearchCategoryViewModel> searchCategoryVmFactory, IViewModelsFactory<ISearchItemViewModel> searchItemVmFactory, IRepositoryFactory<IShippingRepository> shippingRepositoryFactory, IMarketingEntityFactory entityFactory, INavigationManager navManager, Promotion item) : base(appConfigRepositoryFactory, repositoryFactory, entityFactory, navManager, item, false, searchCategoryVmFactory, searchItemVmFactory, shippingRepositoryFactory) { _catalogRepositoryFactory = catalogRepositoryFactory; _pricelistRepositoryFactory = pricelistRepositoryFactory; ViewTitle = new ViewTitleBase { Title = "Promotion", SubTitle = (item != null && !string.IsNullOrEmpty(item.Name)) ? item.Name.ToUpper(CultureInfo.InvariantCulture) : string.Empty }; }
public CaseTemplatePropertyViewModel(CaseTemplateProperty item) { InnerItem = item; ViewTitle = new ViewTitleBase() { Title = "Edit Info Value", SubTitle = "SETTINGS" }; InitializePropertiesForViewing(); }
public CaseTemplatePropertyViewModel(CaseTemplateProperty item) { InnerItem = item; ViewTitle = new ViewTitleBase() { Title = "Edit Info Value", SubTitle = "SETTINGS".Localize(null, LocalizationScope.DefaultCategory) }; InitializePropertiesForViewing(); }
private void InitStepsAndViewTitle() { ViewTitle = new ViewTitleBase { Title = Resources.InProgress }; Steps = new ObservableCollection<KeyValuePair<string, string>> { new KeyValuePair<string, string>(Resources.ProjectLocationAction, Resources.Pending), new KeyValuePair<string, string>(Resources.DatabaseSettingsAction, Resources.Pending), new KeyValuePair<string, string>(Resources.SearchSettingsAction, Resources.Pending) }; }
public LocalizationMainViewModel(ILocalizationHomeViewModel homeViewModel, IViewModelsFactory<ILocalizationImportJobHomeViewModel> importVmFactory, IAuthenticationContext authContext) { ViewTitle = new ViewTitleBase() { Title = "Localization", SubTitle = "SETTINGS" }; SubItems = new List<ItemTypeHomeTab>(); if (authContext.CheckPermission(PredefinedPermissions.Name_SettingsAppConfigSettings)) { SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeName, Caption = "Localizations", ViewModel = homeViewModel }); } if (authContext.CheckPermission(PredefinedPermissions.Name_SettingsAppConfigSettings)) { SubItems.Add(new ItemTypeHomeTab { IdTab = Configuration.NavigationNames.HomeName, Caption = "Import", ViewModel = importVmFactory.GetViewModelInstance(new KeyValuePair<string, object>("parentViewModel", this)) }); } if (SubItems.Count > 0) CurrentTab = SubItems[0]; }
public CustomersMainViewModel(ICustomersHomeViewModel customersHomeViewModel, ISearchHomeViewModel searchHomeViewModel, IAuthenticationContext authContext) { ViewTitle = new ViewTitleBase() { Title = "Cases", SubTitle = "CUSTOMER SERVICE" }; SubItems = new List<ItemTypeHomeTab> { new ItemTypeHomeTab { IdTab = NavigationNames.HomeName, Caption = "Cases", ViewModel = customersHomeViewModel } }; if (authContext.CheckPermission(PredefinedPermissions.CustomersSearchCases)) { SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeNameSearch, Caption = "Search", ViewModel = searchHomeViewModel }); } CurrentTab = SubItems[0]; }
public MainViewModel() { #if DESIGN if (IsInDesignMode) { RegisterWizardSteps(); Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("/VirtoCommerce.Bootstrapper.Main;component/MainModuleDictionary.xaml", UriKind.Relative) }); } #endif ViewTitle = new ViewTitleBase { Title = Resources.SDKTitle }; Cancelled = false; CancelCommand = new DelegateCommand<object>(x => Cancel(), x => !IsInitializing && !CurrentStep.IsLast && !Cancelled); CancelConfirmRequest = new InteractionRequest<Confirmation>(); OKDialogRequest = new InteractionRequest<Notification>(); OKCancelDialogRequest = new InteractionRequest<Confirmation>(); YesNoDialogRequest = new InteractionRequest<Confirmation>(); YesNoCancelDialogRequest = new InteractionRequest<Confirmation>(); AbortRetryIgnoreDialogRequest = new InteractionRequest<Confirmation>(); }
public MainPriceListViewModel(IPriceListHomeViewModel priceListHomeViewModel, IPriceListAssignmentHomeViewModel priceListAssignmentHomeViewModel, IViewModelsFactory<IPricelistImportJobHomeViewModel> pricelistImportVmFactory, IAuthenticationContext authContext) { ViewTitle = new ViewTitleBase() { Title = "Price Lists", SubTitle = "MERCHANDISE MANAGEMENT" }; SubItems = new List<ItemTypeHomeTab>(); if (authContext.CheckPermission(PredefinedPermissions.PricingPrice_ListsManage)) { SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeNamePriceList, Caption = "Price Lists", ViewModel = priceListHomeViewModel }); } if (authContext.CheckPermission(PredefinedPermissions.PricingPrice_List_AssignmentsManage)) { SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeNamePriceListAssignment, Caption = "Price List assignments", ViewModel = priceListAssignmentHomeViewModel }); } if (authContext.CheckPermission(PredefinedPermissions.PricingPrice_ListsImport_Jobs) || authContext.CheckPermission(PredefinedPermissions.PricingPrice_ListsImport_JobsRun)) { SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeNamePriceList, Caption = "Import", ViewModel = pricelistImportVmFactory.GetViewModelInstance(new KeyValuePair<string, object>("parentViewModel", this)) }); } CurrentTab = SubItems[0]; }
public SecurityMainViewModel(IViewModelsFactory<IAccountHomeViewModel> accountVmFactory, IViewModelsFactory<IRoleHomeViewModel> roleVmFactory, IAuthenticationContext authContext) { ViewTitle = new ViewTitleBase { Title = "Users", SubTitle = "USER MANAGMENT" }; SubItems = new List<ItemTypeHomeTab>(); var parameters = new KeyValuePair<string, object>("parentViewModel", this); if (authContext.CheckPermission(PredefinedPermissions.SecurityAccounts)) { SubItems.Add(new ItemTypeHomeTab { Caption = "Accounts", ViewModel = accountVmFactory.GetViewModelInstance(parameters) }); } if (authContext.CheckPermission(PredefinedPermissions.SecurityRoles)) { SubItems.Add(new ItemTypeHomeTab { Caption = "Roles", ViewModel = roleVmFactory.GetViewModelInstance(parameters) }); } CurrentTab = SubItems[0]; }
public TreeCategoryViewModel( CategoryBase item, IRepositoryFactory<IAppConfigRepository> seoRepositoryFactory, IRepositoryFactory<ICatalogRepository> repositoryFactory, IViewModelsFactory<ICategoryViewModel> categoryVmFactory, IViewModelsFactory<ILinkedCategoryViewModel> linkedCategoryVmFactory, IViewModelsFactory<ITreeCategoryViewModel> treeCategoryVmFactory, IAuthenticationContext authContext, INavigationManager navigationManager) : base(repositoryFactory, authContext) { _treeCategoryVmFactory = treeCategoryVmFactory; _seoRepositoryFactory = seoRepositoryFactory; InnerItem = item; EmbeddedHierarchyEntry = this; ViewTitle = new ViewTitleBase { Title = "Category", SubTitle = GetDisplayName(item).ToUpper(CultureInfo.InvariantCulture) }; PriorityChangeCommand = new DelegateCommand<string>(RaisePriorityChangeInteractionRequest); OpenItemCommand = new DelegateCommand(() => { if (NavigationData == null) { var param = new KeyValuePair<string, object>("item", InnerItem); IViewModel editVM; if (InnerItem is Category) editVM = categoryVmFactory.GetViewModelInstance(param, new KeyValuePair<string, object>("parentTreeVM", this)); else editVM = linkedCategoryVmFactory.GetViewModelInstance(param); NavigationData = ((IClosable)editVM).NavigationData; } navigationManager.Navigate(NavigationData); }); }
public MainMarketingViewModel(IMarketingHomeViewModel marketingVm, IDynamicContentHomeViewModel contentVm, IContentPublishingHomeViewModel publishingVm, IAuthenticationContext authContext) { ViewTitle = new ViewTitleBase { Title="Marketing", SubTitle="MARKETING SERVICE" }; SubItems = new List<ItemTypeHomeTab>(); if (authContext.CheckPermission(PredefinedPermissions.MarketingPromotionsManage)) { SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeName, Caption = "Promotions", ViewModel = marketingVm }); } if (authContext.CheckPermission(PredefinedPermissions.MarketingDynamic_ContentManage)) { SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeNameDynamicContent, Caption = "Dynamic content", Order = 10, ViewModel = contentVm }); } if (authContext.CheckPermission(PredefinedPermissions.MarketingContent_PublishingManage)) { SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeNameContentPublishing, Caption = "Content publishing", Order = 20, ViewModel = publishingVm }); } CurrentTab = SubItems[0]; }
public CasePropertyViewModel(CaseProperty item) { ViewTitle = new ViewTitleBase() { Title = "Edit Info Value", SubTitle = "SETTINGS" }; InnerItem = item; }
public HelpViewModel() { ViewTitle = new ViewTitleBase { Title = Resources.SDKTitle, SubTitle = Resources.HelpTitle }; }
public CasePropertyViewModel(CaseProperty item) { ViewTitle = new ViewTitleBase() { Title = "Edit Info Value", SubTitle = "SETTINGS".Localize(null, LocalizationScope.DefaultCategory) }; InnerItem = item; }
public CustomersDetailViewModel(ICustomerEntityFactory entityFactory, ICustomerRepository repository, NavigationManager navManager, IRepositoryFactory<ICustomerRepository> repositoryFactory, IAuthenticationContext authContext, ICustomersCommonViewModel parentViewModel, Case innerCase, Contact innerContact, CaseActionState caseAction, ContactActionState contactAction, IViewModelsFactory<CaseDetailViewModel> caseDetailVmFactory, IViewModelsFactory<CustomerDetailViewModel> customerDetailVmFactory, IViewModelsFactory<ICreateCustomerDialogViewModel> wizardCustomerVmFactory, IViewModelsFactory<IKnowledgeBaseDialogViewModel> knowledgeBaseGroupVmFactory) { _entityFactory = entityFactory; Repository = repository; _authContext = authContext; _navManager = navManager; _repositoryFactory = repositoryFactory; _caseDetailVmFactory = caseDetailVmFactory; _customerDetailVmFactory = customerDetailVmFactory; _wizardCustomerVmFactory = wizardCustomerVmFactory; _knowledgeBaseGroupVmFactory = knowledgeBaseGroupVmFactory; _parentViewModel = parentViewModel; OriginalItem = innerCase; OriginalContact = innerContact; InnerItem = innerCase; CurrentCustomer = innerContact; CaseActionState = caseAction; ContactActionState = contactAction; InitializeCommands(); _isItemsInitialized = false; ViewTitle = new ViewTitleBase { SubTitle = string.Format("Case #{0}".Localize(), InnerItem.Number), Title = "Customer Service" }; _authorId = _authContext.CurrentUserId; _authorName = _authContext.CurrentUserName; }
public ConfigurationHomeViewModel(NavigationManager navigationManager) { _navigationManager = navigationManager; ViewTitle = new ViewTitleBase { Title = "Settings" }; }
public MultiLineEditViewModel(string title, string subTitle) { ViewTitle = new ViewTitleBase() { Title = title, SubTitle = subTitle }; }