// GET: Caja public ActionResult VerOrdenesSinPago() { _token = Session["Token"].ToString(); if (string.IsNullOrEmpty(_token)) { RedirectToAction("Index", "Home"); } var ordenes = new OrdenHeader { Token = _token }; ViewData["Ordenes"] = ordenes.Obtenerordenes().Where(o => o.estado == EstadoOrden.NoPagado).ToList(); return(View()); }
public void ListarOdenes() { ObtenerToken("ADMINISTRADOR", "ASDF"); var orden = new OrdenHeader() { Token = _token }; var ordenes = orden.Obtenerordenes(); foreach (var o in ordenes) { o.CalcularTotal(); } Assert.IsNotNull(ordenes); }
// GET: Orden public ActionResult VerOrdenes() { _token = Session["Token"].ToString(); if (string.IsNullOrEmpty(_token)) { RedirectToAction("Index", "Home"); } var orden = new OrdenHeader { Token = _token }; var data = orden.Obtenerordenes().OrderByDescending(o => o.id).ToList(); foreach (var o in data) { o.CalcularTotal(); } ViewData["Ordenes"] = data; return(View()); }