Пример #1
0
        public ActionResult DecorateNewsDetail(int newsID)
        {
            webnewsservice.PageViewAdd(newsID);
            WebNews webnew = webnewsservice.GetWebNewsByID(newsID);

            return(View(webnew));
        }
Пример #2
0
        public ActionResult GLdetail(int id = 0)
        {
            WebNews news = new WebNews();

            if (id != 0)
            {
                news = newSer.GetWebNewsByID(id);
            }
            return(View(news));
        }
        public ActionResult AddOrEditWebNews(int newsID)
        {
            IWebNews newsService = new WebNewsService();
            WebNews  news        = newsService.GetWebNewsByID(newsID);

            if (news == null)
            {
                news = new WebNews();
            }
            List <WebMenu> menuList = webMenuService.GetWebMenuList();
            IEnumerable <SelectListItem> parentMenus = menuList.Select(m => new SelectListItem {
                Value = m.WebMenuID.ToString(), Text = m.WebMenuName
            });

            ViewBag.ParentMenus = parentMenus;
            return(View(news));
        }