コード例 #1
0
 public decimal TotalIngresosEnCajaDeAhorro()
 {
     using (var context = new CCEntities()) {
         var ingresosDA = new IngresoDataAccess(context);
         return(ingresosDA.TotalIngresosEn(2));
     }
 }
コード例 #2
0
 public decimal TotalIngresosEnEfectivo()
 {
     using (var context = new CCEntities()) {
         var ingresosDA = new IngresoDataAccess(context);
         return(ingresosDA.TotalIngresosEn(1));
     }
 }
コード例 #3
0
 public IEnumerable <SelectListItem> GetSubcategoriaSelectionListByIdCategoria(int idCategoria)
 {
     using (var context = new CCEntities()) {
         var commonDA = new CommonDataAccess(context);
         return(commonDA.GetSubcategoriaSelectionListByIdCategoria(idCategoria));
     }
 }
コード例 #4
0
 public IEnumerable <IngresoListViewModel> GetIngresos(IngresoQuery query)
 {
     using (var context = new CCEntities()) {
         var ingresoDA = new IngresoDataAccess(context);
         return(ingresoDA.GetIngresos(query));
     }
 }
コード例 #5
0
 public decimal TotalGastosEnEfectivo()
 {
     using (var context = new CCEntities()) {
         var gastosDA = new GastoDataAccess(context);
         return(gastosDA.TotalGastosEn(1));
     }
 }
コード例 #6
0
 public IEnumerable <SelectListItem> GetMedioSelectionList()
 {
     using (var context = new CCEntities()) {
         var commonDA = new CommonDataAccess(context);
         return(commonDA.GetMedioSelectionList());
     }
 }
コード例 #7
0
 public decimal TotalGastosEnCajaDeAhorro()
 {
     using (var context = new CCEntities()) {
         var gastosDA = new GastoDataAccess(context);
         return(gastosDA.TotalGastosEn(2));
     }
 }
コード例 #8
0
 public IEnumerable <GastoListViewModel> GetGastos(GastoQuery query)
 {
     using (var context = new CCEntities()) {
         var gastosDA = new GastoDataAccess(context);
         return(gastosDA.GetGastos(query));
     }
 }
コード例 #9
0
 public Ingreso GetById(int id)
 {
     using (var context = new CCEntities()) {
         var ingresoDA = new IngresoDataAccess(context);
         var ingreso   = ingresoDA.GetById(id);
         return(ingreso);
     }
 }
コード例 #10
0
 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();
     }
 }
コード例 #11
0
 public CategoriaGasto GetCategoriaByIdSubcategoria(int idSubcategoria)
 {
     using (var context = new CCEntities()) {
         var gastoDA   = new GastoDataAccess(context);
         var categoria = gastoDA.GetCategoriaByIdSubcategoria(idSubcategoria);
         return(categoria);
     }
 }
コード例 #12
0
 public Gasto GetById(int id)
 {
     using (var context = new CCEntities()) {
         var gastoDA = new GastoDataAccess(context);
         var gasto   = gastoDA.GetById(id);
         return(gasto);
     }
 }
コード例 #13
0
        public void Update(Ingreso entity)
        {
            using (var context = new CCEntities()) {
                context.Entry(entity).State = EntityState.Modified;
                context.SaveChanges();

                return;
            }
        }
コード例 #14
0
        public int Add(Ingreso entity)
        {
            using (var context = new CCEntities()) {
                context.Ingreso.Add(entity);
                context.SaveChanges();

                return(entity.IdIngreso);
            }
        }
コード例 #15
0
        public int Add(Gasto entity)
        {
            using (var context = new CCEntities()) {
                context.Gasto.Add(entity);
                context.SaveChanges();

                return(entity.IdGasto);
            }
        }