示例#1
0
        public ActionResult RouletteData(Dictionary <string, string> queryvalues)
        {
            int    _Channels       = queryvalues.ContainsKey("Channels") ? Convert.ToInt32(queryvalues["Channels"]) : 0;
            int    _page           = queryvalues.ContainsKey("page") ? Convert.ToInt32(queryvalues["page"]) : 1;
            string _StartDate      = queryvalues.ContainsKey("StartDate") ? queryvalues["StartDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
            string _ExpirationDate = queryvalues.ContainsKey("ExpirationDate") ? queryvalues["ExpirationDate"] : DateTime.Now.AddDays(1).ToString("yyyy-MM-dd 00:00:00");
            string _target         = queryvalues.ContainsKey("target") ? queryvalues["target"] : "";
            int    _pageGroup      = queryvalues.ContainsKey("pageGroup") ? Convert.ToInt32(queryvalues["pageGroup"]) : 1;

            BaseDataView vbd = new BaseDataView {
                StartDate = _StartDate, ExpirationDate = _ExpirationDate, Channels = _Channels, Page = _page
            };
            PagedList <Roulette> pa = new PagedList <Roulette>(BaseDataBLL.GetRouletteData(vbd), _pageGroup, 10);

            vbd.BaseDataList      = pa;
            ViewData["dataGroup"] = vbd.BaseDataList;

            return(View(vbd));
        }