예제 #1
0
        public ActionResult NewsEdit(int?ID)
        {
            if (!ID.HasValue)
            {
                return(RedirectToAction("NewsList"));
            }

            NewsDetailsDataModel model = new NewsDetailsDataModel();

            using (var module = new NewsModule())
            {
                model = module.DoGetDetailsByID((int)ID);
            }

            return(View(model));
        }
예제 #2
0
        public ActionResult Content(int?ID)
        {
            if (!ID.HasValue)
            {
                return(RedirectToAction("List"));
            }

            NewsDetailsDataModel model = new NewsDetailsDataModel();

            using (var module = new NewsModule())
            {
                model = module.DoGetDetailsByID((int)ID);
                if (model.Data == null)
                {
                    return(RedirectToAction("List"));
                }
                model.Data.CONTENT = HttpUtility.HtmlDecode(model.Data.CONTENT);
            }
            return(View(model));
        }