/// <summary>
        ///     Initializes a new instance of the <see cref="TransactionManagerService" /> class.
        /// </summary>
        /// <param name="bucketRepository">The bucket repository.</param>
        /// <param name="statementRepository">The statement repository.</param>
        /// <param name="logger">The logger.</param>
        /// <param name="monitorableDependencies">The dependency monitor manager</param>
        /// <exception cref="System.ArgumentNullException">
        /// </exception>
        public TransactionManagerService(
            [NotNull] IBudgetBucketRepository bucketRepository,
            [NotNull] IStatementRepository statementRepository,
            [NotNull] ILogger logger,
            [NotNull] MonitorableDependencies monitorableDependencies)
        {
            if (bucketRepository == null)
            {
                throw new ArgumentNullException(nameof(bucketRepository));
            }

            if (statementRepository == null)
            {
                throw new ArgumentNullException(nameof(statementRepository));
            }

            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            if (monitorableDependencies == null)
            {
                throw new ArgumentNullException(nameof(monitorableDependencies));
            }

            this.bucketRepository    = bucketRepository;
            this.statementRepository = statementRepository;
            this.logger = logger;
            this.monitorableDependencies = monitorableDependencies;
        }
 public StatementController(ILogger <StatementController> logger, IStatementRepository orclRepo
                            , IOptions <AppSettings> appSettings)
 {
     _logger      = logger;
     _orclRepo    = orclRepo;
     _appSettings = appSettings.Value;
 }
示例#3
0
        public async Task <IActionResult> Index(
            [FromServices] IStatementRepository repository,
            [FromQuery] FilterModel filter)
        {
            var statements = await repository.GetAll();

            var statementsModel = new List <StatementModel>();

            foreach (var statement in statements)
            {
                statementsModel.Add(new StatementModel(statement));
            }

            var filteredList = statementsModel
                               .Where(filter.FilterExp)
                               .ToList();

            var orderedList = GetOrderedList(filter.Order, filteredList);

            var model = new StatementIndexView()
            {
                Statements = orderedList,
                Filter     = filter
            };

            return(View(model));
        }
示例#4
0
 public OwnerController(IOwnerRepository repository, ILogger <BaseController <IOwnerRepository, Owner> > logger,
                        UserManager <AccountUser> userManager, IStatementRepository statementRepository, IEquipmentRepository equipmentRepository) : base(repository, logger,
                                                                                                                                                          userManager)
 {
     StatementRepository = statementRepository;
     EquipmentRepository = equipmentRepository;
 }
        /// <summary>
        ///     Initializes a new instance of the <see cref="TransactionManagerService" /> class.
        /// </summary>
        /// <param name="bucketRepository">The bucket repository.</param>
        /// <param name="statementRepository">The statement repository.</param>
        /// <param name="logger">The logger.</param>
        /// <param name="monitorableDependencies">The dependency monitor manager</param>
        /// <exception cref="System.ArgumentNullException">
        /// </exception>
        public TransactionManagerService(
            [NotNull] IBudgetBucketRepository bucketRepository,
            [NotNull] IStatementRepository statementRepository,
            [NotNull] ILogger logger,
            [NotNull] MonitorableDependencies monitorableDependencies)
        {
            if (bucketRepository == null)
            {
                throw new ArgumentNullException(nameof(bucketRepository));
            }

            if (statementRepository == null)
            {
                throw new ArgumentNullException(nameof(statementRepository));
            }

            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            if (monitorableDependencies == null) throw new ArgumentNullException(nameof(monitorableDependencies));

            this.bucketRepository = bucketRepository;
            this.statementRepository = statementRepository;
            this.logger = logger;
            this.monitorableDependencies = monitorableDependencies;
        }
 public StatementService(
     IStatementFactory statementFactory,
     IStatementRepository statementRepository,
     IUnitOfWork unitOfWork)
 {
     this.statementRepository = statementRepository;
     this.statementFactory    = statementFactory;
     this.unitOfWork          = unitOfWork;
 }
示例#7
0
        public async Task <IActionResult> Edit(
            [FromServices] IStatementRepository repository,
            [FromRoute] Guid id)
        {
            var statement = await repository.GetStatement(new PrimaryKey(id)) as Statement;

            var model = new StatementModel(statement);

            return(View(model));
        }
