コード例 #1
0
        public ActionResult Boek(int?Id)
        {
            //activities zitten er in
            if (!Id.HasValue)
            {
                return(RedirectToAction("Index"));
            }
            Boek boek = bs.GetBoekByID((int)Id);

            if (boek == null)
            {
                return(RedirectToAction("Index"));
            }
            if (!bs.IsBoekAccessibleByUser((int)Id, User.Identity.Name))
            {
                return(RedirectToAction("Index"));
            }
            boek.Routes       = bs.getRoutesByBoek((int)Id);
            boek.Activiteiten = bs.GetSharedActivitiesByBookId(boek.Id, User.Identity.Name);
            Session.Remove("stap3");
            Session["stap2"] = boek.Naam;
            Session["url2"]  = "../home/Boek?id=" + boek.Id;
            ViewBag.stap1    = Session["stap1"];
            ViewBag.url1     = Session["url1"];
            ViewBag.stap2    = Session["stap2"];
            ViewBag.url2     = Session["url2"];


            return(View(boek));
        }