示例#1
0
        public SpendType GetById(int SpendTypeId)
        {
            var Spend = SpendTypeRepository.GetById(SpendTypeId);

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

            return(Spend);
        }
示例#2
0
        private void CreateTransactionTypeRows()
        {
            var paymentTypeId = paymentTypeRepository.Add(PAYMENTTYPE_TOADD);
            var fundTypeId    = fundTypeRepository.Add(FUNDTYPE_TOADD);
            var budgetTypeId  = budgetTypeRepository.Add(BUDGETTYPE_TOADD);
            var spendTypeId   = spendTypeRepository.Add(SPENDTYPE_TOADD);

            PAYMENTTYPE = paymentTypeRepository.GetById(paymentTypeId);
            BUDGETTYPE  = budgetTypeRepository.GetById(budgetTypeId);
            FUNDTYPE    = fundTypeRepository.GetById(fundTypeId);
            SPENDTYPE   = spendTypeRepository.GetById(spendTypeId);
        }