示例#1
0
        private void ajaxLotteryTime23()
        {
            string text  = base.q("lid");
            string text2 = "{\"name\": \"名称\",\"lotteryid\": \"彩种类别\",\"ordertime\": \"倒计时\",\"closetime\": \"封单时间\",\"nestsn\": \"下期期号\",\"cursn\": \"当前期号\",\"curnumber\": \"开奖号码\"}";

            text2 = text2.Replace("名称", LotteryUtils.LotteryTitle(Convert.ToInt32(text))).Replace("彩种类别", text);
            DateTime now      = DateTime.Now;
            DateTime dateTime = base.GetDateTime();
            string   text3    = dateTime.ToString("yyyyMMdd");
            string   text4    = dateTime.ToString("HH:mm:ss");
            string   text5    = dateTime.ToString("yyyy-MM-dd");

            this.doh.Reset();
            this.doh.SqlCmd = "select dbo.f_GetCloseTime(" + text + ") as closetime";
            DataTable dataTable = this.doh.GetDataTable();

            text2 = text2.Replace("封单时间", dataTable.Rows[0]["closetime"].ToString());
            TimeSpan timeSpan = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " 23:59:59") - DateTime.Now;
            string   newValue = string.Concat(timeSpan.Days * 24 * 60 * 60 + timeSpan.Hours * 60 * 60 + timeSpan.Minutes * 60 + timeSpan.Seconds);

            text2 = text2.Replace("倒计时", newValue);
            this.doh.Reset();
            this.doh.SqlCmd = "SELECT TOP 1 [Title],[Number] FROM [Sys_LotteryData] with(nolock) where UserId=" + this.AdminId + " order by Id desc";
            DataTable dataTable2 = this.doh.GetDataTable();

            if (dataTable2.Rows.Count > 0)
            {
                string  newValue2 = (dataTable2.Rows.Count > 0) ? dataTable2.Rows[0]["title"].ToString() : "您还未投注";
                decimal t         = Convert.ToDecimal(dataTable2.Rows[0]["title"].ToString());

                string newValue3 = (dataTable2.Rows.Count > 0) ? string.Concat(++t) : (DateTime.Now.ToString("yyyyMMdd") + "00001");
                text2 = text2.Replace("下期期号", newValue3).Replace("当前期号", newValue2);
                string[] array = dataTable2.Rows[0]["Number"].ToString().Split(new char[]
                {
                    ','
                });
                string text6 = "<p class='hm'>";
                for (int i = 0; i < array.Length; i++)
                {
                    text6 = text6 + "<span>" + array[i] + "</span>";
                }
                text6 += "</p>";
                text2  = text2.Replace("开奖号码", text6);
            }
            else
            {
                string newValue2 = "您还未投注";
                string newValue3 = DateTime.Now.ToString("yyyyMMdd") + "00001";
                text2 = text2.Replace("下期期号", newValue3).Replace("当前期号", newValue2);
                string text6 = "<p class='hm'>";
                text6 += "请您先投注";
                text6 += "</p>";
                text2  = text2.Replace("开奖号码", text6);
            }
            this._response = text2;
        }
        private void ajaxGetListPlay()
        {
            string str1 = this.q("lid");
            string str2 = this.q("d1");
            string str3 = this.q("d2");
            string str4 = this.q("u");
            int    num1 = this.Int_ThisPage();
            int    num2 = this.Str2Int(this.q("pagesize"), 20);

            this.Str2Int(this.q("flag"), 0);
            if (str2.Trim().Length == 0)
            {
                str2 = Convert.ToDateTime(this.StartTime).ToString("yyyy-MM-dd");
            }
            if (str3.Trim().Length == 0)
            {
                DateTime dateTime = Convert.ToDateTime(this.EndTime);
                dateTime = dateTime.AddDays(1.0);
                str3     = dateTime.ToString("yyyy-MM-dd");
            }
            if (Convert.ToDateTime(str2) > Convert.ToDateTime(str3))
            {
                str2 = str3;
            }
            string str5     = "";
            string whereStr = "STime2 >='" + str2 + "' and STime2 <'" + str3 + "' and state>1";

            if (!string.IsNullOrEmpty(str1))
            {
                whereStr = whereStr + " and LotteryId = " + str1;
            }
            if (!string.IsNullOrEmpty(str4))
            {
                whereStr = whereStr + " and Title = '" + str4 + "'";
            }
            this.doh.Reset();
            this.doh.SqlCmd = "select PlayId FROM [N_UserBet] where " + whereStr + " group by PlayId";
            int    count = this.doh.GetDataTable().Rows.Count;
            string str6  = !string.IsNullOrEmpty(str1) ? LotteryUtils.LotteryTitle(Convert.ToInt32(str1)) : "全部游戏";
            string str7  = str5 + " SELECT '99999' as rowNember,'-1' as [LotteryId],'全部合计' as [LotteryName],'999' as PlayId,'' as Title,\r\n            cast(round(isnull(sum(Total*Times),0),4) as numeric(18,4)) as Bet ,isnull(sum(WinBonus),0) as Win,\r\n            isnull(sum(num),0) as Num,isnull(sum(winnum),0) as WinNum,\r\n            cast(round(CONVERT(float,isnull(sum(WinBonus),0))*100/CONVERT(float,isnull(sum(Total*Times),1)) ,4) as numeric(9,4)) as Per,\r\n            isnull(sum(PointMoney),0) as Point,isnull(sum(-RealGet),0) as total FROM [N_UserBet] where " + whereStr + " union all " + SqlHelp.GetSqlRow("'" + str1 + "' as LotteryId,'" + str6 + "' as LotteryName,PlayId,(select titleName from Sys_PlaySmallType where Id=PlayId) as Title,cast(round(isnull(sum(Total*Times),0),4) as numeric(18,4)) as Bet ,isnull(sum(WinBonus),0) as Win,isnull(sum(num),0) as Num,isnull(sum(winnum),0) as WinNum,cast(round(CONVERT(float,isnull(sum(WinBonus),0))*100/CONVERT(float,isnull(sum(Total*Times),1)) ,4) as numeric(9,4)) as Per,isnull(sum(PointMoney),0) as Point,isnull(sum(-RealGet),0) as total", "N_UserBet", "PlayId", num2, num1, "asc", whereStr, "PlayId");

            this.doh.Reset();
            this.doh.SqlCmd = str7;
            DataTable dataTable = this.doh.GetDataTable();

            this._response = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(3, "js", 2, count, num2, num1, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable) + "}";
            dataTable.Clear();
            dataTable.Dispose();
        }
示例#3
0
        private void ajaxLotteryTime23()
        {
            string   newValue1 = this.q("lid");
            string   str1      = "{\"name\": \"名称\",\"lotteryid\": \"彩种类别\",\"ordertime\": \"倒计时\",\"closetime\": \"封单时间\",\"nestsn\": \"下期期号\",\"cursn\": \"当前期号\",\"curnumber\": \"开奖号码\"}".Replace("名称", LotteryUtils.LotteryTitle(Convert.ToInt32(newValue1))).Replace("彩种类别", newValue1);
            DateTime now       = DateTime.Now;
            DateTime dateTime  = this.GetDateTime();

            dateTime.ToString("yyyyMMdd");
            dateTime.ToString("HH:mm:ss");
            dateTime.ToString("yyyy-MM-dd");
            this.doh.Reset();
            this.doh.SqlCmd = "select dbo.f_GetCloseTime(" + newValue1 + ") as closetime";
            DataTable dataTable1 = this.doh.GetDataTable();
            string    str2       = str1.Replace("封单时间", dataTable1.Rows[0]["closetime"].ToString());
            TimeSpan  timeSpan   = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " 23:59:59") - DateTime.Now;
            string    newValue2  = string.Concat((object)(timeSpan.Days * 24 * 60 * 60 + timeSpan.Hours * 60 * 60 + timeSpan.Minutes * 60 + timeSpan.Seconds));
            string    str3       = str2.Replace("倒计时", newValue2);

            this.doh.Reset();
            this.doh.SqlCmd = "SELECT TOP 1 [Title],[Number] FROM [Sys_LotteryData] with(nolock) where UserId=" + this.AdminId + " order by Id desc";
            DataTable dataTable2 = this.doh.GetDataTable();
            string    str4;

            if (dataTable2.Rows.Count > 0)
            {
                string   newValue3 = dataTable2.Rows.Count > 0 ? dataTable2.Rows[0]["title"].ToString() : "您还未投注";
                string   newValue4 = dataTable2.Rows.Count > 0 ? string.Concat((object)(Convert.ToDecimal(dataTable2.Rows[0]["title"].ToString()) + 1)) : DateTime.Now.ToString("yyyyMMdd") + "00001";
                string   str5      = str3.Replace("下期期号", newValue4).Replace("当前期号", newValue3);
                string[] strArray  = dataTable2.Rows[0]["Number"].ToString().Split(',');
                string   str6      = "<p class='hm'>";
                for (int index = 0; index < strArray.Length; ++index)
                {
                    str6 = str6 + "<span>" + strArray[index] + "</span>";
                }
                string newValue5 = str6 + "</p>";
                str4 = str5.Replace("开奖号码", newValue5);
            }
            else
            {
                string newValue3 = "您还未投注";
                string newValue4 = DateTime.Now.ToString("yyyyMMdd") + "00001";
                str4 = str3.Replace("下期期号", newValue4).Replace("当前期号", newValue3).Replace("开奖号码", "<p class='hm'>" + "请您先投注" + "</p>");
            }
            this._response = str4;
        }
