Ejemplo n.º 1
0
        // GET: Event
        public ActionResult Index()
        {
            EventViewModel  eventView  = new EventViewModel();
            ViewBannerModel viewBanner = _bannerDao.GetViewBanner();

            IList <Events> Events = _EventsDao.Get(1, 10);

            eventView.Events = Events;
            if (viewBanner != null && viewBanner.EventBanner != null && viewBanner.EventBanner.Count > 0)
            {
                eventView.EventBanner = viewBanner.EventBanner;
            }

            return(View(eventView));
        }
        public ActionResult Index()
        {
            HomeViewModel   homeView   = new HomeViewModel();
            ViewBannerModel viewBanner = _bannerDao.GetViewBanner();
            IList <Events>  events     = _EventsDao.Get(1, 10);

            if (viewBanner != null && viewBanner.HomeBanner != null && viewBanner.HomeBanner.Count > 0)
            {
                homeView.HomeBanners = viewBanner.HomeBanner;
            }
            if (events != null && events.Count > 0)
            {
                homeView.Events = events.Take(3).ToList();
            }
            TownMapPDF town = _ourTownDao.GetTownMapPDF();

            if (town != null && !string.IsNullOrEmpty(town.PDFFileGUID))
            {
                homeView.mapPDF = town;
            }
            List <OurMps> OurMps = _aboutUsDao.Get();

            if (OurMps != null && OurMps.Count > 0)
            {
                homeView.Mps = OurMps;
            }


            return(View(homeView));
        }
Ejemplo n.º 3
0
        // GET: Admin/Event
        public ActionResult Index()
        {
            IList <Events> Events = _EventsDao.Get(1, 10);

            return(View(Events));
        }