public async Task <IActionResult> ConfirmarOrden(int customerID , DateTime orderDate, string orderNumber) { Order cabecera = new Order(); cabecera.CustomerId = customerID; cabecera.OrderDate = orderDate; cabecera.OrderNumber = orderNumber; List <OrderItem> detalle = new List <OrderItem>(); var productos = HttpContext.Session.GetString("listaProducto"); detalle = JsonConvert.DeserializeObject <List <OrderItem> >(productos); bool exito = await DAOrder.Insertar(cabecera, detalle); return(Json(exito)); }
public async Task <IActionResult> ListadoOrdenes() { ViewBag.Listado = await DAOrder.listadoAsync(); return(PartialView()); }