示例#4
0
        private void ajaxLotteryTime()
        {
            string   str1      = this.q("lid");
            string   str2      = "{\"name\": \"名称\",\"lotteryid\": \"彩种类别\",\"ordertime\": \"倒计时\",\"closetime\": \"封单时间\",\"nestsn\": \"下期期号\",\"cursn\": \"当前期号\"}".Replace("名称", LotteryUtils.LotteryTitle(Convert.ToInt32(str1))).Replace("彩种类别", str1);
            DateTime dateTime1 = DateTime.Now;
            DateTime dateTime2 = this.GetDateTime();
            string   str3      = dateTime2.ToString("yyyyMMdd");
            string   str4      = dateTime2.ToString("HH:mm:ss");

            dateTime2.ToString("yyyy-MM-dd");
            this.doh.Reset();
            this.doh.SqlCmd = "select dbo.f_GetCloseTime(" + str1 + ") as closetime";
            DataTable dataTable = this.doh.GetDataTable();
            string    str5      = str2.Replace("封单时间", dataTable.Rows[0]["closetime"].ToString());
            string    newValue1;
            string    newValue2;
            TimeSpan  timeSpan;

            if (str1 == "3002" || str1 == "3003")
            {
                int      year      = dateTime2.Year;
                DateTime dateTime3 = Convert.ToDateTime(year.ToString() + "-01-01 20:30:00");
                this.doh.Reset();
                this.doh.SqlCmd = "select datediff(d,'" + dateTime3.ToString("yyyy-MM-dd HH:mm:ss") + "','" + dateTime2.ToString("yyyy-MM-dd HH:mm:ss") + "') as d";
                int      Num       = Convert.ToInt32(this.doh.GetDataTable().Rows[0]["d"]) - 7 + 1;
                DateTime dateTime4 = dateTime2.AddDays(-1.0);
                string   str6      = dateTime4.ToString("yyyy-MM-dd") + " 20:30:00";
                string   str7      = dateTime2.ToString("yyyy-MM-dd") + " 20:30:00";
                if (dateTime2 > Convert.ToDateTime(dateTime2.ToString(" 20:30:00")))
                {
                    dateTime4 = dateTime2.AddDays(1.0);
                    str7      = dateTime4.ToString("yyyy-MM-dd") + " 20:30:00";
                }
                else
                {
                    --Num;
                }
                year      = dateTime2.Year;
                newValue1 = year.ToString() + Func.AddZero(Num, 3);
                year      = dateTime2.Year;
                newValue2 = year.ToString() + Func.AddZero(Num + 1, 3);
                timeSpan  = Convert.ToDateTime(str7) - Convert.ToDateTime(str4);
            }
            else
            {
                if (UserCenterSession.LotteryTime == null)
                {
                    UserCenterSession.LotteryTime = new LotteryTimeDAL().GetTable();
                }
                DataRow[] dataRowArray1 = UserCenterSession.LotteryTime.Select("Time >'" + str4 + "' and LotteryId=" + str1, "Time asc");
                if (dataRowArray1.Length == 0)
                {
                    dataRowArray1 = UserCenterSession.LotteryTime.Select("Time <='" + str4 + "' and LotteryId=" + str1, "Time asc");
                    newValue2     = dateTime2.AddDays(1.0).ToString("yyyyMMdd") + "-" + dataRowArray1[0]["Sn"].ToString();
                }
                else
                {
                    newValue2 = str3 + "-" + dataRowArray1[0]["Sn"].ToString();
                    dateTime1 = Convert.ToDateTime(dataRowArray1[0]["Time"].ToString());
                    if (dateTime2 > Convert.ToDateTime(dateTime2.ToString("yyyy-MM-dd") + " 00:00:00") && dateTime2 < Convert.ToDateTime(dateTime2.ToString("yyyy-MM-dd") + " 10:00:01") && str1 == "1003")
                    {
                        newValue2 = dateTime2.AddDays(-1.0).ToString("yyyyMMdd") + "-" + dataRowArray1[0]["Sn"].ToString();
                    }
                }
                if (Convert.ToDateTime(dataRowArray1[0]["Time"].ToString()) < Convert.ToDateTime(str4))
                {
                    dateTime1 = Convert.ToDateTime(dateTime2.AddDays(1.0).ToString("yyyy-MM-dd") + " " + dataRowArray1[0]["Time"].ToString());
                }
                timeSpan = dateTime1 - Convert.ToDateTime(str4);
                DataRow[] dataRowArray2 = UserCenterSession.LotteryTime.Select("Time <'" + str4 + "' and LotteryId=" + str1, "Time desc");
                if (dataRowArray2.Length == 0)
                {
                    dataRowArray2 = UserCenterSession.LotteryTime.Select("LotteryId=" + str1, "Time desc");
                    newValue1     = dateTime2.AddDays(-1.0).ToString("yyyyMMdd") + "-" + dataRowArray2[0]["Sn"].ToString();
                }
                else
                {
                    newValue1 = str3 + "-" + dataRowArray2[0]["Sn"].ToString();
                    if (dateTime2 > Convert.ToDateTime(dateTime2.ToString("yyyy-MM-dd") + " 00:00:00") && dateTime2 < Convert.ToDateTime(dateTime2.ToString("yyyy-MM-dd") + " 10:00:01") && str1 == "1003")
                    {
                        newValue1 = dateTime2.AddDays(-1.0).ToString("yyyyMMdd") + "-" + dataRowArray2[0]["Sn"].ToString();
                    }
                }
                if (str1 == "1010" || str1 == "1017" || str1 == "3004")
                {
                    newValue1 = string.Concat((object)(new LotteryTimeDAL().GetTsIssueNum(str1) + Convert.ToInt32(dataRowArray2[0]["Sn"].ToString())));
                    newValue2 = string.Concat((object)(Convert.ToInt32(newValue1) + 1));
                }
                if (str1 == "1012")
                {
                    newValue1 = string.Concat((object)(new LotteryTimeDAL().GetTsIssueNum("1012") + Convert.ToInt32(dataRowArray2[0]["Sn"].ToString())));
                    newValue2 = string.Concat((object)(Convert.ToInt32(newValue1) + 1));
                }
                if (str1 == "1013")
                {
                    newValue1 = string.Concat((object)(new LotteryTimeDAL().GetTsIssueNum("1013") + Convert.ToInt32(dataRowArray2[0]["Sn"].ToString())));
                    newValue2 = string.Concat((object)(Convert.ToInt32(newValue1) + 1));
                }
                if (str1 == "1014" || str1 == "1015" || str1 == "1016")
                {
                    newValue1 = newValue1.Replace("-", "");
                    newValue2 = newValue2.Replace("-", "");
                }
                if (str1 == "1011" || str1 == "3005")
                {
                    newValue1 = string.Concat((object)(new LotteryTimeDAL().GetTsIssueNum("1011") + Convert.ToInt32(dataRowArray2[0]["Sn"].ToString())));
                    newValue2 = string.Concat((object)(Convert.ToInt32(newValue1) + 1));
                }
                if (str1 == "4001")
                {
                    newValue1 = string.Concat((object)(new LotteryTimeDAL().GetTsIssueNum("4001") + Convert.ToInt32(dataRowArray2[0]["Sn"].ToString())));
                    newValue2 = string.Concat((object)(Convert.ToInt32(newValue1) + 1));
                }
                if (str1 == "1005")
                {
                    string str6 = string.Concat((object)(Convert.ToInt32(dataRowArray2[0]["Sn"].ToString()) - 1));
                    if (str6.Length == 1)
                    {
                        str6 = "000" + str6;
                    }
                    if (str6.Length == 2)
                    {
                        str6 = "00" + str6;
                    }
                    if (str6.Length == 3)
                    {
                        str6 = "0" + str6;
                    }
                    string str7 = string.Concat((object)Convert.ToInt32(dataRowArray2[0]["Sn"].ToString()));
                    if (str7.Length == 1)
                    {
                        str7 = "000" + str7;
                    }
                    if (str7.Length == 2)
                    {
                        str7 = "00" + str7;
                    }
                    if (str7.Length == 3)
                    {
                        str7 = "0" + str7;
                    }
                    newValue1 = dateTime2.ToString("yyyyMMdd") + "-" + str6;
                    newValue2 = dateTime2.ToString("yyyyMMdd") + "-" + str7;
                }
            }
            string newValue3 = string.Concat((object)(timeSpan.Days * 24 * 60 * 60 + timeSpan.Hours * 60 * 60 + timeSpan.Minutes * 60 + timeSpan.Seconds));

            this._response = str5.Replace("下期期号", newValue2).Replace("当前期号", newValue1).Replace("倒计时", newValue3);
        }
示例#5
0
        private void ajaxIndexLottery()
        {
            string str1 = "";

            this.doh.Reset();
            this.doh.SqlCmd = "select row_number() over (order by Sort asc) as rowid,* from [Sys_Lottery] where IsOpen=0 and Id in (1001,1004,1009,1016,2001,3002) order by Sort asc";
            DataTable dataTable = this.doh.GetDataTable();

            if (dataTable.Rows.Count > 0)
            {
                for (int index = 0; index < dataTable.Rows.Count; ++index)
                {
                    string   newValue1 = dataTable.Rows[index]["Id"].ToString();
                    string   str2      = "{\"rowid\": \"排序Id\",\"tid\": \"类别Id\",\"id\": \"彩种Id\",\"name\": \"名称\",\"ordertime\": \"倒计时\",\"remark\": \"说明\"}".Replace("名称", LotteryUtils.LotteryTitle(Convert.ToInt32(newValue1))).Replace("排序Id", dataTable.Rows[index]["rowid"].ToString()).Replace("类别Id", dataTable.Rows[index]["LType"].ToString()).Replace("彩种Id", newValue1).Replace("说明", dataTable.Rows[index]["IphoneRemark"].ToString());
                    DateTime now       = DateTime.Now;
                    DateTime dateTime1 = this.GetDateTime();
                    dateTime1.ToString("yyyyMMdd");
                    string str3 = dateTime1.ToString("HH:mm:ss");
                    dateTime1.ToString("yyyy-MM-dd");
                    DateTime dateTime2;
                    TimeSpan timeSpan;
                    if (newValue1 == "3002" || newValue1 == "3003")
                    {
                        string str4 = dateTime1.ToString("yyyy-MM-dd") + " 20:30:00";
                        if (dateTime1 > Convert.ToDateTime(dateTime1.ToString("yyyy-MM-dd") + " 20:30:00"))
                        {
                            dateTime2 = dateTime1.AddDays(1.0);
                            str4      = dateTime2.ToString("yyyy-MM-dd") + " 20:30:00";
                        }
                        timeSpan = Convert.ToDateTime(str4) - dateTime1;
                    }
                    else
                    {
                        if (UserCenterSession.LotteryTime == null)
                        {
                            UserCenterSession.LotteryTime = new LotteryTimeDAL().GetTable();
                        }
                        DataRow[] dataRowArray = UserCenterSession.LotteryTime.Select("Time >'" + str3 + "' and LotteryId=" + newValue1, "Time asc");
                        if (dataRowArray.Length == 0)
                        {
                            dataRowArray = UserCenterSession.LotteryTime.Select("Time <='" + str3 + "' and LotteryId=" + newValue1, "Time asc");
                        }
                        DateTime dateTime3 = Convert.ToDateTime(dateTime1.ToString("yyyy-MM-dd") + " " + dataRowArray[0]["Time"].ToString());
                        if (Convert.ToDateTime(dataRowArray[0]["Time"].ToString()) < Convert.ToDateTime(str3))
                        {
                            dateTime2 = dateTime1.AddDays(1.0);
                            dateTime3 = Convert.ToDateTime(dateTime2.ToString("yyyy-MM-dd") + " " + dataRowArray[0]["Time"].ToString());
                        }
                        timeSpan = dateTime3 - Convert.ToDateTime(str3);
                    }
                    string newValue2 = string.Concat((object)((timeSpan.Days * 24 * 60 * 60 + timeSpan.Hours * 60 * 60 + timeSpan.Minutes * 60 + timeSpan.Seconds) * 1000));
                    string str5      = str2.Replace("倒计时", newValue2);
                    str1 = str1 + str5 + ",";
                }
                this._response = "{\"result\":\"1\",\"table\": [" + str1.Substring(0, str1.Length - 1) + "]}";
            }
            else
            {
                this._response = "{\"result\":\"0\",\"table\": []}";
            }
        }
