Beispiel #1
0
        public virtual ActionResult List(int pageIndex, FormCollection formCollection)
        {
            var filterValues         = formCollection.ConvertTypeByProperties(typeof(T));
            var routeValueDictionary = new RouteValueDictionary(filterValues)
            {
                { "pageIndex", 1 }
            };

            foreach (var key in routeValueDictionary.Keys.ToList())
            {
                var value = routeValueDictionary[key];
                if (value is DateTime || value is DateTime?)
                {
                    routeValueDictionary[key] = ((DateTime?)value).DefaultString();
                }
            }
            return(RedirectToAction("List", routeValueDictionary));
        }