Ejemplo n.º 1
0
        //
        // GET: /Announcement/


        public ActionResult Index()
        {
            var announcementRepository = new AnnouncementRepository();
            var activeAnnouncements    = announcementRepository.GetActiveAnnouncements().ToList();

            return(View(activeAnnouncements));
        }
Ejemplo n.º 2
0
        public ViewResult Index()
        {
            EventRepository        eventRepository        = new EventRepository();
            PhotoRepository        photoRepository        = new PhotoRepository();
            AnnouncementRepository announcementRepository = new AnnouncementRepository();

            var homeModel = new HomeModel()
            {
                LatestAnnouncements      = announcementRepository.GetLatestAnnouncements(4).ToList(),
                ActiveAnnouncementsCount = announcementRepository.GetActiveAnnouncements().Count(),
                LatestEvents             = eventRepository.GetLatestEvents(6).ToList(),
                LatestNews   = eventRepository.GetLatestNews(3).ToList(),
                latestPhotos = photoRepository.GetCategoryImages(38)
            };

            //   ViewBag.FullUrl = Util.GetApplicationFullUrlWithoutLastSlash();

            return(View(homeModel));
        }