예제 #1
0
        public ActionResult About()
        {
            ViewBag.Message     = "Your application description page.";
            ViewBag.ContentNews = _cmsNewsService.GetCMSNewsById(OnlineStore.Infractructure.Utility.Define.ID_PAGE_INTRODUCTION).ContentNews;

            return(View());
        }
예제 #2
0
        // GET: /Admin/CMSNews/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var news = _cmsNewsService.GetCMSNewsById(id);

            if (news == null)
            {
                return(HttpNotFound());
            }

            ViewBag.AvailableCategories = PrepareAllCategoriesModel(id.Value);
            PopulateStatusDropDownList((OnlineStore.Infractructure.Utility.Define.Status)news.Status);
            return(View(news));
        }
예제 #3
0
        // GET: /News/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var news = _cmsNewsService.GetCMSNewsById(id);

            if (news == null)
            {
                return(HttpNotFound());
            }

            //Increase count view
            _cmsNewsService.UpdateCMSNewsCountView(id);

            PopulateCMSChildCategoriesByParentId(news.CategoryId);
            PopulateRecentNews();
            PopulateRelatedNews(id.Value);
            ViewBag.CategoryTitle = news.CategoryTitle;

            return(View(news));
        }
예제 #4
0
        public ActionResult NewDetail(int id)
        {
            var model = _cmsNewsService.GetCMSNewsById(id);

            return(View(model));
        }