示例#8
0
 public StatementService(
     IMediatorHandler mediatorHandler,
     IMapper mapper,
     IEventBus eventStore,
     IStatementRepository statementRepository)
 {
     _mediatorHandler     = mediatorHandler;
     _mapper              = mapper;
     _eventStore          = eventStore;
     _statementRepository = statementRepository;
 }
示例#9
0
 public StatementCommandHandler(
     IMediatorHandler mediatorHandler,
     IMapper mapper,
     IStatementRepository statementRepository,
     IInvoiceRepository invoiceRepository)
 {
     _mediatorHandler     = mediatorHandler;
     _mapper              = mapper;
     _statementRepository = statementRepository;
     _invoiceRepository   = invoiceRepository;
 }
示例#10
0
        public async Task <IActionResult> ChangeStatus(
            [FromServices] IStatementRepository statementRepository,
            [FromRoute] Guid id)
        {
            var statement = await statementRepository.GetStatement(new PrimaryKey(id));

            var currentStatusCode = (int)((Statement)statement).CurrentStatus.StatusCode;

            ViewBag.StatusItems = GetStatusItems(currentStatusCode);

            return(View());
        }
示例#11
0
        public StatementDetailViewModel(IStatementRepository dataService,
                                        IEventAggregator eventAggregator,
                                        IMessageDialogService messageDialogService)
            : base(eventAggregator)
        {
            _statementRepository  = dataService;
            _messageDialogService = messageDialogService;

            AddTransactionCommand    = new DelegateCommand(OnAddTransactionExecute);
            RemoveTransactionCommand = new DelegateCommand(OnRemoveTransactionExecute, OnRemoveTransactionCanExecute);

            Transactions = new ObservableCollection <TransactionWrapper>();
        }
示例#12
0
 public UnitOfWork(string strConnection)
 {
     _db = new ApplicationContext(strConnection);
     _applicationUserManager           = new ApplicationUserManager(new UserStore <ApplicationUser>(_db));
     _applicationRoleManager           = new ApplicationRoleManager(new RoleStore <ApplicationRole>(_db));
     _enrolleeManager                  = new EnrolleeManager(_db);
     _cityRepository                   = new CityRepository(_db);
     _educationalInstitutionRepository = new EducationalInstitutionRepository(_db);
     _facultyRepository                = new FacultyRepository(_db);
     _regionRepository                 = new RegionRepository(_db);
     _specialtyRepository              = new SpecialtyRepository(_db);
     _statementRepository              = new StatementRepository(_db);
     _subjectRepository                = new SubjectRepository(_db);
     _markSubjectRepository            = new MarkSubjectRepository(_db);
     _facultySubjectRepository         = new FacultySubjectRepository(_db);
 }
 public StatementsController(IStatementRepository statementRepo)
 {
     StatementRepo = statementRepo;
 }
 public StatementManager(IStatementRepository _statementRepository)
 {
     statementRepository = _statementRepository;
 }
 public void Init()
 {
     _statementRepo = Substitute.For <IStatementRepository>();
     _finTsExecutor = Substitute.For <IFinTsExecutor>();
 }
示例#16
0
 public UnitOfWork()
 {
     _context            = new ApplicationDbContext();
     StatementRepository = new StatementRepository(_context);
 }
示例#17
0
 public StatementController(IStatementRepository repository)
 {
     this._repo = repository;
 }
 public StatementsController(IStatementRepository statementRepo)
 {
     StatementRepo = statementRepo;
 }
示例#19
0
 public InputHandler(ICustomerRepository customerRepository, IStatementRepository statementRepository, IInputRepository inputRepository)
 {
     _customerRepository  = customerRepository;
     _statementRepository = statementRepository;
     _inputRepository     = inputRepository;
 }
示例#20
0
 public StatementService(IStatementRepository statementRepository, ILogger <StatementDownloadService> logger, IFinTsExecutor finTsExecutor)
 {
     _statementRepository = statementRepository;
     _logger        = logger;
     _finTsExecutor = finTsExecutor;
 }