Пример #1
0
        public SpendType GetById(int SpendTypeId)
        {
            var Spend = SpendTypeRepository.GetById(SpendTypeId);

            if (Spend == null)
            {
                throw new BadRequestException(ErrorMessages.GastoNoEncontrado);
            }

            return(Spend);
        }
Пример #2
0
        public void Setup(IRepository <Payment> paymentRepository,
                          PaymentTypeRepository paymentTypeRepository,
                          BudgetTypeRepository budgetTypeRepository,
                          FundTypeRepository fundTypeRepository,
                          SpendTypeRepository spendTypeRepository
                          )
        {
            this.paymentRepository     = paymentRepository;
            this.paymentTypeRepository = paymentTypeRepository;
            this.fundTypeRepository    = fundTypeRepository;
            this.budgetTypeRepository  = budgetTypeRepository;
            this.spendTypeRepository   = spendTypeRepository;

            InitialiseParameters();

            CreateTransactionTypeRows();
        }
Пример #3
0
 public SpendType UpdateSpendType(SpendType originalSpend, SpendTypeRequest Spend)
 {
     this.MergeSpendType(originalSpend, Spend);
     SpendTypeRepository.Update(originalSpend);
     return(originalSpend);
 }
Пример #4
0
 public IList <SpendType> GetAll()
 {
     return(SpendTypeRepository.GetAll().ToList());
 }
Пример #5
0
 public IList <SpendType> GetByConsortiumId(int ConsortiumId)
 {
     return(SpendTypeRepository.GetByConsortiumId(ConsortiumId).ToList());
 }