Beispiel #1
0
        public ActionResult kundeListe()
        {
            var          kundeDb    = new VareBLL();
            List <Kunde> alleKunder = kundeDb.hentAlle();

            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(alleKunder));
                }
            }
            return(RedirectToAction("Home"));
        }