コード例 #1
0
        public ActionResult Index()
        {
            EventsModel Model = new EventsModel()
            {
                UserNews = NewsroomService.GetNews(),
                UserJobs = UserJobPostingservice.GetJobs().ToList().Take(6),

                DisplayHome = EventServices.GetEventsforHome()
            };

            return(View(Model));
        }
コード例 #2
0
        public ActionResult News(int id)
        {
            var           Data  = NewsroomService.Get(id);
            NewsRoomModel Model = new NewsRoomModel()
            {
                Description = Data.Description,
                Title       = Data.Title,
                NewsId      = Data.NewRoomId,
                Image       = Data.Image,
                PostedOn    = Data.CreatedOn
            };

            return(View(Model));
        }
コード例 #3
0
        public ActionResult Index()
        {
            if (Session["UserId"] != null)
            {
                Session.Remove("UserId");
                return(RedirectToAction("Index", "Home", new { area = "" }));
            }
            EventsModel Model = new EventsModel()
            {
                UserNews    = NewsroomService.GetNews(),
                UserJobs    = UserJobPostingservice.GetJobs().ToList().Take(6),
                DisplayHome = EventServices.GetEventsforHome(),
                Activities  = GenericMethodsservices.GetActivities()
            };

            return(View(Model));
        }
コード例 #4
0
        public JsonResult GetNews()
        {
            var Data = NewsroomService.GetNews();

            return(Json(Data, JsonRequestBehavior.AllowGet));
        }