private void BindData()
        {
            string beginDate = Utils.GetNowBeginDateStr(); //业务开始日期
            string endDate   = Utils.GetNowEndDateStr();   //业务截止日期

            ICountDataService countDataService = IoC.Resolve <ICountDataService>();
            var result = countDataService.GetCountData(beginDate, endDate);

            if (result == null)
            {
                return;
            }
            //盈亏统计
//            result.yesterDayData

            //统计
            this.mUserData = result.userData;
            if (this.mUserData == null)
            {
                mUserData = new UserData();
            }

            //rptList.DataSource = result.playTypeRadioDataList;//玩法
            //rptList.DataSource = result.lotteryDataList;//彩种
            //rptList.DataBind();

            //彩票投注金额
            rptlotteryType.DataSource = result.lotteryTypeDataList.OrderByDescending(x => x.BetMoney);//彩票投注
            rptlotteryType.DataBind();

            //树图
            //mStatDataStr
            StringBuilder builder = new StringBuilder();

            foreach (var item in result.toDayData)
            {
                string period = item.OccDate;
                builder.Append("{");
                builder.AppendFormat("period:'{0}',yk: {1},tz:{2}", period, item.ProfitAndLossMoney, item.BetMoney);
                builder.Append("},");
            }
            mStatDataStr = builder.ToString();
            if (mStatDataStr.EndsWith(","))
            {
                mStatDataStr = "{data:[" + mStatDataStr.Substring(0, mStatDataStr.Length - 1) + "]}";
            }

            BindYingKuiStat();//盈亏报表
        }
Exemple #2
0
        private void BindResult()
        {
            string beginDate = this.txtBeginDate.Text.Trim(); //业务开始日期
            string endDate   = this.txtEndDate.Text.Trim();   //业务截止日期

            ICountDataService countDataService = IoC.Resolve <ICountDataService>();
            var result = countDataService.GetCountData(beginDate, endDate);

            if (result != null)
            {
                var res = result.lotteryDataList.Where(x => x.LotteryCode == this.txtLotteryId.Value).FirstOrDefault();
                if (null == res || res.playTypeRadioDataList == null)
                {
                    return;
                }
                this.rptList1.DataSource = res.playTypeRadioDataList;
                this.rptList1.DataBind();
            }
        }