public static bool Modificar(Facturas factura)
 {
     using (var context = new DAL.Respository <Entidades.Facturas>())
     {
         try
         {
             return(context.Modificar(factura));
         }
         catch (Exception)
         {
             throw;
         }
     }
 }
        public static bool Modificar(Entidades.Empleados empleado)
        {
            using (var conec = new DAL.Respository <Entidades.Empleados>())
            {
                try
                {
                    return(conec.Modificar(empleado));
                }
                catch (Exception)
                {
                    throw;
                }
            }

            return(false);
        }
        public static bool Modificar(Entidades.Retenciones retencion)
        {
            using (var conec = new DAL.Respository <Entidades.Retenciones>())
            {
                try
                {
                    return(conec.Modificar(retencion));
                }
                catch (Exception)
                {
                    throw;
                }
            }

            return(false);
        }
Example #4
0
        public static bool Modificar(Entidades.Productos producto)
        {
            using (var Context = new DAL.Respository <Entidades.Productos>())
            {
                try
                {
                    return(Context.Modificar(producto));
                }
                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;
         }
     }
 }