示例#6
0
        private void ajaxLotteryTime()
        {
            string text  = base.q("lid");
            string text2 = "{\"name\": \"名称\",\"lotteryid\": \"彩种类别\",\"ordertime\": \"倒计时\",\"closetime\": \"封单时间\",\"nestsn\": \"下期期号\",\"cursn\": \"当前期号\"}";

            text2 = text2.Replace("名称", LotteryUtils.LotteryTitle(Convert.ToInt32(text))).Replace("彩种类别", text);
            DateTime d        = DateTime.Now;
            DateTime dateTime = base.GetDateTime();
            string   str      = dateTime.ToString("yyyyMMdd");
            string   text3    = dateTime.ToString("HH:mm:ss");
            string   text4    = dateTime.ToString("yyyy-MM-dd");

            this.doh.Reset();
            this.doh.SqlCmd = "select dbo.f_GetCloseTime(" + text + ") as closetime";
            DataTable dataTable = this.doh.GetDataTable();

            text2 = text2.Replace("封单时间", dataTable.Rows[0]["closetime"].ToString());
            string   text6;
            string   text7;
            TimeSpan timeSpan;

            if (text == "3002" || text == "3003")
            {
                DateTime dateTime2 = Convert.ToDateTime(dateTime.Year.ToString() + "-01-01 20:30:00");
                this.doh.Reset();
                this.doh.SqlCmd = string.Concat(new string[]
                {
                    "select datediff(d,'",
                    dateTime2.ToString("yyyy-MM-dd HH:mm:ss"),
                    "','",
                    dateTime.ToString("yyyy-MM-dd HH:mm:ss"),
                    "') as d"
                });
                DataTable dataTable2 = this.doh.GetDataTable();
                int       num        = Convert.ToInt32(dataTable2.Rows[0]["d"]) - 7;
                num++;
                string text5 = dateTime.AddDays(-1.0).ToString("yyyy-MM-dd") + " 20:30:00";
                string value = dateTime.ToString("yyyy-MM-dd") + " 20:30:00";
                if (dateTime > Convert.ToDateTime(dateTime.ToString(" 20:30:00")))
                {
                    value = dateTime.AddDays(1.0).ToString("yyyy-MM-dd") + " 20:30:00";
                }
                else
                {
                    num--;
                }
                text6    = dateTime.Year.ToString() + Func.AddZero(num, 3);
                text7    = dateTime.Year.ToString() + Func.AddZero(num + 1, 3);
                timeSpan = Convert.ToDateTime(value) - Convert.ToDateTime(text3);
            }
            else
            {
                if (UserCenterSession.LotteryTime == null)
                {
                    UserCenterSession.LotteryTime = new LotteryTimeDAL().GetTable();
                }
                DataRow[] array = UserCenterSession.LotteryTime.Select(string.Concat(new object[]
                {
                    "Time >'",
                    text3,
                    "' and LotteryId=",
                    text
                }), "Time asc");
                if (array.Length == 0)
                {
                    array = UserCenterSession.LotteryTime.Select(string.Concat(new object[]
                    {
                        "Time <='",
                        text3,
                        "' and LotteryId=",
                        text
                    }), "Time asc");
                    text7 = dateTime.AddDays(1.0).ToString("yyyyMMdd") + "-" + array[0]["Sn"].ToString();
                }
                else
                {
                    text7 = str + "-" + array[0]["Sn"].ToString();
                    d     = Convert.ToDateTime(array[0]["Time"].ToString());
                    if (dateTime > Convert.ToDateTime(dateTime.ToString("yyyy-MM-dd") + " 00:00:00") && dateTime < Convert.ToDateTime(dateTime.ToString("yyyy-MM-dd") + " 10:00:01"))
                    {
                        if (text == "1003")
                        {
                            text7 = dateTime.AddDays(-1.0).ToString("yyyyMMdd") + "-" + array[0]["Sn"].ToString();
                        }
                    }
                }
                if (Convert.ToDateTime(array[0]["Time"].ToString()) < Convert.ToDateTime(text3))
                {
                    d = Convert.ToDateTime(dateTime.AddDays(1.0).ToString("yyyy-MM-dd") + " " + array[0]["Time"].ToString());
                }
                timeSpan = d - Convert.ToDateTime(text3);
                DataRow[] array2 = UserCenterSession.LotteryTime.Select(string.Concat(new object[]
                {
                    "Time <'",
                    text3,
                    "' and LotteryId=",
                    text
                }), "Time desc");
                if (array2.Length == 0)
                {
                    array2 = UserCenterSession.LotteryTime.Select(string.Concat(new object[]
                    {
                        "LotteryId=",
                        text
                    }), "Time desc");
                    text6 = dateTime.AddDays(-1.0).ToString("yyyyMMdd") + "-" + array2[0]["Sn"].ToString();
                }
                else
                {
                    text6 = str + "-" + array2[0]["Sn"].ToString();
                    if (dateTime > Convert.ToDateTime(dateTime.ToString("yyyy-MM-dd") + " 00:00:00") && dateTime < Convert.ToDateTime(dateTime.ToString("yyyy-MM-dd") + " 10:00:01"))
                    {
                        if (text == "1003")
                        {
                            text6 = dateTime.AddDays(-1.0).ToString("yyyyMMdd") + "-" + array2[0]["Sn"].ToString();
                        }
                    }
                }
                if (text == "1010" || text == "1017" || text == "3004")
                {
                    text6 = string.Concat(new LotteryTimeDAL().GetTsIssueNum(text) + Convert.ToInt32(array2[0]["Sn"].ToString()));
                    text7 = string.Concat(Convert.ToInt32(text6) + 1);
                }
                if (text == "1012")
                {
                    text6 = string.Concat(new LotteryTimeDAL().GetTsIssueNum("1012") + Convert.ToInt32(array2[0]["Sn"].ToString()));
                    text7 = string.Concat(Convert.ToInt32(text6) + 1);
                }
                if (text == "1013")
                {
                    text6 = string.Concat(new LotteryTimeDAL().GetTsIssueNum("1013") + Convert.ToInt32(array2[0]["Sn"].ToString()));
                    text7 = string.Concat(Convert.ToInt32(text6) + 1);
                }
                if (text == "1014" || text == "1015" || text == "1016")
                {
                    text6 = text6.Replace("-", "");
                    text7 = text7.Replace("-", "");
                }
                if (text == "1011" || text == "3005")
                {
                    text6 = string.Concat(new LotteryTimeDAL().GetTsIssueNum("1011") + Convert.ToInt32(array2[0]["Sn"].ToString()));
                    text7 = string.Concat(Convert.ToInt32(text6) + 1);
                }
                if (text == "4001")
                {
                    text6 = string.Concat(new LotteryTimeDAL().GetTsIssueNum("4001") + Convert.ToInt32(array2[0]["Sn"].ToString()));
                    text7 = string.Concat(Convert.ToInt32(text6) + 1);
                }
                if (text == "1005")
                {
                    string text8 = string.Concat(Convert.ToInt32(array2[0]["Sn"].ToString()) - 1);
                    if (text8.Length == 1)
                    {
                        text8 = "000" + text8;
                    }
                    if (text8.Length == 2)
                    {
                        text8 = "00" + text8;
                    }
                    if (text8.Length == 3)
                    {
                        text8 = "0" + text8;
                    }
                    string text9 = string.Concat(Convert.ToInt32(array2[0]["Sn"].ToString()));
                    if (text9.Length == 1)
                    {
                        text9 = "000" + text9;
                    }
                    if (text9.Length == 2)
                    {
                        text9 = "00" + text9;
                    }
                    if (text9.Length == 3)
                    {
                        text9 = "0" + text9;
                    }
                    text6 = dateTime.ToString("yyyyMMdd") + "-" + text8;
                    text7 = dateTime.ToString("yyyyMMdd") + "-" + text9;
                }
            }
            string newValue = string.Concat(timeSpan.Days * 24 * 60 * 60 + timeSpan.Hours * 60 * 60 + timeSpan.Minutes * 60 + timeSpan.Seconds);

            text2          = text2.Replace("下期期号", text7).Replace("当前期号", text6).Replace("倒计时", newValue);
            this._response = text2;
        }
