Example #1
0
        public static bool Guardar(Entidades.EmpleadosRetenciones relacion)
        {
            using (var conec = new DAL.Respository <Entidades.EmpleadosRetenciones>())
            {
                try
                {
                    return(conec.Guardar(relacion));
                }
                catch (Exception)
                {
                    throw;
                }
            }

            return(false);
        }
Example #2
0
        public static bool Guardar(Entidades.Productos producto)
        {
            using (var Context = new DAL.Respository <Entidades.Productos>())
            {
                try
                {
                    return(Context.Guardar(producto));
                }
                catch (Exception)
                {
                    throw;
                }
            }

            return(false);
        }
Example #3
0
        public static bool Guardar(Entidades.Facturas factura)
        {
            using (var Context = new DAL.Respository <Entidades.Facturas>())
            {
                try
                {
                    return(Context.Guardar(factura));
                }
                catch (Exception)
                {
                    throw;
                }
            }

            return(false);
        }
 public static bool Guardar(Productos producto)
 {
     using (var context = new DAL.Respository <Entidades.Productos>())
     {
         try
         {
             if (Buscar(p => p.ProductoId == producto.ProductoId) == null)
             {
                 return(context.Guardar(producto));
             }
             else
             {
                 return(context.Modificar(producto));
             }
         }
         catch (Exception)
         {
             throw;
         }
     }
 }
 public static bool Guardar(Facturas factura)
 {
     using (var context = new DAL.Respository <Entidades.Facturas>())
     {
         try
         {
             if (Buscar(p => p.FacturaId == factura.FacturaId) == null)
             {
                 return(context.Guardar(factura));
             }
             else
             {
                 return(context.Modificar(factura));
             }
         }
         catch (Exception)
         {
             throw;
         }
     }
 }