public SpendType GetById(int SpendTypeId) { var Spend = SpendTypeRepository.GetById(SpendTypeId); if (Spend == null) { throw new BadRequestException(ErrorMessages.GastoNoEncontrado); } return(Spend); }
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(); }
public SpendType UpdateSpendType(SpendType originalSpend, SpendTypeRequest Spend) { this.MergeSpendType(originalSpend, Spend); SpendTypeRepository.Update(originalSpend); return(originalSpend); }
public IList <SpendType> GetAll() { return(SpendTypeRepository.GetAll().ToList()); }
public IList <SpendType> GetByConsortiumId(int ConsortiumId) { return(SpendTypeRepository.GetByConsortiumId(ConsortiumId).ToList()); }