Beispiel #1
0
        public ActionResult QQZoneRechargeDetail(Dictionary <string, string> queryvalues)
        {
            int    _Channels  = queryvalues.ContainsKey("Channels") ? Convert.ToInt32(queryvalues["Channels"]) : 0;                             //渠道id
            string _StartDate = queryvalues.ContainsKey("StartDate") ? queryvalues["StartDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00"); //时间
                                                                                                                                                //select * from 515game.Role where CreateTime  between '2016-1-5' and '2016-1-6' and Agent=if(a=0,Agent,a) ;
            string type = queryvalues.ContainsKey("type") ? queryvalues["type"] : "";
            //AllCount
            string _allCount = queryvalues.ContainsKey("AllCount") ? queryvalues["AllCount"] : "";

            var      arr = _StartDate.Split('-');
            DateTime dts = new DateTime(Convert.ToInt32(arr[0]), Convert.ToInt32(arr[1]), Convert.ToInt32(_StartDate.Substring(8, 2)), 0, 0, 0);
            DateTime dte = dts.AddDays(1);

            BaseDataView vbd = new BaseDataView {
                StartDate = _StartDate, ExpirationDate = dte.ToString("yyyy-MM-dd 00:00:00"), Channels = _Channels
            };

            IEnumerable <QQZoneRechargeCountDetail> detail = new List <QQZoneRechargeCountDetail>();

            switch (type)
            {
            case "1":
                detail = BaseDataBLL.GetQQZoneRechargeFirstChargeDetail(vbd);
                ViewData["AllCount"] = "首次充值人数[" + _allCount + "]";
                break;

            case "2":
                detail = BaseDataBLL.GetQQZoneRechargeReChargeDetail(vbd);
                ViewData["AllCount"] = "再次付费人数[" + _allCount + "]";
                break;

            case "3":
                detail = BaseDataBLL.GetQQZoneRechargeCurReChaDetail(vbd);
                ViewData["AllCount"] = "当日注册且充值玩家[" + _allCount + "]";
                break;

            case "4":
                detail = BaseDataBLL.GetQQZoneRechargeAllReChaDetail(vbd);
                ViewData["AllCount"] = "总充值人数[" + _allCount + "]";
                break;

            default:
                break;
            }


            return(View(detail));
        }