private string Get3DZu3MissCount()
 {
     string key = "Home_Room_Buy_Get3DZu3MissCount";
     DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key);
     if (cacheAsDataTable == null)
     {
         cacheAsDataTable = new Tables.T_Isuses().Open("top 40 WinLotteryNumber", "LotteryID = 6 and WinLotteryNumber <> '' and IsOpened = 1", "EndTime desc");
         if (cacheAsDataTable == null)
         {
             new Log("System").Write(base.GetType().FullName + "数据库繁忙,请重试(Get3DZu3MissCount)");
             return "";
         }
         Shove._Web.Cache.SetCache(key, cacheAsDataTable, 60);
     }
     int num = 0;
     for (int i = 0; i < cacheAsDataTable.Rows.Count; i++)
     {
         if (this.FilterRepeated(cacheAsDataTable.Rows[i]["WinLotteryNumber"].ToString()).Length == 2)
         {
             break;
         }
         num++;
     }
     return num.ToString();
 }
 private void Get3DBaoDianMiss()
 {
     string key = "Home_Room_Buy_Get3DBaoDianMiss";
     this.lbMiss.Text = Shove._Web.Cache.GetCacheAsString(key, "");
     this.lbMiss.Text = "";
     if (this.lbMiss.Text == "")
     {
         DataTable table = new Tables.T_Isuses().Open("EndTime,WinLotteryNumber", "LotteryID = 6 and GETDATE()>EndTime and ISNULL(WinLotteryNumber,'')<>'' and IsOpened=1", "EndTime asc");
         if (table == null)
         {
             new Log("System").Write(base.GetType().FullName + "数据库繁忙,请重试(Get3DBaoDianMiss)");
         }
         else
         {
             int[] numArray = new int[0x1c];
             int[] numArray2 = new int[] {
             0x3e8, 0x14d, 0xa7, 100, 0x43, 0x30, 0x24, 0x1c, 0x16, 0x12, 0x10, 14, 14, 13, 13, 14,
             14, 0x10, 0x12, 0x16, 0x1c, 0x24, 0x30, 0x43, 100, 0xa7, 0x14d, 0x3e8
          };
             foreach (DataRow row in table.Rows)
             {
                 string str2 = row["WinLotteryNumber"].ToString();
                 int num = 0;
                 if (str2.Length == 3)
                 {
                     for (int k = 0; k < str2.Length; k++)
                     {
                         num += _Convert.StrToInt(str2.Substring(k, 1), 0);
                     }
                     for (int m = 0; m < numArray.Length; m++)
                     {
                         if (m == num)
                         {
                             numArray[m] = 0;
                         }
                         else
                         {
                             numArray[m]++;
                         }
                     }
                 }
             }
             double num4 = 0.0;
             double num5 = 0.0;
             for (int i = 0; i < 0x1c; i++)
             {
                 num5 = _Convert.StrToDouble(numArray[i].ToString(), 0.0);
                 if ((num5 / ((double)numArray2[i])) >= num4)
                 {
                     num4 = num5 / ((double)numArray2[i]);
                 }
             }
             StringBuilder builder = new StringBuilder();
             int num7 = numArray.Length / 14;
             for (int j = 0; j < num7; j++)
             {
                 builder.Append(" <table border=\"0\" cellpadding=\"0\" cellspacing=\"4\">").Append("<tr>").Append("<td class='blue' width='80px' align='center'>").Append("本期遗漏").Append("</td>");
                 for (int n = j * 14; n < ((j + 1) * 14); n++)
                 {
                     if ((_Convert.StrToDouble(numArray[n].ToString(), 0.0) / ((double)numArray2[n])) >= num4)
                     {
                         builder.Append("<td class='red12'>");
                     }
                     else
                     {
                         builder.Append("<td class='hui12'>");
                     }
                     builder.Append(numArray[n].ToString()).Append("</td>");
                 }
                 builder.Append("</tr>").Append("<tr>").Append("<td class='blue' width='80px' align='center'>").Append("理论遗漏").Append("</td>");
                 for (int num10 = j * 14; num10 < ((j + 1) * 14); num10++)
                 {
                     if ((_Convert.StrToDouble(numArray[num10].ToString(), 0.0) / ((double)numArray2[num10])) >= num4)
                     {
                         builder.Append("<td class='red12'>");
                     }
                     else
                     {
                         builder.Append("<td class='hui12'>");
                     }
                     builder.Append(numArray2[num10].ToString()).Append("</td>");
                 }
                 builder.Append("</tr>").Append("</table>-");
             }
             this.lbMiss.Text = builder.ToString();
             Shove._Web.Cache.SetCache(key, this.lbMiss.Text, 600);
         }
     }
 }
 public string BindHotAndCoolAndMiss(int sscBuyType)
 {
     string key = "Lottery_Buy_CQSSC_BindHotAndCoolAndMiss";
     DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key);
     if (cacheAsDataTable == null)
     {
         cacheAsDataTable = new Tables.T_Isuses().Open("Top 100 WinLotteryNumber", "LotteryID=61 and IsOpened = 1 and WinLotteryNumber <> ''", "[EndTime] desc");
         Shove._Web.Cache.SetCache(key, cacheAsDataTable, 60);
     }
     string str2 = string.Empty;
     if (sscBuyType == 0)
     {
         int[] numArray = new int[] { 100, 100, 100, 100 };
         int[] numArray2 = new int[] { 100, 100, 100, 100 };
         for (int m = 0; m < cacheAsDataTable.Rows.Count; m++)
         {
             string str3 = cacheAsDataTable.Rows[m]["WinLotteryNumber"].ToString().Trim();
             if (str3.Length == 5)
             {
                 int num2 = int.Parse(str3.Substring(3, 1));
                 int num3 = int.Parse(str3.Substring(4, 1));
                 if (num2 > 4)
                 {
                     if (numArray[0] == 100)
                     {
                         numArray[0] = m;
                     }
                 }
                 else if (numArray[1] == 100)
                 {
                     numArray[1] = m;
                 }
                 if (num3 > 4)
                 {
                     if (numArray2[0] == 100)
                     {
                         numArray2[0] = m;
                     }
                 }
                 else if (numArray2[1] == 100)
                 {
                     numArray2[1] = m;
                 }
                 if ((num2 % 2) == 1)
                 {
                     if (numArray[2] == 100)
                     {
                         numArray[2] = m;
                     }
                 }
                 else if (numArray[3] == 100)
                 {
                     numArray[3] = m;
                 }
                 if ((num3 % 2) == 1)
                 {
                     if (numArray2[2] == 100)
                     {
                         numArray2[2] = m;
                     }
                 }
                 else if (numArray2[3] == 100)
                 {
                     numArray2[3] = m;
                 }
             }
         }
         return string.Concat(new object[] { numArray[0], ";", numArray[1], ";", numArray[2], ";", numArray[3], ";", numArray2[0], ";", numArray2[1], ";", numArray2[2], ";", numArray2[3] });
     }
     int[] numArray3 = new int[50];
     for (int i = 0; i < numArray3.Length; i++)
     {
         numArray3[i] = 100;
     }
     for (int j = 0; j < cacheAsDataTable.Rows.Count; j++)
     {
         string str4 = cacheAsDataTable.Rows[j]["WinLotteryNumber"].ToString().Trim();
         if (str4.Length == 5)
         {
             int num6 = int.Parse(str4.Substring(0, 1));
             int num7 = int.Parse(str4.Substring(1, 1));
             int num8 = int.Parse(str4.Substring(2, 1));
             int num9 = int.Parse(str4.Substring(3, 1));
             int num10 = int.Parse(str4.Substring(4, 1));
             for (int n = 0; n <= 9; n++)
             {
                 if ((num6 == n) && (numArray3[n] == 100))
                 {
                     numArray3[n] = j;
                 }
                 if ((num7 == n) && (numArray3[10 + n] == 100))
                 {
                     numArray3[10 + n] = j;
                 }
                 if ((num8 == n) && (numArray3[20 + n] == 100))
                 {
                     numArray3[20 + n] = j;
                 }
                 if ((num9 == n) && (numArray3[30 + n] == 100))
                 {
                     numArray3[30 + n] = j;
                 }
                 if ((num10 == n) && (numArray3[40 + n] == 100))
                 {
                     numArray3[40 + n] = j;
                 }
             }
         }
     }
     for (int k = 0; k < (sscBuyType * 10); k++)
     {
         if (k == ((sscBuyType * 10) - 1))
         {
             str2 = str2 + numArray3[((5 - sscBuyType) * 10) + k];
         }
         else
         {
             str2 = str2 + numArray3[((5 - sscBuyType) * 10) + k] + ";";
         }
     }
     return str2;
 }
 public static DataTable GetWinNumber(int LotteryID)
 {
     DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(WinNumber + LotteryID.ToString());
     if ((cacheAsDataTable == null) || (cacheAsDataTable.Rows.Count == 0))
     {
         cacheAsDataTable = new Tables.T_Isuses().Open("top 100 Name, WinLotteryNumber, EndTime", "LotteryID=" + LotteryID + " and IsOpened = 1 and IsNull(WinLotteryNumber,'')<>''", "EndTime Desc");
         if (cacheAsDataTable == null)
         {
             return cacheAsDataTable;
         }
         cacheAsDataTable.Columns.Add("ID", typeof(int));
         int num = 1;
         foreach (DataRow row in cacheAsDataTable.Rows)
         {
             row["ID"] = num;
             num++;
             row["WinLotteryNumber"] = FormatWinNumber(row["WinLotteryNumber"].ToString(), LotteryID);
         }
         Cache.SetCache(WinNumber + LotteryID.ToString(), cacheAsDataTable, ((LotteryID == 0x3e) || (LotteryID == 0x1d)) ? 120 : 0xe10);
     }
     return cacheAsDataTable;
 }
 private void GetSYYDJHotAndCool()
 {
     string key = "Home_Room_Buy_GetSYYDJHotAndCool";
     this.lbMiss.Text = Shove._Web.Cache.GetCacheAsString(key, "");
     if (this.lbMiss.Text == "")
     {
         DataTable table = new Tables.T_Isuses().Open("top 100 WinLotteryNumber", "LotteryID = 62 and GETDATE()>EndTime and ISNULL(WinLotteryNumber,'')<>'' and IsOpened=1", "EndTime desc");
         if (table == null)
         {
             new Log("System").Write(base.GetType().FullName + "数据库繁忙,请重试(GetSYYDJHotAndCool)");
         }
         else
         {
             int[,] sYYDJ = new int[5, 11];
             foreach (DataRow row in table.Rows)
             {
                 string[] strArray = row["WinLotteryNumber"].ToString().Split(new char[] { ' ' });
                 if (strArray.Length == 5)
                 {
                     for (int i = 0; i < strArray.Length; i++)
                     {
                         int num2 = _Convert.StrToInt(strArray[i], 0);
                         sYYDJ[i, num2 - 1]++;
                     }
                 }
             }
             this.lbMiss.Text = this.GetRenXuan(sYYDJ) + "|" + this.GetQuanXuan(2, sYYDJ) + "|" + this.GetQuanXuan(3, sYYDJ);
             Shove._Web.Cache.SetCache(key, this.lbMiss.Text, 120);
         }
     }
 }
 private void GetSZPL3Miss()
 {
     string key = "Home_Room_Buy_GetSZPL3Miss";
     this.lbMiss.Text = Shove._Web.Cache.GetCacheAsString(key, "");
     if (this.lbMiss.Text == "")
     {
         DataTable table = new Tables.T_Isuses().Open("top 100 EndTime,WinLotteryNumber", "LotteryID = 63 and GETDATE()>EndTime and ISNULL(WinLotteryNumber,'')<>'' and IsOpened=1", "EndTime desc");
         if (table == null)
         {
             new Log("System").Write(base.GetType().FullName + "数据库繁忙,请重试(GetSZPL3Miss)");
         }
         else
         {
             int[,] numArray = new int[3, 10];
             int num = 0;
             foreach (DataRow row in table.Select("", "EndTime asc"))
             {
                 string str2 = row["WinLotteryNumber"].ToString();
                 if (str2.Length == 3)
                 {
                     for (int i = 0; i < str2.Length; i++)
                     {
                         int num4 = _Convert.StrToInt(str2.Substring(i, 1), 0);
                         for (int j = 0; j < 10; j++)
                         {
                             if (j == num4)
                             {
                                 numArray[i, j] = 0;
                             }
                             else
                             {
                                 numArray[i, j]++;
                             }
                         }
                     }
                 }
             }
             foreach (DataRow row2 in table.Select("1=1", "EndTime desc"))
             {
                 if (this.FilterRepeated(row2["WinLotteryNumber"].ToString()).Length == 2)
                 {
                     break;
                 }
                 num++;
             }
             this.lbMiss.Text = this.GetSZPL3Miss(numArray) + "|" + num.ToString();
             Shove._Web.Cache.SetCache(key, this.lbMiss.Text, 600);
         }
     }
 }