コード例 #1
0
ファイル: AlertsPresenter.cs プロジェクト: aelhadi/opencbs
 public AlertsPresenter(
     IAlertsView view,
     IErrorView errorView,
     IApplicationController applicationController,
     ILoanRepository loanRepository)
 {
     _view = view;
     _errorView = errorView;
     _applicationController = applicationController;
     _loanRepository = loanRepository;
 }
コード例 #2
0
 public BatchRepaymentPresenter(
     IBatchRepaymentView view,
     ILoanRepository loanRepository,
     IVillageBankRepository villageBankRepository,
     IEventInterceptor eventInterceptor,
     IConnectionProvider connectionProvider,
     IApplicationController applicationController)
 {
     _view = view;
     _loanRepository = loanRepository;
     _villageBankRepository = villageBankRepository;
     _eventInterceptor = eventInterceptor;
     _connectionProvider = connectionProvider;
     _applicationController = applicationController;
 }
コード例 #3
0
        public async Task <IActionResult> CancelLoan(
            [FromServices] ILoanRepository repository,
            [FromRoute] Guid id,
            [FromServices] IQueryProcessor queryProcessor,
            CancellationToken cancellationToken)
        {
            var loan = await repository.Get(id, cancellationToken);

            if (loan == null)
            {
                throw new ApiException(HttpStatusCode.NotFound, ErrorCodes.LoanNotFound, $"Loan {id} not found");
            }

            try{
                loan.MakeCancel();
                await repository.Save(loan, cancellationToken);
            }
            catch (InvalidOperationException) {
                throw new ApiException(HttpStatusCode.Conflict, ErrorCodes.IncorrectOperation, $"Incorrect loan state");
            }

            return(Ok(await queryProcessor.Process <LoanViewQuery, LoanView>(new LoanViewQuery(id), cancellationToken)));
        }
コード例 #4
0
 public LoansController(ILoanRepository loanRepo)
 {
     _loanRepo = loanRepo;
 }
コード例 #5
0
 public HomeWithDIController(ILoanRepository loanRepository)
 {
     _loanRepository = loanRepository;
 }
コード例 #6
0
 public LoanService(ILoanRepository loanRepository)
 {
     this.loanRepository = loanRepository;
 }
コード例 #7
0
 public PayCommand(ILoanRepository loanRepository, IUIFactory uiFactory)
 {
     this.loanRepository = loanRepository;
     this.uiFactory      = uiFactory;
 }
コード例 #8
0
 public UpdateLoanCommandHandler(ILoanRepository repository)
 {
     _repository = repository;
 }
コード例 #9
0
 public LoanService(ILoanRepository repository)
 {
     _repository = repository;
 }
コード例 #10
0
 public GetLoansByStatusHandler(ILoanRepository loans, IFactory <IBuilder <APIGatewayProxyResponse> > response, SasDynamoDbConfig config)
 {
     _loans    = loans;
     _response = response;
     _config   = config;
 }
コード例 #11
0
 public BorrowBookTest()
 {
     _libraryContext = LibraryContextFactory.Create();
     _loanRepository = new LoanRepository(_libraryContext);
     _bookRepository = new BookRepository(_libraryContext);
 }
コード例 #12
0
 public LoanService(ILoanRepository gameRepository)
 {
     _loanRepository = gameRepository;
 }
コード例 #13
0
 // constructor method
 public SearchController(IBookRepository bookRepository, ILoanRepository loanRepository, AppDbContext appDbContext)
 {
     _bookRepository = bookRepository;
     _loanRepository = loanRepository;
     _appDbContext   = appDbContext;
 }
コード例 #14
0
ファイル: PayPointApi.cs プロジェクト: vijayamazon/ezbob
 public PayPointApi()
 {
     this.loanOptionsRepository = ObjectFactory.GetInstance <ILoanOptionsRepository>();
     this._loans = ObjectFactory.GetInstance <ILoanRepository>();
 }
