コード例 #1
0
        public ActionResult News()
        {
            NewsRoomModel Model = new NewsRoomModel()
            {
                GetNews = NewsRoomService.GetNewsRooms(1)
            };

            return View(Model);
        }
コード例 #2
0
 public JsonResult Edit(int Id)
 {
     var Data = NewsRoomService.Get(Id);
     NewsRoomModel Model = new NewsRoomModel()
     {
         Description = Data.Description,
         Title = Data.Title,
         NewsId = Data.NewRoomId
     };
     return Json(Model, JsonRequestBehavior.AllowGet);
 }
コード例 #3
0
        public ActionResult SingleNews(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);
        }