Beispiel #1
0
 public IActionResult Orders()
 {
     //on refresh once after logout
     if (HttpContext.Session.GetInt32("current_id") == null)
     {
         return(RedirectToAction("Index"));
     }
     if (TempData["errors"] != null)
     {
         ViewBag.errors = TempData["errors"];
     }
     ViewBag.User_one     = ecommFactory.CurrentUser((int)HttpContext.Session.GetInt32("current_id"));
     ViewBag.All_Users    = ecommFactory.AllUsers();
     ViewBag.All_products = productsFactory.Products();
     ViewBag.All_orders   = productsFactory.AllOrders();
     return(View("Orders"));
 }