コード例 #15
0
 public PayrollServices(IPayrollRepository payrollRepository, ILookupRepository lookupRepository, IEmployeeRepository employeeRepository,
                        IPayrollViewModelFactory payrollViewModelFactory, ILevelGradeRepository levelGradeRepository, ICompanyRepository companyRepository,
                        IEmployeeDeductionRepository employeeDeductionRepository, IRewardRepository rewardRepository, ILoanRepository loanRepository,
                        IEmployeeOnBoardRepository employeeOnBoardRepository, IUsersRepository usersRepository, ILevelRepository levelRepository,
                        IGradeRepository gradeRepository, IBenefitRepository benefitRepository, IDigitalFileRepository digitalFileRepository, ISessionStateService session)
 {
     this.lookupRepository            = lookupRepository;
     this.payrollRepository           = payrollRepository;
     this.payrollViewModelFactory     = payrollViewModelFactory;
     this.levelGradeRepository        = levelGradeRepository;
     this.employeeRepository          = employeeRepository;
     this.employeeDeductionRepository = employeeDeductionRepository;
     this.companyRepository           = companyRepository;
     this.rewardRepository            = rewardRepository;
     this.loanRepository            = loanRepository;
     this.usersRepository           = usersRepository;
     this.levelRepository           = levelRepository;
     this.gradeRepository           = gradeRepository;
     this.benefitRepository         = benefitRepository;
     this.employeeOnBoardRepository = employeeOnBoardRepository;
     this.digitalFileRepository     = digitalFileRepository;
     this.session = session;
 }
コード例 #16
0
 /// <inheritdoc />
 public WidgetsController(ILoanRepository loanRepository)
 {
     _loanRepository = loanRepository;
 }
コード例 #17
0
 public LoanService(ILoanRepository loanRepository)
 {
     _loanRepository = loanRepository;
 }
コード例 #18
0
 public HomeController(ILoanRepository loanRepository)
 {
     _loanRepository = loanRepository;
 }
コード例 #19
0
 public LoanController(ILoanRepository loanRepo, IScheduler paybackSchedule, IMapper mapper)
 {
     this._mapper          = mapper;
     this._loanRepo        = loanRepo;
     this._paybackSchedule = paybackSchedule;
 }
コード例 #20
0
ファイル: ProfilePresenterTests.cs プロジェクト: nmotocic/LMS
        public ProfilePresenterTests()
        {
            userRepository        = UserRepository.getInstance();
            bookRepository        = BookRepository.getInstance();
            loanRepository        = LoanRepository.getInstance();
            reservationRepository = ReservationRepository.getInstance();

            loanBook = new Book()
            {
                SerialNumber     = 2000,
                Title            = "The Hobbit",
                Author           = "J. R. R. Tolkein",
                Publisher        = "Penguin Books",
                YearOfPublishing = 2005,
                Genre            = "Fantasy",
                Status           = "Avaliable"
            };


            loanBook = new Book()
            {
                SerialNumber     = 2001,
                Title            = "Unfinished Tales",
                Author           = "J. R. R. Tolkein",
                Publisher        = "Penguin Books",
                YearOfPublishing = 2006,
                Genre            = "Fantasy",
                Status           = "Avaliable"
            };


            reservationBook = new Book()
            {
                SerialNumber     = 2002,
                Title            = "The Silmarillion",
                Author           = "J. R. R. Tolkein",
                Publisher        = "Penguin Books",
                YearOfPublishing = 2009,
                Genre            = "Fantasy",
                Status           = "Avaliable"
            };

            returnBook = new Book()
            {
                SerialNumber     = 2003,
                Title            = "The Childer of Hurin",
                Author           = "J. R. R. Tolkein",
                Publisher        = "Penguin Books",
                YearOfPublishing = 2007,
                Genre            = "Fantasy",
                Status           = "Avaliable"
            };

            user = new Customer()
            {
                Id       = 152,
                Name     = "Ferko",
                Surname  = "Feric",
                Email    = "*****@*****.**",
                Username = "******",
                Password = "******",
                Phone    = "123-4567"
            };
        }
