Exemplo n.º 1
0
        /// <summary>
        /// Gets Creates the view for approving or denying all the pending events
        /// </summary>
        /// <param name="currentFilter">The currentFilter<see cref="string"/></param>
        /// <param name="searchString">The searchString<see cref="string"/></param>
        /// <param name="page">The page<see cref="int?"/></param>
        /// <returns></returns>
        public ActionResult PendingEvents(string currentFilter, string searchString, int?page)
        {
            if (searchString != null)
            {
                page = 1;
            }
            else
            {
                searchString = currentFilter;
            }

            ViewBag.NavTag = "Pending Events";

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

            var events = SQLUtilities.GetPendingEvents();

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