示例#7
0
        private void ajaxIndexLottery()
        {
            string text = "";

            this.doh.Reset();
            this.doh.SqlCmd = "select row_number() over (order by Sort asc) as rowid,* from [Sys_Lottery] where IsOpen=0 and Id in (1001,1004,1009,1016,2001,3002) order by Sort asc";
            DataTable dataTable = this.doh.GetDataTable();

            if (dataTable.Rows.Count > 0)
            {
                for (int i = 0; i < dataTable.Rows.Count; i++)
                {
                    string text2 = dataTable.Rows[i]["Id"].ToString();
                    string text3 = "{\"rowid\": \"排序Id\",\"tid\": \"类别Id\",\"id\": \"彩种Id\",\"name\": \"名称\",\"ordertime\": \"倒计时\",\"remark\": \"说明\"}";
                    text3 = text3.Replace("名称", LotteryUtils.LotteryTitle(Convert.ToInt32(text2))).Replace("排序Id", dataTable.Rows[i]["rowid"].ToString()).Replace("类别Id", dataTable.Rows[i]["LType"].ToString()).Replace("彩种Id", text2).Replace("说明", dataTable.Rows[i]["IphoneRemark"].ToString());
                    DateTime d        = DateTime.Now;
                    DateTime dateTime = base.GetDateTime();
                    string   text4    = dateTime.ToString("yyyyMMdd");
                    string   text5    = dateTime.ToString("HH:mm:ss");
                    string   text6    = dateTime.ToString("yyyy-MM-dd");
                    TimeSpan timeSpan;
                    if (text2 == "3002" || text2 == "3003")
                    {
                        string value = dateTime.ToString("yyyy-MM-dd") + " 20:30:00";
                        if (dateTime > Convert.ToDateTime(dateTime.ToString("yyyy-MM-dd") + " 20:30:00"))
                        {
                            value = dateTime.AddDays(1.0).ToString("yyyy-MM-dd") + " 20:30:00";
                        }
                        timeSpan = Convert.ToDateTime(value) - dateTime;
                    }
                    else
                    {
                        if (UserCenterSession.LotteryTime == null)
                        {
                            UserCenterSession.LotteryTime = new LotteryTimeDAL().GetTable();
                        }
                        DataRow[] array = UserCenterSession.LotteryTime.Select(string.Concat(new object[]
                        {
                            "Time >'",
                            text5,
                            "' and LotteryId=",
                            text2
                        }), "Time asc");
                        if (array.Length == 0)
                        {
                            array = UserCenterSession.LotteryTime.Select(string.Concat(new object[]
                            {
                                "Time <='",
                                text5,
                                "' and LotteryId=",
                                text2
                            }), "Time asc");
                        }
                        d = Convert.ToDateTime(dateTime.ToString("yyyy-MM-dd") + " " + array[0]["Time"].ToString());
                        if (Convert.ToDateTime(array[0]["Time"].ToString()) < Convert.ToDateTime(text5))
                        {
                            d = Convert.ToDateTime(dateTime.AddDays(1.0).ToString("yyyy-MM-dd") + " " + array[0]["Time"].ToString());
                        }
                        timeSpan = d - Convert.ToDateTime(text5);
                    }
                    string newValue = string.Concat((timeSpan.Days * 24 * 60 * 60 + timeSpan.Hours * 60 * 60 + timeSpan.Minutes * 60 + timeSpan.Seconds) * 1000);
                    text3 = text3.Replace("倒计时", newValue);
                    text  = text + text3 + ",";
                }
                this._response = "{\"result\":\"1\",\"table\": [" + text.Substring(0, text.Length - 1) + "]}";
            }
            else
            {
                this._response = "{\"result\":\"0\",\"table\": []}";
            }
        }
