Пример #1
0
 public int GenerarOrden(Carrito carrito, User usuario)
 {
     try
     {
         if (carrito.DameFuego().Count > 0)
         {
             //throw new Exception("The method or operation is not implemented.");
             _orden = new OrdenCompra(carrito, usuario);
         }
         return(miDAO.grabarCompra(_orden));
     }
     catch (Exception ex)
     {
         throw new ArgumentException("Error Generando orden", ex);
     }
 }
Пример #2
0
        public int GenerarOrden(Carrito carrito,User usuario)
        {
            try
            {
                if (carrito.DameFuego().Count > 0)
                {
                    //throw new Exception("The method or operation is not implemented.");
                    _orden = new OrdenCompra(carrito, usuario);

                }
                return miDAO.grabarCompra(_orden);
            }
            catch (Exception ex)
            {
                throw new ArgumentException("Error Generando orden",ex);
            }
        }
Пример #3
0
 public OrdenCompra(Carrito carr,User client)
 {
     this._items = carr.DameFuego();
     this._Cliente = client;
     this._estado = "PENDIENTE";
 }