示例#1
0
        /// <summary>
        /// Gets Creates the view for approving or denying all the pending news
        /// </summary>
        /// <returns></returns>
        public ActionResult PendingNews(string currentFilter, string searchString, int?page)
        {
            if (searchString != null)
            {
                page = 1;
            }
            else
            {
                searchString = currentFilter;
            }

            //filtering in the future...
            //ViewBag.CurrentFilter = searchString;

            ViewBag.NavTag = "Pending News";

            int pageSize   = 5;
            int pageNumber = (page ?? 1);

            var news = SQLUtilities.GetPendingNews();

            return(View(news.ToPagedList(pageNumber, pageSize)));
        }