public bool PedidoListo(int id)
 {
     try
     {
         PEDIDO pe = conexion.Entidad.PEDIDO
                     .First(p => p.ID == id);
         pe.ESTADO_ID = 4;
         conexion.Entidad.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
         return(false);
     }
 }
Exemple #2
0
        public PEDIDO obtener(int id)
        {
            var pedido = new PEDIDO();

            try
            {
                using (var db = new db_ventas())
                {
                    pedido = db.PEDIDO.Include("DETALLE_PEDIDO")
                             .Where(x => x.IDPEDIDO == id)
                             .SingleOrDefault();
                }
            }
            catch (Exception ex)
            {
                throw;
            }

            return(pedido);
        }