public async Task<ActionResult> Orders() { HttpContext ctx = System.Web.HttpContext.Current; var pcats = CURTAPI.GetParentCategoriesAsync(); await Task.WhenAll(new Task[] { pcats }); ViewBag.parent_cats = await pcats; Customer cust = new Customer(); cust.GetFromStorage(ctx); if (!cust.LoggedIn(ctx)) { return RedirectToAction("Index", "Authenticate"); } cust.BindOrders(); ViewBag.cust = cust; return View(); }
public ActionResult Orders() { Customer cust = new Customer(); cust.GetFromStorage(); cust.BindOrders(); ViewBag.cust = cust; return View(); }