Пример #1
0
        public AccountModule(IRegionManager regionManager,
            IUserService userService, IApplicationState applicationState,
            AccountSelectorView accountSelectorView, AccountSelectorViewModel accountSelectorViewModel,
            AccountDetailsView accountDetailsView,
            DocumentCreatorView documentCreatorView,
            BatchDocumentCreatorView batchDocumentCreatorView, BatchDocumentCreatorViewModel batchDocumentCreatorViewModel)
            : base(regionManager, AppScreens.AccountView)
        {
            _regionManager = regionManager;
            _userService = userService;
            _applicationState = applicationState;
            _accountSelectorView = accountSelectorView;
            _accountSelectorViewModel = accountSelectorViewModel;
            _accountDetailsView = accountDetailsView;
            _documentCreatorView = documentCreatorView;
            _batchDocumentCreatorView = batchDocumentCreatorView;
            _batchDocumentCreatorViewModel = batchDocumentCreatorViewModel;

            AddDashboardCommand<EntityCollectionViewModelBase<AccountTypeViewModel, AccountType>>(Resources.AccountType.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountViewModel, Account>>(Resources.Account.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountScreenViewModel, AccountScreen>>(Resources.AccountScreen.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountTransactionTypeViewModel, AccountTransactionType>>(Resources.TransactionType.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountTransactionDocumentTypeViewModel, AccountTransactionDocumentType>>(Resources.DocumentType.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountTransactionDocumentViewModel, AccountTransactionDocument>>(Resources.Transaction.ToPlural(), Resources.Accounts, 40);

            PermissionRegistry.RegisterPermission(PermissionNames.NavigateAccountView, PermissionCategories.Navigation, Resources.CanNavigateCash);
            PermissionRegistry.RegisterPermission(PermissionNames.CreateAccount, PermissionCategories.Account, Resources.CanCreateAccount);

            SetNavigationCommand(Resources.Accounts, Resources.Common, "Images/Xls.png", 30);
        }
Пример #2
0
        public AccountModule(IRegionManager regionManager,
                             IUserService userService, IApplicationState applicationState,
                             AccountSelectorView accountSelectorView, AccountSelectorViewModel accountSelectorViewModel,
                             AccountDetailsView accountDetailsView,
                             DocumentCreatorView documentCreatorView,
                             BatchDocumentCreatorView batchDocumentCreatorView, BatchDocumentCreatorViewModel batchDocumentCreatorViewModel)
            : base(regionManager, AppScreens.AccountView)
        {
            _regionManager                 = regionManager;
            _userService                   = userService;
            _applicationState              = applicationState;
            _accountSelectorView           = accountSelectorView;
            _accountSelectorViewModel      = accountSelectorViewModel;
            _accountDetailsView            = accountDetailsView;
            _documentCreatorView           = documentCreatorView;
            _batchDocumentCreatorView      = batchDocumentCreatorView;
            _batchDocumentCreatorViewModel = batchDocumentCreatorViewModel;

            AddDashboardCommand <EntityCollectionViewModelBase <AccountTypeViewModel, AccountType> >(Resources.AccountType.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand <EntityCollectionViewModelBase <AccountViewModel, Account> >(Resources.Account.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand <EntityCollectionViewModelBase <AccountScreenViewModel, AccountScreen> >(Resources.AccountScreen.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand <EntityCollectionViewModelBase <AccountTransactionTypeViewModel, AccountTransactionType> >(Resources.TransactionType.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand <EntityCollectionViewModelBase <AccountTransactionDocumentTypeViewModel, AccountTransactionDocumentType> >(Resources.DocumentType.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand <EntityCollectionViewModelBase <AccountTransactionDocumentViewModel, AccountTransactionDocument> >(Resources.Transaction.ToPlural(), Resources.Accounts, 40);

            PermissionRegistry.RegisterPermission(PermissionNames.NavigateAccountView, PermissionCategories.Navigation, Resources.CanNavigateCash);
            PermissionRegistry.RegisterPermission(PermissionNames.CreateAccount, PermissionCategories.Account, Resources.CanCreateAccount);

            SetNavigationCommand(Resources.Accounts, Resources.Common, "Images/Xls.png", 30);
        }
Пример #3
0
        public AccountModule(IRegionManager regionManager,
            IUserService userService,
            AccountSelectorView accountSelectorView,
            AccountDetailsView accountDetailsView,
            DocumentCreatorView documentCreatorView)
            : base(regionManager, AppScreens.AccountList)
        {
            _regionManager = regionManager;
            _userService = userService;
            _accountSelectorView = accountSelectorView;
            _accountDetailsView = accountDetailsView;
            _documentCreatorView = documentCreatorView;

            AddDashboardCommand<EntityCollectionViewModelBase<AccountTemplateViewModel, AccountTemplate>>(Resources.AccountTemplate.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountViewModel, Account>>(Resources.Account.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountScreenViewModel, AccountScreen>>(Resources.AccountScreen.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountTransactionTemplateViewModel, AccountTransactionTemplate>>(Resources.TransactionTemplate.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountTransactionDocumentViewModel, AccountTransactionDocument>>(Resources.TransactionDocument.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountTransactionDocumentTemplateViewModel, AccountTransactionDocumentTemplate>>(Resources.DocumentTemplate.ToPlural(), Resources.Accounts, 40);

            PermissionRegistry.RegisterPermission(PermissionNames.NavigateAccountView, PermissionCategories.Navigation, Resources.CanNavigateCash);
            PermissionRegistry.RegisterPermission(PermissionNames.MakeAccountTransaction, PermissionCategories.Cash, Resources.CanMakeAccountTransaction);
            PermissionRegistry.RegisterPermission(PermissionNames.CreditOrDeptAccount, PermissionCategories.Cash, Resources.CanMakeCreditOrDeptTransaction);
            PermissionRegistry.RegisterPermission(PermissionNames.CreateAccount, PermissionCategories.Account, Resources.CanCreateAccount);

            SetNavigationCommand(Resources.Accounts, Resources.Common, "Images/Xls.png", 70);
        }
Пример #4
0
        public AccountModule(IRegionManager regionManager, 
            AccountDetailsView accountDetailsView,
            DocumentCreatorView documentCreatorView)
        {
            _regionManager = regionManager;
            _accountDetailsView = accountDetailsView;
            _documentCreatorView = documentCreatorView;

            AddDashboardCommand<EntityCollectionViewModelBase<AccountTemplateViewModel, AccountTemplate>>(string.Format(Resources.List_f, Resources.AccountTemplate), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountViewModel, Account>>(string.Format(Resources.List_f, Resources.Account), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountTransactionTemplateViewModel, AccountTransactionTemplate>>(string.Format(Resources.List_f, "Transaction Template"), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountTransactionDocumentViewModel, AccountTransactionDocument>>(string.Format(Resources.List_f, "Transaction Document"), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountTransactionDocumentTemplateViewModel, AccountTransactionDocumentTemplate>>(string.Format(Resources.List_f, "Document Template"), Resources.Accounts, 40);

            PermissionRegistry.RegisterPermission(PermissionNames.MakeAccountTransaction, PermissionCategories.Cash, Resources.CanMakeAccountTransaction);
            PermissionRegistry.RegisterPermission(PermissionNames.CreditOrDeptAccount, PermissionCategories.Cash, Resources.CanMakeCreditOrDeptTransaction);
        }
Пример #5
0
        public AccountModule(IRegionManager regionManager,
            IAutomationService automationService,
            IUserService userService,
            IAccountService accountService,
            ITicketService ticketService,
            ICacheService cacheService,
            AccountSelectorView accountSelectorView, AccountSelectorViewModel accountSelectorViewModel,
            AccountDetailsView accountDetailsView,
            DocumentCreatorView documentCreatorView,
            BatchDocumentCreatorView batchDocumentCreatorView, BatchDocumentCreatorViewModel batchDocumentCreatorViewModel)
            : base(regionManager, AppScreens.AccountView)
        {
            _regionManager = regionManager;
            _userService = userService;
            _accountService = accountService;
            _ticketService = ticketService;
            _cacheService = cacheService;
            _accountSelectorView = accountSelectorView;
            _accountSelectorViewModel = accountSelectorViewModel;
            _accountDetailsView = accountDetailsView;
            _documentCreatorView = documentCreatorView;
            _batchDocumentCreatorView = batchDocumentCreatorView;
            _batchDocumentCreatorViewModel = batchDocumentCreatorViewModel;

            AddDashboardCommand<EntityCollectionViewModelBase<AccountTypeViewModel, AccountType>>(Resources.AccountType.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountViewModel, Account>>(Resources.Account.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountScreenViewModel, AccountScreen>>(Resources.AccountScreen.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountTransactionTypeViewModel, AccountTransactionType>>(Resources.TransactionType.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountTransactionDocumentTypeViewModel, AccountTransactionDocumentType>>(Resources.DocumentType.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<AccountTransactionDocumentViewModel, AccountTransactionDocument>>(Resources.Transaction.ToPlural(), Resources.Accounts, 40);

            PermissionRegistry.RegisterPermission(PermissionNames.NavigateAccountView, PermissionCategories.Navigation, Resources.CanNavigateCash);
            PermissionRegistry.RegisterPermission(PermissionNames.CreateAccount, PermissionCategories.Account, Resources.CanCreateAccount);

            SetNavigationCommand(Resources.Accounts, Resources.Common, "Images/Xls.png", 30);

            automationService.RegisterActionType(ActionNames.CreateAccountTransactionDocument, string.Format(Resources.Create_f, Resources.AccountTransactionDocument), new { AccountTransactionDocumentName = "" });
            automationService.RegisterActionType(ActionNames.CreateAccountTransaction, string.Format(Resources.Create_f, Resources.AccountTransaction), new { AccountTransactionTypeName = "", Amount = 0m });
        }
Пример #6
0
        public AccountModule(IRegionManager regionManager,
                             IAutomationService automationService,
                             IUserService userService,
                             IAccountService accountService,
                             ITicketService ticketService,
                             ICacheService cacheService,
                             AccountSelectorView accountSelectorView, AccountSelectorViewModel accountSelectorViewModel,
                             AccountDetailsView accountDetailsView,
                             DocumentCreatorView documentCreatorView,
                             BatchDocumentCreatorView batchDocumentCreatorView, BatchDocumentCreatorViewModel batchDocumentCreatorViewModel)
            : base(regionManager, AppScreens.AccountView)
        {
            _regionManager                 = regionManager;
            _userService                   = userService;
            _accountService                = accountService;
            _ticketService                 = ticketService;
            _cacheService                  = cacheService;
            _accountSelectorView           = accountSelectorView;
            _accountSelectorViewModel      = accountSelectorViewModel;
            _accountDetailsView            = accountDetailsView;
            _documentCreatorView           = documentCreatorView;
            _batchDocumentCreatorView      = batchDocumentCreatorView;
            _batchDocumentCreatorViewModel = batchDocumentCreatorViewModel;

            AddDashboardCommand <EntityCollectionViewModelBase <AccountTypeViewModel, AccountType> >(Resources.AccountType.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand <EntityCollectionViewModelBase <AccountViewModel, Account> >(Resources.Account.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand <EntityCollectionViewModelBase <AccountScreenViewModel, AccountScreen> >(Resources.AccountScreen.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand <EntityCollectionViewModelBase <AccountTransactionTypeViewModel, AccountTransactionType> >(Resources.TransactionType.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand <EntityCollectionViewModelBase <AccountTransactionDocumentTypeViewModel, AccountTransactionDocumentType> >(Resources.DocumentType.ToPlural(), Resources.Accounts, 40);
            AddDashboardCommand <EntityCollectionViewModelBase <AccountTransactionDocumentViewModel, AccountTransactionDocument> >(Resources.Transaction.ToPlural(), Resources.Accounts, 40);

            PermissionRegistry.RegisterPermission(PermissionNames.NavigateAccountView, PermissionCategories.Navigation, Resources.CanNavigateCash);
            PermissionRegistry.RegisterPermission(PermissionNames.CreateAccount, PermissionCategories.Account, Resources.CanCreateAccount);

            SetNavigationCommand(Resources.Accounts, Resources.Common, "Images/Xls.png", 30);

            automationService.RegisterActionType(ActionNames.CreateAccountTransactionDocument, string.Format(Resources.Create_f, Resources.AccountTransactionDocument), new { AccountTransactionDocumentName = "" });
            automationService.RegisterActionType(ActionNames.CreateAccountTransaction, string.Format(Resources.Create_f, Resources.AccountTransaction), new { AccountTransactionTypeName = "", Amount = 0m });
        }