コード例 #1
0
        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();
        }
コード例 #2
0
        public ActionResult Orders()
        {
            Customer cust = new Customer();
            cust.GetFromStorage();
            cust.BindOrders();

            ViewBag.cust = cust;
            return View();
        }