예제 #1
0
        public ActionResult PoiPartial()
        {
            List<PoiPM> poipms = new List<PoiPM>();
            List<Poi> pois = bs.GetPoiList();
            foreach (Poi poi in pois)
            {
                PoiPM pm = new PoiPM()
                {
                    poi = poi
                };
                pm.Activiteiten = bs.getActiviteitenByPoiByUser50from(0, User.Identity.Name, poi.ID);
                poipms.Add(pm);

            }
            return PartialView("_PoiPartial", JsonConvert.SerializeObject(poipms));
        }
예제 #2
0
        public ActionResult Poi(int? Id)
        {
            if (!Id.HasValue) return RedirectToAction("Index");
            Poi poi = bs.GetPoiById((int)Id);
            if (poi == null) return RedirectToAction("Index");
            List<Poi> pois = bs.GetPoiList();

            PoiPM pm = new PoiPM()
            {
                poi = poi
            };
            pm.Activiteiten = bs.getActiviteitenByPoiByUser50from(0, User.Identity.Name, poi.ID);
            ViewBag.gebruikerId = bs.GetUser(User.Identity.Name).Id;

            Session.Remove("stap3");
            Session["stap2"] = poi.Naam;
            Session["url2"] = "../home/Poi?id=" + poi.ID;
            ViewBag.stap1 = Session["stap1"];
            ViewBag.url1 = Session["url1"];
            ViewBag.stap2 = Session["stap2"];
            ViewBag.url2 = Session["url2"];
            return View(pm);
        }