示例#8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (base.Request.QueryString["id"] != null)
     {
         this.lotteryId = base.Request.QueryString["id"].ToString();
     }
     this.LName        = LotteryUtils.LotteryTitle(Convert.ToInt32(this.lotteryId));
     this.LotteryLines = "";
     if (!base.IsPostBack)
     {
         int top = 50;
         if (base.Request["n"] != null)
         {
             top = Convert.ToInt32(base.Request["n"]);
         }
         DataTable listDataTable = new LotteryDataDAL().GetListDataTable(Convert.ToInt32(this.lotteryId), top);
         if (this.lotteryId.Substring(0, 1) == "1")
         {
             this.count       = 10;
             int[,] array     = new int[5, 10];
             int[,] array2    = new int[5, 10];
             int[,] array3    = new int[5, 10];
             int[,] array4    = new int[5, 10];
             int[,] array5    = new int[5, 10];
             string[,] array6 = new string[5, 10];
             for (int i = 0; i < listDataTable.Rows.Count; i++)
             {
                 DataRow  dataRow = listDataTable.Rows[i];
                 string   str     = dataRow["Title"].ToString();
                 string   text    = dataRow["Number"].ToString();
                 string[] array7  = text.Split(new char[]
                 {
                     ','
                 });
                 string text2 = "<tr>";
                 text2 += "<td rowspan=\"2\" style=\"width:100px;\">期号</td>";
                 text2 += "<td rowspan=\"2\" style=\"width:100px;\">开奖号码</td>";
                 text2 += "<td colspan=\"10\">万位</td>";
                 text2 += "<td colspan=\"10\">千位</td>";
                 text2 += "<td colspan=\"10\">百位</td>";
                 text2 += "<td colspan=\"10\">十位</td>";
                 text2 += "<td colspan=\"10\">个位</td>";
                 text2 += "</tr>";
                 text2 += "<tr>";
                 for (int j = 0; j < array7.Length; j++)
                 {
                     for (int k = 0; k < 10; k++)
                     {
                         object obj = text2;
                         text2 = string.Concat(new object[]
                         {
                             obj,
                             "<td>",
                             k,
                             "</td>"
                         });
                     }
                 }
                 text2 += "</tr>";
                 this.LotteryHeadLines = text2;
                 string text3 = "<tr>";
                 text3 += "<td class=\"issue\">";
                 text3 += str;
                 text3 += "</td>";
                 text3 += "<td align=\"center\" class=\"tdwth\">";
                 text3 += text;
                 text3 += "</td>";
                 for (int j = 0; j < array7.Length; j++)
                 {
                     for (int l = 0; l <= 9; l++)
                     {
                         if (l == Convert.ToInt32(array7[j]))
                         {
                             array[j, l]++;
                             array2[j, l] = -1;
                             array4[j, l]++;
                             if (array3[j, l] < array4[j, l])
                             {
                                 array3[j, l] = array4[j, l];
                             }
                         }
                         else
                         {
                             array4[j, l] = 0;
                             array2[j, l]++;
                             if (array5[j, l] < array2[j, l])
                             {
                                 array5[j, l] = array2[j, l];
                             }
                         }
                         if (l == Convert.ToInt32(array7[j]))
                         {
                             if (j % 2 == 0)
                             {
                                 text3 = text3 + "<td class=\"charball td0\"><div class=\"ball01\">" + array7[j] + "</div></td>";
                             }
                             else
                             {
                                 text3 = text3 + "<td class=\"charball td1\"><div class=\"ball01\">" + array7[j] + "</div></td>";
                             }
                             array2[j, l]++;
                         }
                         else if (j % 2 == 0)
                         {
                             object obj = text3;
                             text3 = string.Concat(new object[]
                             {
                                 obj,
                                 "<td class=\"wdh td0\"><div class=\"ball14\">",
                                 array2[j, l],
                                 "</div></td>"
                             });
                         }
                         else
                         {
                             object obj = text3;
                             text3 = string.Concat(new object[]
                             {
                                 obj,
                                 "<td class=\"wdh td1\"><div class=\"ball14\">",
                                 array2[j, l],
                                 "</div></td>"
                             });
                         }
                     }
                 }
                 text3             += "</tr>";
                 this.LotteryLines += text3;
             }
             string text4 = "<tr>";
             text4 += "<td colspan=\"2\">";
             text4 += "当前最大连开";
             text4 += "</td>";
             for (int j = 0; j < 5; j++)
             {
                 for (int l = 0; l <= 9; l++)
                 {
                     if (j % 2 == 0)
                     {
                         object obj = text4;
                         text4 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td0\"><div class=\"ball14\">",
                             array3[j, l],
                             "</div></td>"
                         });
                     }
                     else
                     {
                         object obj = text4;
                         text4 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td1\"><div class=\"ball14\">",
                             array3[j, l],
                             "</div></td>"
                         });
                     }
                 }
             }
             text4 += "</tr>";
             string text5 = "<tr>";
             text5 += "<td colspan=\"2\">";
             text5 += "当前最大遗漏";
             text5 += "</td>";
             for (int j = 0; j < 5; j++)
             {
                 for (int l = 0; l <= 9; l++)
                 {
                     if (j % 2 == 0)
                     {
                         object obj = text5;
                         text5 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td0\"><div class=\"ball14\">",
                             array5[j, l],
                             "</div></td>"
                         });
                     }
                     else
                     {
                         object obj = text5;
                         text5 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td1\"><div class=\"ball14\">",
                             array5[j, l],
                             "</div></td>"
                         });
                     }
                 }
             }
             text5 += "</tr>";
             string text6 = "<tr>";
             text6 += "<td colspan=\"2\">";
             text6 += "当前出现次数";
             text6 += "</td>";
             for (int j = 0; j < 5; j++)
             {
                 for (int l = 0; l <= 9; l++)
                 {
                     if (j % 2 == 0)
                     {
                         object obj = text6;
                         text6 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td0\"><div class=\"ball14\">",
                             array[j, l],
                             "</div></td>"
                         });
                     }
                     else
                     {
                         object obj = text6;
                         text6 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td1\"><div class=\"ball14\">",
                             array[j, l],
                             "</div></td>"
                         });
                     }
                 }
             }
             text6            += "</tr>";
             this.LotteryLines = this.LotteryLines + text6 + text4 + text5;
         }
         if (this.lotteryId.Substring(0, 1) == "2")
         {
             this.count       = 11;
             int[,] array     = new int[5, 11];
             int[,] array2    = new int[5, 11];
             int[,] array3    = new int[5, 11];
             int[,] array4    = new int[5, 11];
             int[,] array5    = new int[5, 11];
             string[,] array6 = new string[5, 11];
             for (int i = 0; i < listDataTable.Rows.Count; i++)
             {
                 DataRow  dataRow = listDataTable.Rows[i];
                 string   str     = dataRow["Title"].ToString();
                 string   text    = dataRow["Number"].ToString();
                 string[] array7  = text.Split(new char[]
                 {
                     ','
                 });
                 string text2 = "<tr>";
                 text2 += "<td rowspan=\"2\" style=\"width:100px;\">期号</td>";
                 text2 += "<td rowspan=\"2\" style=\"width:100px;\">开奖号码</td>";
                 text2 += "<td colspan=\"11\">万位</td>";
                 text2 += "<td colspan=\"11\">千位</td>";
                 text2 += "<td colspan=\"11\">百位</td>";
                 text2 += "<td colspan=\"11\">十位</td>";
                 text2 += "<td colspan=\"11\">个位</td>";
                 text2 += "</tr>";
                 text2 += "<tr>";
                 for (int j = 0; j < array7.Length; j++)
                 {
                     for (int k = 1; k <= 11; k++)
                     {
                         object obj = text2;
                         text2 = string.Concat(new object[]
                         {
                             obj,
                             "<td>",
                             k,
                             "</td>"
                         });
                     }
                 }
                 text2 += "</tr>";
                 this.LotteryHeadLines = text2;
                 string text3 = "<tr>";
                 text3 += "<td class=\"issue\">";
                 text3 += str;
                 text3 += "</td>";
                 text3 += "<td align=\"center\" class=\"tdwth\">";
                 text3 += text;
                 text3 += "</td>";
                 for (int j = 0; j < array7.Length; j++)
                 {
                     for (int l = 0; l <= 10; l++)
                     {
                         if (l + 1 == Convert.ToInt32(array7[j]))
                         {
                             array[j, l]++;
                             array2[j, l] = -1;
                             array4[j, l]++;
                             if (array3[j, l] < array4[j, l])
                             {
                                 array3[j, l] = array4[j, l];
                             }
                         }
                         else
                         {
                             array4[j, l] = 1;
                             array2[j, l]++;
                             if (array5[j, l] < array2[j, l])
                             {
                                 array5[j, l] = array2[j, l];
                             }
                         }
                         if (l + 1 == Convert.ToInt32(array7[j]))
                         {
                             if (j % 2 == 0)
                             {
                                 text3 = text3 + "<td class=\"charball td0\"><div class=\"ball01\">" + array7[j] + "</div></td>";
                             }
                             else
                             {
                                 text3 = text3 + "<td class=\"charball td1\"><div class=\"ball01\">" + array7[j] + "</div></td>";
                             }
                             array2[j, l]++;
                         }
                         else if (j % 2 == 0)
                         {
                             object obj = text3;
                             text3 = string.Concat(new object[]
                             {
                                 obj,
                                 "<td class=\"wdh td0\"><div class=\"ball14\">",
                                 array2[j, l],
                                 "</div></td>"
                             });
                         }
                         else
                         {
                             object obj = text3;
                             text3 = string.Concat(new object[]
                             {
                                 obj,
                                 "<td class=\"wdh td1\"><div class=\"ball14\">",
                                 array2[j, l],
                                 "</div></td>"
                             });
                         }
                     }
                 }
                 text3             += "</tr>";
                 this.LotteryLines += text3;
             }
             string text4 = "<tr>";
             text4 += "<td colspan=\"2\">";
             text4 += "当前最大连开";
             text4 += "</td>";
             for (int j = 0; j < 5; j++)
             {
                 for (int l = 0; l <= 10; l++)
                 {
                     if (j % 2 == 0)
                     {
                         object obj = text4;
                         text4 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td0\"><div class=\"ball14\">",
                             array3[j, l],
                             "</div></td>"
                         });
                     }
                     else
                     {
                         object obj = text4;
                         text4 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td1\"><div class=\"ball14\">",
                             array3[j, l],
                             "</div></td>"
                         });
                     }
                 }
             }
             text4 += "</tr>";
             string text5 = "<tr>";
             text5 += "<td colspan=\"2\">";
             text5 += "当前最大遗漏";
             text5 += "</td>";
             for (int j = 0; j < 5; j++)
             {
                 for (int l = 0; l <= 10; l++)
                 {
                     if (j % 2 == 0)
                     {
                         object obj = text5;
                         text5 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td0\"><div class=\"ball14\">",
                             array5[j, l],
                             "</div></td>"
                         });
                     }
                     else
                     {
                         object obj = text5;
                         text5 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td1\"><div class=\"ball14\">",
                             array5[j, l],
                             "</div></td>"
                         });
                     }
                 }
             }
             text5 += "</tr>";
             string text6 = "<tr>";
             text6 += "<td colspan=\"2\">";
             text6 += "当前出现次数";
             text6 += "</td>";
             for (int j = 0; j < 5; j++)
             {
                 for (int l = 0; l <= 10; l++)
                 {
                     if (j % 2 == 0)
                     {
                         object obj = text6;
                         text6 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td0\"><div class=\"ball14\">",
                             array[j, l],
                             "</div></td>"
                         });
                     }
                     else
                     {
                         object obj = text6;
                         text6 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td1\"><div class=\"ball14\">",
                             array[j, l],
                             "</div></td>"
                         });
                     }
                 }
             }
             text6            += "</tr>";
             this.LotteryLines = this.LotteryLines + text6 + text4 + text5;
         }
         if (this.lotteryId.Substring(0, 1) == "3")
         {
             this.count       = 10;
             int[,] array     = new int[3, 10];
             int[,] array2    = new int[3, 10];
             int[,] array3    = new int[3, 10];
             int[,] array4    = new int[3, 10];
             int[,] array5    = new int[3, 10];
             string[,] array6 = new string[3, 10];
             for (int i = 0; i < listDataTable.Rows.Count; i++)
             {
                 DataRow  dataRow = listDataTable.Rows[i];
                 string   str     = dataRow["Title"].ToString();
                 string   text    = dataRow["Number"].ToString();
                 string[] array7  = text.Split(new char[]
                 {
                     ','
                 });
                 string text2 = "<tr>";
                 text2 += "<td rowspan=\"2\" style=\"width:100px;\">期号</td>";
                 text2 += "<td rowspan=\"2\" style=\"width:100px;\">开奖号码</td>";
                 text2 += "<td colspan=\"10\">百位</td>";
                 text2 += "<td colspan=\"10\">十位</td>";
                 text2 += "<td colspan=\"10\">个位</td>";
                 text2 += "</tr>";
                 text2 += "<tr>";
                 for (int j = 0; j < array7.Length; j++)
                 {
                     for (int k = 0; k < 10; k++)
                     {
                         object obj = text2;
                         text2 = string.Concat(new object[]
                         {
                             obj,
                             "<td>",
                             k,
                             "</td>"
                         });
                     }
                 }
                 text2 += "</tr>";
                 this.LotteryHeadLines = text2;
                 string text3 = "<tr>";
                 text3 += "<td class=\"issue\">";
                 text3 += str;
                 text3 += "</td>";
                 text3 += "<td align=\"center\" class=\"tdwth\">";
                 text3 += text;
                 text3 += "</td>";
                 for (int j = 0; j < array7.Length; j++)
                 {
                     for (int l = 0; l <= 9; l++)
                     {
                         if (l == Convert.ToInt32(array7[j]))
                         {
                             array[j, l]++;
                             array2[j, l] = -1;
                             array4[j, l]++;
                             if (array3[j, l] < array4[j, l])
                             {
                                 array3[j, l] = array4[j, l];
                             }
                         }
                         else
                         {
                             array4[j, l] = 0;
                             array2[j, l]++;
                             if (array5[j, l] < array2[j, l])
                             {
                                 array5[j, l] = array2[j, l];
                             }
                         }
                         if (l == Convert.ToInt32(array7[j]))
                         {
                             if (j % 2 == 0)
                             {
                                 text3 = text3 + "<td class=\"charball td0\"><div class=\"ball01\">" + array7[j] + "</div></td>";
                             }
                             else
                             {
                                 text3 = text3 + "<td class=\"charball td1\"><div class=\"ball01\">" + array7[j] + "</div></td>";
                             }
                             array2[j, l]++;
                         }
                         else if (j % 2 == 0)
                         {
                             object obj = text3;
                             text3 = string.Concat(new object[]
                             {
                                 obj,
                                 "<td class=\"wdh td0\"><div class=\"ball14\">",
                                 array2[j, l],
                                 "</div></td>"
                             });
                         }
                         else
                         {
                             object obj = text3;
                             text3 = string.Concat(new object[]
                             {
                                 obj,
                                 "<td class=\"wdh td1\"><div class=\"ball14\">",
                                 array2[j, l],
                                 "</div></td>"
                             });
                         }
                     }
                 }
                 text3             += "</tr>";
                 this.LotteryLines += text3;
             }
             string text4 = "<tr>";
             text4 += "<td colspan=\"2\">";
             text4 += "当前最大连开";
             text4 += "</td>";
             for (int j = 0; j < 3; j++)
             {
                 for (int l = 0; l <= 9; l++)
                 {
                     if (j % 2 == 0)
                     {
                         object obj = text4;
                         text4 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td0\"><div class=\"ball14\">",
                             array3[j, l],
                             "</div></td>"
                         });
                     }
                     else
                     {
                         object obj = text4;
                         text4 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td1\"><div class=\"ball14\">",
                             array3[j, l],
                             "</div></td>"
                         });
                     }
                 }
             }
             text4 += "</tr>";
             string text5 = "<tr>";
             text5 += "<td colspan=\"2\">";
             text5 += "当前最大遗漏";
             text5 += "</td>";
             for (int j = 0; j < 3; j++)
             {
                 for (int l = 0; l <= 9; l++)
                 {
                     if (j % 2 == 0)
                     {
                         object obj = text5;
                         text5 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td0\"><div class=\"ball14\">",
                             array5[j, l],
                             "</div></td>"
                         });
                     }
                     else
                     {
                         object obj = text5;
                         text5 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td1\"><div class=\"ball14\">",
                             array5[j, l],
                             "</div></td>"
                         });
                     }
                 }
             }
             text5 += "</tr>";
             string text6 = "<tr>";
             text6 += "<td colspan=\"2\">";
             text6 += "当前出现次数";
             text6 += "</td>";
             for (int j = 0; j < 3; j++)
             {
                 for (int l = 0; l <= 9; l++)
                 {
                     if (j % 2 == 0)
                     {
                         object obj = text6;
                         text6 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td0\"><div class=\"ball14\">",
                             array[j, l],
                             "</div></td>"
                         });
                     }
                     else
                     {
                         object obj = text6;
                         text6 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td1\"><div class=\"ball14\">",
                             array[j, l],
                             "</div></td>"
                         });
                     }
                 }
             }
             text6            += "</tr>";
             this.LotteryLines = this.LotteryLines + text6 + text4 + text5;
         }
         if (this.lotteryId.Substring(0, 1) == "4")
         {
             this.count       = 10;
             int[,] array     = new int[10, 11];
             int[,] array2    = new int[10, 11];
             int[,] array3    = new int[10, 11];
             int[,] array4    = new int[10, 11];
             int[,] array5    = new int[10, 11];
             string[,] array6 = new string[10, 11];
             for (int i = 0; i < listDataTable.Rows.Count; i++)
             {
                 DataRow  dataRow = listDataTable.Rows[i];
                 string   str     = dataRow["Title"].ToString();
                 string   text    = dataRow["Number"].ToString();
                 string[] array7  = text.Split(new char[]
                 {
                     ','
                 });
                 string text2 = "<tr>";
                 text2 += "<td rowspan=\"2\" style=\"width:100px;\">期号</td>";
                 text2 += "<td rowspan=\"2\" style=\"width:100px;\">开奖号码</td>";
                 text2 += "<td colspan=\"10\">一</td>";
                 text2 += "<td colspan=\"10\">二</td>";
                 text2 += "<td colspan=\"10\">三</td>";
                 text2 += "<td colspan=\"10\">四</td>";
                 text2 += "<td colspan=\"10\">五</td>";
                 text2 += "<td colspan=\"10\">六</td>";
                 text2 += "<td colspan=\"10\">七</td>";
                 text2 += "<td colspan=\"10\">八</td>";
                 text2 += "<td colspan=\"10\">九</td>";
                 text2 += "<td colspan=\"10\">十</td>";
                 text2 += "</tr>";
                 text2 += "<tr>";
                 for (int j = 0; j < array7.Length; j++)
                 {
                     for (int k = 1; k <= 10; k++)
                     {
                         object obj = text2;
                         text2 = string.Concat(new object[]
                         {
                             obj,
                             "<td>",
                             k,
                             "</td>"
                         });
                     }
                 }
                 text2 += "</tr>";
                 this.LotteryHeadLines = text2;
                 string text3 = "<tr>";
                 text3 += "<td class=\"issue\">";
                 text3 += str;
                 text3 += "</td>";
                 text3 += "<td align=\"center\" class=\"tdwth\">";
                 text3 += text;
                 text3 += "</td>";
                 for (int j = 0; j < array7.Length; j++)
                 {
                     for (int l = 0; l <= 9; l++)
                     {
                         if (l + 1 == Convert.ToInt32(array7[j]))
                         {
                             array[j, l]++;
                             array2[j, l] = -1;
                             array4[j, l]++;
                             if (array3[j, l] < array4[j, l])
                             {
                                 array3[j, l] = array4[j, l];
                             }
                         }
                         else
                         {
                             array4[j, l] = 1;
                             array2[j, l]++;
                             if (array5[j, l] < array2[j, l])
                             {
                                 array5[j, l] = array2[j, l];
                             }
                         }
                         if (l + 1 == Convert.ToInt32(array7[j]))
                         {
                             if (j % 2 == 0)
                             {
                                 text3 = text3 + "<td class=\"charball td0\"><div class=\"ball01\">" + array7[j] + "</div></td>";
                             }
                             else
                             {
                                 text3 = text3 + "<td class=\"charball td1\"><div class=\"ball01\">" + array7[j] + "</div></td>";
                             }
                             array2[j, l]++;
                         }
                         else if (j % 2 == 0)
                         {
                             object obj = text3;
                             text3 = string.Concat(new object[]
                             {
                                 obj,
                                 "<td class=\"wdh td0\"><div class=\"ball14\">",
                                 array2[j, l],
                                 "</div></td>"
                             });
                         }
                         else
                         {
                             object obj = text3;
                             text3 = string.Concat(new object[]
                             {
                                 obj,
                                 "<td class=\"wdh td1\"><div class=\"ball14\">",
                                 array2[j, l],
                                 "</div></td>"
                             });
                         }
                     }
                 }
                 text3             += "</tr>";
                 this.LotteryLines += text3;
             }
             string text4 = "<tr>";
             text4 += "<td colspan=\"2\">";
             text4 += "当前最大连开";
             text4 += "</td>";
             for (int j = 0; j < 10; j++)
             {
                 for (int l = 0; l <= 9; l++)
                 {
                     if (j % 2 == 0)
                     {
                         object obj = text4;
                         text4 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td0\"><div class=\"ball14\">",
                             array3[j, l],
                             "</div></td>"
                         });
                     }
                     else
                     {
                         object obj = text4;
                         text4 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td1\"><div class=\"ball14\">",
                             array3[j, l],
                             "</div></td>"
                         });
                     }
                 }
             }
             text4 += "</tr>";
             string text5 = "<tr>";
             text5 += "<td colspan=\"2\">";
             text5 += "当前最大遗漏";
             text5 += "</td>";
             for (int j = 0; j < 10; j++)
             {
                 for (int l = 0; l <= 9; l++)
                 {
                     if (j % 2 == 0)
                     {
                         object obj = text5;
                         text5 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td0\"><div class=\"ball14\">",
                             array5[j, l],
                             "</div></td>"
                         });
                     }
                     else
                     {
                         object obj = text5;
                         text5 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td1\"><div class=\"ball14\">",
                             array5[j, l],
                             "</div></td>"
                         });
                     }
                 }
             }
             text5 += "</tr>";
             string text6 = "<tr>";
             text6 += "<td colspan=\"2\">";
             text6 += "当前出现次数";
             text6 += "</td>";
             for (int j = 0; j < 10; j++)
             {
                 for (int l = 0; l <= 9; l++)
                 {
                     if (j % 2 == 0)
                     {
                         object obj = text6;
                         text6 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td0\"><div class=\"ball14\">",
                             array[j, l],
                             "</div></td>"
                         });
                     }
                     else
                     {
                         object obj = text6;
                         text6 = string.Concat(new object[]
                         {
                             obj,
                             "<td class=\"wdh td1\"><div class=\"ball14\">",
                             array[j, l],
                             "</div></td>"
                         });
                     }
                 }
             }
             text6            += "</tr>";
             this.LotteryLines = this.LotteryLines + text6 + text4 + text5;
         }
     }
 }
