Пример #1
0
        //
        // GET: /DailyText/
        public ActionResult Index()
        {
            var model = _dailyTextManager.GetTodaysText();
            var viewModel = new DailyTextViewModel
                {
                    DateLine = model.DateLine,
                    Header = model.Header,
                    Body = model.Body
                };

            return View(viewModel);
        }
Пример #2
0
        public JsonResult Json()
        {
            var model = _dailyTextManager.GetTodaysText();
            var viewModel = new DailyTextViewModel
            {
                DateLine = model.DateLine,
                Header = model.Header,
                Body = model.Body
            };

            return Json(viewModel, JsonRequestBehavior.AllowGet);
        }
Пример #3
0
        public ActionResult Article(Guid id)
        {
            var model = _dailyTextManager.GetText(id);
            var viewModel = new DailyTextViewModel
            {
                DateLine = model.DateLine,
                Header = model.Header,
                Body = model.Body
            };

            return View("Index",viewModel);
        }