コード例 #21
0
 public LoanService(ILoanRepository loanRepository, IBookService bookService)
 {
     _repository  = loanRepository;
     _bookService = bookService;
 }
コード例 #22
0
ファイル: LoanService.cs プロジェクト: nmotocic/LMS
 public LoanService()
 {
     _loanRepository = LoanRepository.getInstance();
     _bookRepository = BookRepository.getInstance();
     _userRepository = UserRepository.getInstance();
 }
コード例 #23
0
 public UserService(IUserRepository userRepository, ILoanRepository loanRepository)
 {
     _userRepository = userRepository;
     _loanRepository = loanRepository;
 }
コード例 #24
0
ファイル: ReportingService.cs プロジェクト: Indexu/LibraryAPI
 public ReportingService(ILoanRepository loanRepository, IMapper mapper)
     : base(mapper)
 {
     this.loanRepository = loanRepository;
 }
コード例 #25
0
 public MaintenanceController(IUnitOfWork unitOfWork, ISettingRepository settingRepository, IPositionRepository positionRepository, IPaymentFrequencyRepository paymentFrequencyRepository,
                              IHolidayRepository holidayRepository, IDepartmentRepository departmentRepository, ILeaveRepository leaveRepository, ILoanRepository loanRepository,
                              IMachineRepository machineRepository, IWebService webService, IDeductionRepository deductionRepository,
                              IEmployeeMachineService emplyeeMachineService, IWorkScheduleRepository workScheduleRepository, IAdjustmentRepository adjustmentRepository,
                              ICompanyRepository companyRepository)
 {
     _unitOfWork                 = unitOfWork;
     _settingRepository          = settingRepository;
     _positionRepository         = positionRepository;
     _paymentFrequencyRepository = paymentFrequencyRepository;
     _departmentRepository       = departmentRepository;
     _holidayRepository          = holidayRepository;
     _leaveRepository            = leaveRepository;
     _loanRepository             = loanRepository;
     _machineRepository          = machineRepository;
     _webService                 = webService;
     _emplyeeMachineService      = emplyeeMachineService;
     _workScheduleRepository     = workScheduleRepository;
     _deductionRepository        = deductionRepository;
     _adjustmentRepository       = adjustmentRepository;
     _companyRepository          = companyRepository;
 }
コード例 #26
0
 public LoansController(ILoanRepository repository, IUnitOfWork unitOfWork, IMapper mapper, UserManager <ApplicationUser> userManager)
 {
     _repository = repository;
     _mapper     = mapper;
     _unitOfWork = unitOfWork;
 }
コード例 #27
0
ファイル: LoansController.cs プロジェクト: aperepjolkin/Task3
 public LoansController(ILoanRepository loanRepository, IMapper mapper)
 {
     _loanRepository = loanRepository;
     _mapper         = mapper;
 }
コード例 #28
0
 public AttachLoanToClient(IClientRepository clientRepository, ILoanRepository loanRepository, IUIFactory factory)
 {
     this.clientRepository = clientRepository;
     this.loanRepository   = loanRepository;
     this.factory          = factory;
 }
コード例 #29
0
ファイル: LoanController.cs プロジェクト: piotreczek5/Lowner
 public LoanController(ILoanRepository loanRepository, IUserRepository userRepository, LoanValidator loanValidator)
 {
     _loanRepository = loanRepository;
     _userRepository = userRepository;
     _loanValidator  = loanValidator;
 }
コード例 #30
0
 public LoanService(ILoanRepository repository)
 {
     this.repository = repository;
 }
コード例 #31
0
 public LoanController(ILoanRepository loanRepository, IRateRepository rateRepository)
 {
     _loanRepository = loanRepository;
     _rateRepository = rateRepository;
 }
コード例 #32
0
 public LoanService(ILoanRepository loanRepository, IUserService userService)
 {
     _loanRepository = loanRepository;
     _userService    = userService;
 }
コード例 #33
0
 public LoanService(ILoanRepository loanRepository, IService <Client, long> clientService)
 {
     _loanRepository = loanRepository;
     _clientService  = clientService;
 }