示例#9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Request.QueryString["id"] != null)
            {
                this.lotteryId = this.Request.QueryString["id"].ToString();
            }
            this.LName        = LotteryUtils.LotteryTitle(Convert.ToInt32(this.lotteryId));
            this.LotteryLines = "";
            if (this.IsPostBack)
            {
                return;
            }
            int top = 50;

            if (this.Request["n"] != null)
            {
                top = Convert.ToInt32(this.Request["n"]);
            }
            DataTable listDataTable = new LotteryDataDAL().GetListDataTable(Convert.ToInt32(this.lotteryId), top);

            string[,] strArray1;
            if (this.lotteryId.Substring(0, 1) == "1")
            {
                this.count       = 10;
                int[,] numArray1 = new int[5, 10];
                int[,] numArray2 = new int[5, 10];
                int[,] numArray3 = new int[5, 10];
                int[,] numArray4 = new int[5, 10];
                int[,] numArray5 = new int[5, 10];
                strArray1        = new string[5, 10];
                for (int index1 = 0; index1 < listDataTable.Rows.Count; ++index1)
                {
                    DataRow  row       = listDataTable.Rows[index1];
                    string   str1      = row["Title"].ToString();
                    string   str2      = row["Number"].ToString();
                    string[] strArray2 = str2.Split(',');
                    string   str3      = "<tr>" + "<td rowspan=\"2\" style=\"width:100px;\">期号</td>" + "<td rowspan=\"2\" style=\"width:100px;\">开奖号码</td>" + "<td colspan=\"10\">万位</td>" + "<td colspan=\"10\">千位</td>" + "<td colspan=\"10\">百位</td>" + "<td colspan=\"10\">十位</td>" + "<td colspan=\"10\">个位</td>" + "</tr>" + "<tr>";
                    for (int index2 = 0; index2 < strArray2.Length; ++index2)
                    {
                        for (int index3 = 0; index3 < 10; ++index3)
                        {
                            str3 = str3 + "<td>" + (object)index3 + "</td>";
                        }
                    }
                    this.LotteryHeadLines = str3 + "</tr>";
                    string str4 = "<tr>" + "<td class=\"issue\">" + str1 + "</td>" + "<td align=\"center\" class=\"tdwth\">" + str2 + "</td>";
                    for (int index2 = 0; index2 < strArray2.Length; ++index2)
                    {
                        for (int index3 = 0; index3 <= 9; ++index3)
                        {
                            if (index3 == Convert.ToInt32(strArray2[index2]))
                            {
                                ++numArray1[index2, index3];
                                numArray2[index2, index3] = -1;
                                ++numArray4[index2, index3];
                                if (numArray3[index2, index3] < numArray4[index2, index3])
                                {
                                    numArray3[index2, index3] = numArray4[index2, index3];
                                }
                            }
                            else
                            {
                                numArray4[index2, index3] = 0;
                                ++numArray2[index2, index3];
                                if (numArray5[index2, index3] < numArray2[index2, index3])
                                {
                                    numArray5[index2, index3] = numArray2[index2, index3];
                                }
                            }
                            if (index3 == Convert.ToInt32(strArray2[index2]))
                            {
                                str4 = index2 % 2 != 0 ? str4 + "<td class=\"charball td1\"><div class=\"ball01\">" + strArray2[index2] + "</div></td>" : str4 + "<td class=\"charball td0\"><div class=\"ball01\">" + strArray2[index2] + "</div></td>";
                                ++numArray2[index2, index3];
                            }
                            else if (index2 % 2 == 0)
                            {
                                str4 = str4 + "<td class=\"wdh td0\"><div class=\"ball14\">" + (object)numArray2[index2, index3] + "</div></td>";
                            }
                            else
                            {
                                str4 = str4 + "<td class=\"wdh td1\"><div class=\"ball14\">" + (object)numArray2[index2, index3] + "</div></td>";
                            }
                        }
                    }
                    this.LotteryLines += str4 + "</tr>";
                }
                string str5 = "<tr>" + "<td colspan=\"2\">" + "当前最大连开" + "</td>";
                for (int index1 = 0; index1 < 5; ++index1)
                {
                    for (int index2 = 0; index2 <= 9; ++index2)
                    {
                        if (index1 % 2 == 0)
                        {
                            str5 = str5 + "<td class=\"wdh td0\"><div class=\"ball14\">" + (object)numArray3[index1, index2] + "</div></td>";
                        }
                        else
                        {
                            str5 = str5 + "<td class=\"wdh td1\"><div class=\"ball14\">" + (object)numArray3[index1, index2] + "</div></td>";
                        }
                    }
                }
                string str6 = str5 + "</tr>";
                string str7 = "<tr>" + "<td colspan=\"2\">" + "当前最大遗漏" + "</td>";
                for (int index1 = 0; index1 < 5; ++index1)
                {
                    for (int index2 = 0; index2 <= 9; ++index2)
                    {
                        if (index1 % 2 == 0)
                        {
                            str7 = str7 + "<td class=\"wdh td0\"><div class=\"ball14\">" + (object)numArray5[index1, index2] + "</div></td>";
                        }
                        else
                        {
                            str7 = str7 + "<td class=\"wdh td1\"><div class=\"ball14\">" + (object)numArray5[index1, index2] + "</div></td>";
                        }
                    }
                }
                string str8 = str7 + "</tr>";
                string str9 = "<tr>" + "<td colspan=\"2\">" + "当前出现次数" + "</td>";
                for (int index1 = 0; index1 < 5; ++index1)
                {
                    for (int index2 = 0; index2 <= 9; ++index2)
                    {
                        if (index1 % 2 == 0)
                        {
                            str9 = str9 + "<td class=\"wdh td0\"><div class=\"ball14\">" + (object)numArray1[index1, index2] + "</div></td>";
                        }
                        else
                        {
                            str9 = str9 + "<td class=\"wdh td1\"><div class=\"ball14\">" + (object)numArray1[index1, index2] + "</div></td>";
                        }
                    }
                }
                string str10 = str9 + "</tr>";
                index  index = this;
                index.LotteryLines = index.LotteryLines + str10 + str6 + str8;
            }
            if (this.lotteryId.Substring(0, 1) == "2")
            {
                this.count       = 11;
                int[,] numArray1 = new int[5, 11];
                int[,] numArray2 = new int[5, 11];
                int[,] numArray3 = new int[5, 11];
                int[,] numArray4 = new int[5, 11];
                int[,] numArray5 = new int[5, 11];
                strArray1        = new string[5, 11];
                for (int index1 = 0; index1 < listDataTable.Rows.Count; ++index1)
                {
                    DataRow  row       = listDataTable.Rows[index1];
                    string   str1      = row["Title"].ToString();
                    string   str2      = row["Number"].ToString();
                    string[] strArray2 = str2.Split(',');
                    string   str3      = "<tr>" + "<td rowspan=\"2\" style=\"width:100px;\">期号</td>" + "<td rowspan=\"2\" style=\"width:100px;\">开奖号码</td>" + "<td colspan=\"11\">万位</td>" + "<td colspan=\"11\">千位</td>" + "<td colspan=\"11\">百位</td>" + "<td colspan=\"11\">十位</td>" + "<td colspan=\"11\">个位</td>" + "</tr>" + "<tr>";
                    for (int index2 = 0; index2 < strArray2.Length; ++index2)
                    {
                        for (int index3 = 1; index3 <= 11; ++index3)
                        {
                            str3 = str3 + "<td>" + (object)index3 + "</td>";
                        }
                    }
                    this.LotteryHeadLines = str3 + "</tr>";
                    string str4 = "<tr>" + "<td class=\"issue\">" + str1 + "</td>" + "<td align=\"center\" class=\"tdwth\">" + str2 + "</td>";
                    for (int index2 = 0; index2 < strArray2.Length; ++index2)
                    {
                        for (int index3 = 0; index3 <= 10; ++index3)
                        {
                            if (index3 + 1 == Convert.ToInt32(strArray2[index2]))
                            {
                                ++numArray1[index2, index3];
                                numArray2[index2, index3] = -1;
                                ++numArray4[index2, index3];
                                if (numArray3[index2, index3] < numArray4[index2, index3])
                                {
                                    numArray3[index2, index3] = numArray4[index2, index3];
                                }
                            }
                            else
                            {
                                numArray4[index2, index3] = 1;
                                ++numArray2[index2, index3];
                                if (numArray5[index2, index3] < numArray2[index2, index3])
                                {
                                    numArray5[index2, index3] = numArray2[index2, index3];
                                }
                            }
                            if (index3 + 1 == Convert.ToInt32(strArray2[index2]))
                            {
                                str4 = index2 % 2 != 0 ? str4 + "<td class=\"charball td1\"><div class=\"ball01\">" + strArray2[index2] + "</div></td>" : str4 + "<td class=\"charball td0\"><div class=\"ball01\">" + strArray2[index2] + "</div></td>";
                                ++numArray2[index2, index3];
                            }
                            else if (index2 % 2 == 0)
                            {
                                str4 = str4 + "<td class=\"wdh td0\"><div class=\"ball14\">" + (object)numArray2[index2, index3] + "</div></td>";
                            }
                            else
                            {
                                str4 = str4 + "<td class=\"wdh td1\"><div class=\"ball14\">" + (object)numArray2[index2, index3] + "</div></td>";
                            }
                        }
                    }
                    this.LotteryLines += str4 + "</tr>";
                }
                string str5 = "<tr>" + "<td colspan=\"2\">" + "当前最大连开" + "</td>";
                for (int index1 = 0; index1 < 5; ++index1)
                {
                    for (int index2 = 0; index2 <= 10; ++index2)
                    {
                        if (index1 % 2 == 0)
                        {
                            str5 = str5 + "<td class=\"wdh td0\"><div class=\"ball14\">" + (object)numArray3[index1, index2] + "</div></td>";
                        }
                        else
                        {
                            str5 = str5 + "<td class=\"wdh td1\"><div class=\"ball14\">" + (object)numArray3[index1, index2] + "</div></td>";
                        }
                    }
                }
                string str6 = str5 + "</tr>";
                string str7 = "<tr>" + "<td colspan=\"2\">" + "当前最大遗漏" + "</td>";
                for (int index1 = 0; index1 < 5; ++index1)
                {
                    for (int index2 = 0; index2 <= 10; ++index2)
                    {
                        if (index1 % 2 == 0)
                        {
                            str7 = str7 + "<td class=\"wdh td0\"><div class=\"ball14\">" + (object)numArray5[index1, index2] + "</div></td>";
                        }
                        else
                        {
                            str7 = str7 + "<td class=\"wdh td1\"><div class=\"ball14\">" + (object)numArray5[index1, index2] + "</div></td>";
                        }
                    }
                }
                string str8 = str7 + "</tr>";
                string str9 = "<tr>" + "<td colspan=\"2\">" + "当前出现次数" + "</td>";
                for (int index1 = 0; index1 < 5; ++index1)
                {
                    for (int index2 = 0; index2 <= 10; ++index2)
                    {
                        if (index1 % 2 == 0)
                        {
                            str9 = str9 + "<td class=\"wdh td0\"><div class=\"ball14\">" + (object)numArray1[index1, index2] + "</div></td>";
                        }
                        else
                        {
                            str9 = str9 + "<td class=\"wdh td1\"><div class=\"ball14\">" + (object)numArray1[index1, index2] + "</div></td>";
                        }
                    }
                }
                string str10 = str9 + "</tr>";
                index  index = this;
                index.LotteryLines = index.LotteryLines + str10 + str6 + str8;
            }
            if (this.lotteryId.Substring(0, 1) == "3")
            {
                this.count       = 10;
                int[,] numArray1 = new int[3, 10];
                int[,] numArray2 = new int[3, 10];
                int[,] numArray3 = new int[3, 10];
                int[,] numArray4 = new int[3, 10];
                int[,] numArray5 = new int[3, 10];
                strArray1        = new string[3, 10];
                for (int index1 = 0; index1 < listDataTable.Rows.Count; ++index1)
                {
                    DataRow  row       = listDataTable.Rows[index1];
                    string   str1      = row["Title"].ToString();
                    string   str2      = row["Number"].ToString();
                    string[] strArray2 = str2.Split(',');
                    string   str3      = "<tr>" + "<td rowspan=\"2\" style=\"width:100px;\">期号</td>" + "<td rowspan=\"2\" style=\"width:100px;\">开奖号码</td>" + "<td colspan=\"10\">百位</td>" + "<td colspan=\"10\">十位</td>" + "<td colspan=\"10\">个位</td>" + "</tr>" + "<tr>";
                    for (int index2 = 0; index2 < strArray2.Length; ++index2)
                    {
                        for (int index3 = 0; index3 < 10; ++index3)
                        {
                            str3 = str3 + "<td>" + (object)index3 + "</td>";
                        }
                    }
                    this.LotteryHeadLines = str3 + "</tr>";
                    string str4 = "<tr>" + "<td class=\"issue\">" + str1 + "</td>" + "<td align=\"center\" class=\"tdwth\">" + str2 + "</td>";
                    for (int index2 = 0; index2 < strArray2.Length; ++index2)
                    {
                        for (int index3 = 0; index3 <= 9; ++index3)
                        {
                            if (index3 == Convert.ToInt32(strArray2[index2]))
                            {
                                ++numArray1[index2, index3];
                                numArray2[index2, index3] = -1;
                                ++numArray4[index2, index3];
                                if (numArray3[index2, index3] < numArray4[index2, index3])
                                {
                                    numArray3[index2, index3] = numArray4[index2, index3];
                                }
                            }
                            else
                            {
                                numArray4[index2, index3] = 0;
                                ++numArray2[index2, index3];
                                if (numArray5[index2, index3] < numArray2[index2, index3])
                                {
                                    numArray5[index2, index3] = numArray2[index2, index3];
                                }
                            }
                            if (index3 == Convert.ToInt32(strArray2[index2]))
                            {
                                str4 = index2 % 2 != 0 ? str4 + "<td class=\"charball td1\"><div class=\"ball01\">" + strArray2[index2] + "</div></td>" : str4 + "<td class=\"charball td0\"><div class=\"ball01\">" + strArray2[index2] + "</div></td>";
                                ++numArray2[index2, index3];
                            }
                            else if (index2 % 2 == 0)
                            {
                                str4 = str4 + "<td class=\"wdh td0\"><div class=\"ball14\">" + (object)numArray2[index2, index3] + "</div></td>";
                            }
                            else
                            {
                                str4 = str4 + "<td class=\"wdh td1\"><div class=\"ball14\">" + (object)numArray2[index2, index3] + "</div></td>";
                            }
                        }
                    }
                    this.LotteryLines += str4 + "</tr>";
                }
                string str5 = "<tr>" + "<td colspan=\"2\">" + "当前最大连开" + "</td>";
                for (int index1 = 0; index1 < 3; ++index1)
                {
                    for (int index2 = 0; index2 <= 9; ++index2)
                    {
                        if (index1 % 2 == 0)
                        {
                            str5 = str5 + "<td class=\"wdh td0\"><div class=\"ball14\">" + (object)numArray3[index1, index2] + "</div></td>";
                        }
                        else
                        {
                            str5 = str5 + "<td class=\"wdh td1\"><div class=\"ball14\">" + (object)numArray3[index1, index2] + "</div></td>";
                        }
                    }
                }
                string str6 = str5 + "</tr>";
                string str7 = "<tr>" + "<td colspan=\"2\">" + "当前最大遗漏" + "</td>";
                for (int index1 = 0; index1 < 3; ++index1)
                {
                    for (int index2 = 0; index2 <= 9; ++index2)
                    {
                        if (index1 % 2 == 0)
                        {
                            str7 = str7 + "<td class=\"wdh td0\"><div class=\"ball14\">" + (object)numArray5[index1, index2] + "</div></td>";
                        }
                        else
                        {
                            str7 = str7 + "<td class=\"wdh td1\"><div class=\"ball14\">" + (object)numArray5[index1, index2] + "</div></td>";
                        }
                    }
                }
                string str8 = str7 + "</tr>";
                string str9 = "<tr>" + "<td colspan=\"2\">" + "当前出现次数" + "</td>";
                for (int index1 = 0; index1 < 3; ++index1)
                {
                    for (int index2 = 0; index2 <= 9; ++index2)
                    {
                        if (index1 % 2 == 0)
                        {
                            str9 = str9 + "<td class=\"wdh td0\"><div class=\"ball14\">" + (object)numArray1[index1, index2] + "</div></td>";
                        }
                        else
                        {
                            str9 = str9 + "<td class=\"wdh td1\"><div class=\"ball14\">" + (object)numArray1[index1, index2] + "</div></td>";
                        }
                    }
                }
                string str10 = str9 + "</tr>";
                index  index = this;
                index.LotteryLines = index.LotteryLines + str10 + str6 + str8;
            }
            if (this.lotteryId.Substring(0, 1) == "4")
            {
                this.count       = 10;
                int[,] numArray1 = new int[10, 11];
                int[,] numArray2 = new int[10, 11];
                int[,] numArray3 = new int[10, 11];
                int[,] numArray4 = new int[10, 11];
                int[,] numArray5 = new int[10, 11];
                strArray1        = new string[10, 11];
                for (int index1 = 0; index1 < listDataTable.Rows.Count; ++index1)
                {
                    DataRow  row       = listDataTable.Rows[index1];
                    string   str1      = row["Title"].ToString();
                    string   str2      = row["Number"].ToString();
                    string[] strArray2 = str2.Split(',');
                    string   str3      = "<tr>" + "<td rowspan=\"2\" style=\"width:100px;\">期号</td>" + "<td rowspan=\"2\" style=\"width:100px;\">开奖号码</td>" + "<td colspan=\"10\">一</td>" + "<td colspan=\"10\">二</td>" + "<td colspan=\"10\">三</td>" + "<td colspan=\"10\">四</td>" + "<td colspan=\"10\">五</td>" + "<td colspan=\"10\">六</td>" + "<td colspan=\"10\">七</td>" + "<td colspan=\"10\">八</td>" + "<td colspan=\"10\">九</td>" + "<td colspan=\"10\">十</td>" + "</tr>" + "<tr>";
                    for (int index2 = 0; index2 < strArray2.Length; ++index2)
                    {
                        for (int index3 = 1; index3 <= 10; ++index3)
                        {
                            str3 = str3 + "<td>" + (object)index3 + "</td>";
                        }
                    }
                    this.LotteryHeadLines = str3 + "</tr>";
                    string str4 = "<tr>" + "<td class=\"issue\">" + str1 + "</td>" + "<td align=\"center\" class=\"tdwth\">" + str2 + "</td>";
                    for (int index2 = 0; index2 < strArray2.Length; ++index2)
                    {
                        for (int index3 = 0; index3 <= 9; ++index3)
                        {
                            if (index3 + 1 == Convert.ToInt32(strArray2[index2]))
                            {
                                ++numArray1[index2, index3];
                                numArray2[index2, index3] = -1;
                                ++numArray4[index2, index3];
                                if (numArray3[index2, index3] < numArray4[index2, index3])
                                {
                                    numArray3[index2, index3] = numArray4[index2, index3];
                                }
                            }
                            else
                            {
                                numArray4[index2, index3] = 1;
                                ++numArray2[index2, index3];
                                if (numArray5[index2, index3] < numArray2[index2, index3])
                                {
                                    numArray5[index2, index3] = numArray2[index2, index3];
                                }
                            }
                            if (index3 + 1 == Convert.ToInt32(strArray2[index2]))
                            {
                                str4 = index2 % 2 != 0 ? str4 + "<td class=\"charball td1\"><div class=\"ball01\">" + strArray2[index2] + "</div></td>" : str4 + "<td class=\"charball td0\"><div class=\"ball01\">" + strArray2[index2] + "</div></td>";
                                ++numArray2[index2, index3];
                            }
                            else if (index2 % 2 == 0)
                            {
                                str4 = str4 + "<td class=\"wdh td0\"><div class=\"ball14\">" + (object)numArray2[index2, index3] + "</div></td>";
                            }
                            else
                            {
                                str4 = str4 + "<td class=\"wdh td1\"><div class=\"ball14\">" + (object)numArray2[index2, index3] + "</div></td>";
                            }
                        }
                    }
                    this.LotteryLines += str4 + "</tr>";
                }
                string str5 = "<tr>" + "<td colspan=\"2\">" + "当前最大连开" + "</td>";
                for (int index1 = 0; index1 < 10; ++index1)
                {
                    for (int index2 = 0; index2 <= 9; ++index2)
                    {
                        if (index1 % 2 == 0)
                        {
                            str5 = str5 + "<td class=\"wdh td0\"><div class=\"ball14\">" + (object)numArray3[index1, index2] + "</div></td>";
                        }
                        else
                        {
                            str5 = str5 + "<td class=\"wdh td1\"><div class=\"ball14\">" + (object)numArray3[index1, index2] + "</div></td>";
                        }
                    }
                }
                string str6 = str5 + "</tr>";
                string str7 = "<tr>" + "<td colspan=\"2\">" + "当前最大遗漏" + "</td>";
                for (int index1 = 0; index1 < 10; ++index1)
                {
                    for (int index2 = 0; index2 <= 9; ++index2)
                    {
                        if (index1 % 2 == 0)
                        {
                            str7 = str7 + "<td class=\"wdh td0\"><div class=\"ball14\">" + (object)numArray5[index1, index2] + "</div></td>";
                        }
                        else
                        {
                            str7 = str7 + "<td class=\"wdh td1\"><div class=\"ball14\">" + (object)numArray5[index1, index2] + "</div></td>";
                        }
                    }
                }
                string str8 = str7 + "</tr>";
                string str9 = "<tr>" + "<td colspan=\"2\">" + "当前出现次数" + "</td>";
                for (int index1 = 0; index1 < 10; ++index1)
                {
                    for (int index2 = 0; index2 <= 9; ++index2)
                    {
                        if (index1 % 2 == 0)
                        {
                            str9 = str9 + "<td class=\"wdh td0\"><div class=\"ball14\">" + (object)numArray1[index1, index2] + "</div></td>";
                        }
                        else
                        {
                            str9 = str9 + "<td class=\"wdh td1\"><div class=\"ball14\">" + (object)numArray1[index1, index2] + "</div></td>";
                        }
                    }
                }
                string str10 = str9 + "</tr>";
                index  index = this;
                index.LotteryLines = index.LotteryLines + str10 + str6 + str8;
            }
        }
