Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
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 });
        }
Exemplo n.º 4
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 });
        }
Exemplo n.º 5
0
 public AccountSelectorView(AccountSelectorViewModel viewModel)
 {
     DataContext          = viewModel;
     viewModel.Refreshed += viewModel_Refreshed;
     InitializeComponent();
 }
 public AccountSelectorView(AccountSelectorViewModel viewModel)
 {
     DataContext = viewModel;
     InitializeComponent();
 }
Exemplo n.º 7
0
 public AccountSelectorView(AccountSelectorViewModel viewModel)
 {
     DataContext = viewModel;
     viewModel.Refreshed += viewModel_Refreshed;
     InitializeComponent();
 }
 public AccountSelectorView(AccountSelectorViewModel viewModel)
 {
     DataContext = viewModel;
     InitializeComponent();
 }