// GET: Bestilling public ActionResult BestillingListe() { var bestillingDb = new BestillingBLL(); List <Bestilling> alleBestillinger = bestillingDb.hentAlleBestillinger(); return(View(alleBestillinger)); }
// GET: Bestilling public ActionResult BestillingListe() { var bestillingDb = new BestillingBLL(); List <Bestilling> alleBestillinger = bestillingDb.hentAlleBestillinger(); if (Session["Innlogget"] == null) { Session["Innlogget"] = false; ViewBag.Innlogget = false; } else { ViewBag.Innlogget = (bool)Session["Innlogget"]; bool ok = (bool)Session["Innlogget"]; if (ok) { return(View(alleBestillinger)); } } return(RedirectToAction("Home")); }