Exemple #1
0
        public ActionResult Index(int?page)
        {
            var actives = siteService.GetActives().Where(m => m.StartDate <= date && m.EndDate >= date).ToList();

            var model = new Paginated <Active>(actives, page ?? 1, 10);

            return(View(model));
        }
Exemple #2
0
        //
        // GET: /Home/

        public ActionResult Index(int?page)
        {
            var actives = siteService.GetActives().ToList();
            var model   = new Paginated <Active>(actives, page ?? 1, 8);

            ViewBag.Photos = pictureService.GetPhotos().ToList();

            //var xml = XDocument.Load(Server.MapPath("~/XML.xml"));
            //XAttribute field;

            //field = (from m in xml.Descendants("visitor") select m.Attribute("value")).SingleOrDefault();
            //var result = (int.Parse(field.Value) + 1).ToString();
            //field.SetValue(result);
            //xml.Save(Server.MapPath("~/XML.xml"));

            new SysConfigHelper().AddVisit();

            ViewBag.Company = new SysConfigHelper().GetSysConfig();

            return(View(model));
        }