public decimal TotalIngresosEnCajaDeAhorro() { using (var context = new CCEntities()) { var ingresosDA = new IngresoDataAccess(context); return(ingresosDA.TotalIngresosEn(2)); } }
public decimal TotalIngresosEnEfectivo() { using (var context = new CCEntities()) { var ingresosDA = new IngresoDataAccess(context); return(ingresosDA.TotalIngresosEn(1)); } }
public IEnumerable <SelectListItem> GetSubcategoriaSelectionListByIdCategoria(int idCategoria) { using (var context = new CCEntities()) { var commonDA = new CommonDataAccess(context); return(commonDA.GetSubcategoriaSelectionListByIdCategoria(idCategoria)); } }
public IEnumerable <IngresoListViewModel> GetIngresos(IngresoQuery query) { using (var context = new CCEntities()) { var ingresoDA = new IngresoDataAccess(context); return(ingresoDA.GetIngresos(query)); } }
public decimal TotalGastosEnEfectivo() { using (var context = new CCEntities()) { var gastosDA = new GastoDataAccess(context); return(gastosDA.TotalGastosEn(1)); } }
public IEnumerable <SelectListItem> GetMedioSelectionList() { using (var context = new CCEntities()) { var commonDA = new CommonDataAccess(context); return(commonDA.GetMedioSelectionList()); } }
public decimal TotalGastosEnCajaDeAhorro() { using (var context = new CCEntities()) { var gastosDA = new GastoDataAccess(context); return(gastosDA.TotalGastosEn(2)); } }
public IEnumerable <GastoListViewModel> GetGastos(GastoQuery query) { using (var context = new CCEntities()) { var gastosDA = new GastoDataAccess(context); return(gastosDA.GetGastos(query)); } }
public Ingreso GetById(int id) { using (var context = new CCEntities()) { var ingresoDA = new IngresoDataAccess(context); var ingreso = ingresoDA.GetById(id); return(ingreso); } }
public void Delete(int id) { using (var context = new CCEntities()) { var entity = context.Set <Ingreso>().FirstOrDefault(x => x.IdIngreso == id); context.Ingreso.Remove(entity); context.SaveChanges(); } }
public CategoriaGasto GetCategoriaByIdSubcategoria(int idSubcategoria) { using (var context = new CCEntities()) { var gastoDA = new GastoDataAccess(context); var categoria = gastoDA.GetCategoriaByIdSubcategoria(idSubcategoria); return(categoria); } }
public Gasto GetById(int id) { using (var context = new CCEntities()) { var gastoDA = new GastoDataAccess(context); var gasto = gastoDA.GetById(id); return(gasto); } }
public void Update(Ingreso entity) { using (var context = new CCEntities()) { context.Entry(entity).State = EntityState.Modified; context.SaveChanges(); return; } }
public int Add(Ingreso entity) { using (var context = new CCEntities()) { context.Ingreso.Add(entity); context.SaveChanges(); return(entity.IdIngreso); } }
public int Add(Gasto entity) { using (var context = new CCEntities()) { context.Gasto.Add(entity); context.SaveChanges(); return(entity.IdGasto); } }