示例#10
0
        private void ajaxGetListPlay()
        {
            string text     = base.q("lid");
            string text2    = base.q("d1");
            string text3    = base.q("d2");
            string text4    = base.q("u");
            int    num      = base.Int_ThisPage();
            int    pageSize = base.Str2Int(base.q("pagesize"), 20);
            int    num2     = base.Str2Int(base.q("flag"), 0);

            if (text2.Trim().Length == 0)
            {
                text2 = Convert.ToDateTime(this.StartTime).ToString("yyyy-MM-dd");
            }
            if (text3.Trim().Length == 0)
            {
                text3 = Convert.ToDateTime(this.EndTime).AddDays(1.0).ToString("yyyy-MM-dd");
            }
            if (Convert.ToDateTime(text2) > Convert.ToDateTime(text3))
            {
                text2 = text3;
            }
            string text5 = "";
            string text6 = string.Concat(new string[]
            {
                "STime2 >='",
                text2,
                "' and STime2 <'",
                text3,
                "' and state>1"
            });

            if (!string.IsNullOrEmpty(text))
            {
                text6 = text6 + " and LotteryId = " + text;
            }
            if (!string.IsNullOrEmpty(text4))
            {
                text6 = text6 + " and Title = '" + text4 + "'";
            }
            this.doh.Reset();
            this.doh.SqlCmd = "select PlayId FROM [N_UserBet] where " + text6 + " group by PlayId";
            DataTable dataTable = this.doh.GetDataTable();
            int       count     = dataTable.Rows.Count;
            string    text7     = (!string.IsNullOrEmpty(text)) ? LotteryUtils.LotteryTitle(Convert.ToInt32(text)) : "全部游戏";

            text5  = text5 + " SELECT '99999' as rowNember,'-1' as [LotteryId],'全部合计' as [LotteryName],'999' as PlayId,'' as Title,\r\n            cast(round(isnull(sum(Total*Times),0),4) as numeric(18,4)) as Bet ,isnull(sum(WinBonus),0) as Win,\r\n            isnull(sum(num),0) as Num,isnull(sum(winnum),0) as WinNum,\r\n            cast(round(CONVERT(float,isnull(sum(WinBonus),0))*100/CONVERT(float,isnull(sum(Total*Times),1)) ,4) as numeric(9,4)) as Per,\r\n            isnull(sum(PointMoney),0) as Point,isnull(sum(-RealGet),0) as total FROM [N_UserBet] where " + text6;
            text5 += " union all ";
            text5 += SqlHelp.GetSqlRow(string.Concat(new string[]
            {
                "'",
                text,
                "' as LotteryId,'",
                text7,
                "' as LotteryName,PlayId,(select titleName from Sys_PlaySmallType where Id=PlayId) as Title,cast(round(isnull(sum(Total*Times),0),4) as numeric(18,4)) as Bet ,isnull(sum(WinBonus),0) as Win,isnull(sum(num),0) as Num,isnull(sum(winnum),0) as WinNum,cast(round(CONVERT(float,isnull(sum(WinBonus),0))*100/CONVERT(float,isnull(sum(Total*Times),1)) ,4) as numeric(9,4)) as Per,isnull(sum(PointMoney),0) as Point,isnull(sum(-RealGet),0) as total"
            }), "N_UserBet", "PlayId", pageSize, num, "asc", text6, "PlayId");
            this.doh.Reset();
            this.doh.SqlCmd = text5;
            DataTable dataTable2 = this.doh.GetDataTable();

            this._response = string.Concat(new string[]
            {
                "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"",
                PageBar.GetPageBar(3, "js", 2, count, pageSize, num, "javascript:ajaxList(<#page#>);"),
                "\",",
                dtHelp.DT2JSON(dataTable2),
                "}"
            });
            dataTable2.Clear();
            dataTable2.Dispose();
        }