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); } }
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); } }
public OrdenCompra(Carrito carr,User client) { this._items = carr.DameFuego(); this._Cliente = client; this._estado = "PENDIENTE"; }