Esempio n. 1
0
        public ActionResult Details(int?id, int?boekId)
        {
            if (!id.HasValue)
            {
                return(RedirectToAction("Index", "Home"));
            }



            Activiteit activ = bs.GetActiviteitById((int)id);

            Session["stap3"] = activ.Naam;
            Session["url3"]  = "../Activiteiten/Details/" + activ.Id;
            ViewBag.stap1    = Session["stap1"];
            ViewBag.url1     = Session["url1"];
            ViewBag.stap2    = Session["stap2"];
            ViewBag.url2     = Session["url2"];
            ViewBag.stap3    = Session["stap3"];
            ViewBag.url3     = Session["url3"];

            ViewBag.boekId = boekId;
            return(View(activ));
        }
Esempio n. 2
0
        public ActionResult Activiteit(int?Id, int?boekId)
        {
            if (!Id.HasValue)
            {
                return(RedirectToAction("Index"));
            }
            Activiteit activiteit = bs.GetActiviteitById((int)Id);

            if (activiteit == null)
            {
                return(RedirectToAction("Index"));
            }
            if (!bs.IsActivityAccessibleByUser((int)Id, User.Identity.Name))
            {
                return(RedirectToAction("Index"));
            }
            ViewBag.boekId = boekId;
            return(View(activiteit));
        }