Example #1
0
    private void GoBuy(long BuyID)
    {
        DataTable table = new Tables.T_AlipayBuyTemp().Open("", "ID=" + BuyID.ToString(), "");
        if ((table != null) && (table.Rows.Count == 1))
        {
            string str = table.Rows[0]["LotteryID"].ToString();
            string str2 = table.Rows[0]["Number"].ToString();
            switch (str)
            {
                case "29":
                    this.Url = "../Buy_SSL.aspx?BuyID=" + BuyID.ToString();
                    break;

                case "62":
                    this.Url = "../Buy_SYYDJ.aspx?BuyID=" + BuyID.ToString();
                    break;

                case "61":
                    this.Url = "../Buy_SSC.aspx?BuyID=" + BuyID.ToString();
                    break;

                case "1":
                case "2":
                case "15":
                    this.Url = "../Buy_ZC.aspx?LotteryID=" + str + "&Number=" + str2 + "&BuyID=" + BuyID.ToString();
                    break;

                default:
                    this.Url = "../Buy.aspx?LotteryID=" + str + "&BuyID=" + BuyID.ToString();
                    break;
            }
            this.HidScript.Value = "window.setInterval('DisplayTimer()', 1000);";
        }
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        BuyID = Shove._Convert.StrToLong(Shove._Web.Utility.GetRequest("BuyID"), 0);

        if (_User != null)
        {
            Balance = _User.Balance.ToString();
            UserName = _User.Name.ToString();
        }

        int OnlinePayType = Shove._Web.WebConfig.GetAppSettingsInt("OnlinePayType", 2);

        if (OnlinePayType == 1)
        {
            Response.Redirect("../Alipay01/Default.aspx", true);

            return;
        }

        if (BuyID > 0)
        {
            DataTable dt = new DAL.Tables.T_AlipayBuyTemp().Open("", "ID=" + BuyID.ToString(), "");

            if (dt == null)
            {
                return;
            }

            double Money = Shove._Convert.StrToDouble(dt.Rows[0]["Money"].ToString(), 0);

            if (_User != null)
            {
                if (_User.Balance < Money)
                {
                    PayMoney.Text = (Money - _User.Balance).ToString();
                }
            }
            else
            {
                PayMoney.Text = Money.ToString();
            }
        }
    }
Example #3
0
    private void GoBuy(long BuyID)
    {
        DataTable dtBuy = new DAL.Tables.T_AlipayBuyTemp().Open("", "ID=" + BuyID.ToString(), "");

        if (dtBuy != null && dtBuy.Rows.Count == 1)
        {
            string LotteryID = dtBuy.Rows[0]["LotteryID"].ToString();
            string Number = dtBuy.Rows[0]["Number"].ToString();

            if (LotteryID.Equals("72"))
            {
                Url = "/JCZC/BuyConfirm.aspx?BuyID=" + BuyID.ToString();
            }
            else
            {
                Url = "/Lottery/" + DataCache.LotterieBuyPage[Shove._Convert.StrToInt(LotteryID, 74)] + "?BuyID=" + BuyID.ToString();
            }

            HidBuyID.Value = "1";
        }
    }
Example #4
0
    /// <summary>
    /// 充值成功后,绑定数据
    /// </summary>
    /// <param name="BuyID"></param>
    private void BindDataForAliBuy(long BuyID)
    {
        DataTable dt = new DAL.Tables.T_AlipayBuyTemp().Open("", "ID=" + BuyID.ToString(), "");

        if (dt == null || dt.Rows.Count == 0)
        {
            return;
        }

        DataRow dr = dt.Rows[0];

        string HidIsuseID = dr["IsuseID"].ToString();
        string playType = dr["PlayTypeID"].ToString();
        bool IsChase = Shove._Convert.StrToBool(dr["IsChase"].ToString(), false);
        bool IsCoBuy = Shove._Convert.StrToBool(dr["IsCoBuy"].ToString(), false);
        string tb_Share = dr["Share"].ToString();
        string tb_BuyShare = dr["BuyShare"].ToString();
        string tb_AssureShare = dr["AssureShare"].ToString();
        string tb_OpenUserList = dr["OpenUsers"].ToString();
        string tb_Title = dr["Title"].ToString();
        string tb_Description = dr["Description"].ToString();
        string tbAutoStopAtWinMoney = dr["StopwhenwinMoney"].ToString();
        string tbSecrecyLevel = dr["SecrecyLevel"].ToString();
        string tb_LotteryNumber = dr["LotteryNumber"].ToString();
        string tb_hide_SumMoney = dr["SumMoney"].ToString();
        string tb_hide_AssureMoney = dr["AssureMoney"].ToString();
        string HidLotteryID = dr["LotteryID"].ToString();
        string tb_Multiple = dr["Multiple"].ToString();
        string AdditionasXml = dr["AdditionasXml"].ToString();

        if (tb_Multiple == "")
        {
            tb_Multiple = "1";
        }

        double SumMoney = 0;
        int Share = 0;
        int BuyShare = 0;
        double AssureMoney = 0;
        int Multiple = 0;
        short SecrecyLevel = 0;
        int PlayTypeID = 0;
        int LotteryID = 0;
        long IsuseID = 0;
        double AutoStopAtWinMoney = 0;

        try
        {
            SumMoney = double.Parse(tb_hide_SumMoney);
            Share = int.Parse(tb_Share);
            BuyShare = int.Parse(tb_BuyShare);
            AssureMoney = double.Parse(tb_hide_AssureMoney);
            Multiple = int.Parse(tb_Multiple);
            SecrecyLevel = short.Parse(tbSecrecyLevel);
            PlayTypeID = int.Parse(playType);
            LotteryID = int.Parse(HidLotteryID);
            IsuseID = long.Parse(HidIsuseID);
            AutoStopAtWinMoney = double.Parse(tbAutoStopAtWinMoney);
        }
        catch { }

        if ((BuyShare == Share) && (AssureMoney == 0))
        {
            Share = 1;
            BuyShare = 1;
        }

        double BuyMoney = BuyShare * (SumMoney / Share) + AssureMoney;

        if (IsChase)
        {
            BuyMoney = double.Parse(tb_hide_SumMoney);
        }

        string LotteryNumber = tb_LotteryNumber;

        if (LotteryNumber[LotteryNumber.Length - 1] == '\n')
        {
            LotteryNumber = LotteryNumber.Substring(0, LotteryNumber.Length - 1);
        }

        StringBuilder sb = new StringBuilder();

        sb.AppendLine("<script type='text/javascript' defer='defer'>");

        sb.Append("$Id('playType").Append(PlayTypeID.ToString()).AppendLine("').checked = true;");
        sb.AppendLine("clickPlayType('" + PlayTypeID.ToString() + "');");
        sb.AppendLine("function BindDataForFromAli(){");

        //追号
        if (IsChase)
        {
            XmlDocument xml = new XmlDocument();
            xml.LoadXml(AdditionasXml);
            XmlNodeList xnl = xml.ChildNodes[0].ChildNodes;

            foreach (XmlNode xn in xnl)
            {
                sb.Append("$Id('times").Append(xn.Attributes["IsuseID"].Value).Append("').value = '").Append(xn.Attributes["Multiple"].Value).AppendLine("';");
                sb.Append("$Id('money").Append(xn.Attributes["IsuseID"].Value).Append("').value = '").Append(xn.Attributes["Money"].Value).AppendLine("';");
                sb.Append("$Id('check").Append(xn.Attributes["IsuseID"].Value).AppendLine("').checked = true;");
                sb.Append("$Id('times").Append(xn.Attributes["IsuseID"].Value).AppendLine("').disabled = '';");
            }
        }

        LotteryNumber = LotteryNumber.Replace("\r", "");
        int LotteryNum = 0;
        string Number = "";
        foreach (string lotteryNumber in LotteryNumber.Split('\n'))
        {
            LotteryNum += new SLS.Lottery()[LotteryID].ToSingle(lotteryNumber, ref Number, PlayTypeID).Length;
            sb.AppendLine("var option = document.createElement('option');");
            sb.AppendLine("$Id('list_LotteryNumber').options.add(option);");
            sb.Append("option.innerText = '").Append(lotteryNumber).AppendLine("';");
            sb.Append("option.value = '").Append(lotteryNumber).AppendLine("';");
        }

        if (IsChase)
        {
            sb.AppendLine("$Id('Chase').checked = true;");
            sb.AppendLine("oncbInitiateTypeClick($Id('Chase'));");
        }

        if (IsCoBuy)
        {
            sb.AppendLine("$Id('CoBuy').checked = true;");
            sb.AppendLine("oncbInitiateTypeClick($Id('CoBuy'));");
        }

        sb.Append("$Id('tb_LotteryNumber').value = '").Append(tb_LotteryNumber.Replace("\r", "\\r").Replace("\n", "\\n")).AppendLine("';");
        sb.Append("$Id('tb_Share').value = '").Append(tb_Share).AppendLine("';");
        sb.Append("$Id('tb_BuyShare').value = '").Append(tb_BuyShare).AppendLine("';");
        sb.Append("$Id('tb_AssureShare').value = '").Append(tb_AssureShare).AppendLine("';");
        sb.Append("$Id('tb_OpenUserList').value = '").Append(tb_OpenUserList).AppendLine("';");
        sb.Append("$Id('tb_Title').value = '").Append(tb_Title).AppendLine("';");
        sb.Append("$Id('tb_Description').value = '").Append(tb_Description.Replace("\r", "\\r").Replace("\n", "\\n")).AppendLine("';");
        sb.Append("$Id('tbAutoStopAtWinMoney').value = '").Append(tbAutoStopAtWinMoney).AppendLine("';");
        sb.Append("$Id('SecrecyLevel").Append(SecrecyLevel.ToString()).AppendLine("').checked = true;");
        sb.Append("$Id('tb_hide_SumMoney').value = '").Append(tb_hide_SumMoney).AppendLine("';");
        sb.Append("$Id('tb_hide_AssureMoney').value = '").Append(AssureMoney.ToString("N0")).AppendLine("';");
        sb.Append("$Id('tb_Multiple').value = '").Append(Multiple.ToString()).AppendLine("';");
        sb.Append("$Id('lab_AssureMoney').innerText = '").Append(AssureMoney.ToString("N0")).AppendLine("';");
        sb.Append("$Id('lab_SumMoney').innerText = '").Append(SumMoney.ToString("N0")).AppendLine("';");
        sb.Append("$Id('LbSumMoney').innerText = '").Append(SumMoney.ToString("N0")).AppendLine("';");
        sb.Append("$Id('lab_Num').innerText = '").Append(LotteryNum.ToString()).AppendLine("';");
        sb.AppendLine("CalcResult();");
        sb.AppendLine("}");
        sb.AppendLine("</script>");

        script = sb.ToString();
    }
Example #5
0
    /// <summary>
    /// 余额不足时,保存数据
    /// </summary>
    private void SaveDataForAliBuy()
    {
        string HidIsuseID = Shove._Web.Utility.GetRequest("HidIsuseID");
        string HidIsuseEndTime = Shove._Web.Utility.GetRequest("HidIsuseEndTime");
        string playType = Shove._Web.Utility.GetRequest("tbPlayTypeID");
        string Chase = Shove._Web.Utility.GetRequest("Chase");
        string Cobuy = Shove._Web.Utility.GetRequest("Cobuy");
        string tb_Share = Shove._Web.Utility.GetRequest("tb_Share");
        string tb_BuyShare = Shove._Web.Utility.GetRequest("tb_BuyShare");
        string tb_AssureShare = Shove._Web.Utility.GetRequest("tb_AssureShare");
        string tb_OpenUserList = Shove._Web.Utility.GetRequest("tb_OpenUserList");
        string tb_Title = Shove._Web.Utility.GetRequest("tb_Title");
        string tb_Description = Shove._Web.Utility.GetRequest("tb_Description");
        string tbAutoStopAtWinMoney = Shove._Web.Utility.GetRequest("tbAutoStopAtWinMoney");
        string tbSecrecyLevel = Shove._Web.Utility.GetRequest("SecrecyLevel");
        string tbPlayTypeName = Shove._Web.Utility.GetRequest("tbPlayTypeName");
        string tb_LotteryNumber = Shove._Web.Utility.FilteSqlInfusion(Request["tb_LotteryNumber"]);
        string tb_hide_SumMoney = Shove._Web.Utility.GetRequest("tb_hide_SumMoney");
        string tb_hide_AssureMoney = Shove._Web.Utility.GetRequest("tb_hide_AssureMoney");
        string tb_hide_SumNum = Shove._Web.Utility.GetRequest("tb_hide_SumNum");
        string HidIsuseCount = Shove._Web.Utility.GetRequest("HidIsuseCount");
        string HidLotteryID = Shove._Web.Utility.GetRequest("HidLotteryID");
        string HidIsAlipay = Shove._Web.Utility.GetRequest("HidIsAlipay");
        string tb_Multiple = Shove._Web.Utility.GetRequest("tb_Multiple");
        string AdditionasXml = "";
        StringBuilder ChaseXML = new StringBuilder();
        int RpTodayDataCount = 0;

        int Price = 2;

        if ((playType == "3903") || (playType == "3904"))
        {
            Price = 3;
        }
        else
        {
            Price = 2;
        }
        // 结束

        if (tb_Multiple == "")
        {
            tb_Multiple = "1";
        }

        if (Chase == "1")
        {
            foreach (string key in Request.Form.AllKeys)
            {
                if (key.IndexOf("check") > -1)
                {
                    int row = Shove._Convert.StrToInt(key.Replace("check", ""), -1);
                    if (row > 0)
                    {
                        RpTodayDataCount++;
                        int money = Shove._Convert.StrToInt(tb_hide_SumNum, -1) * Price * Shove._Convert.StrToInt(Request.Form["times" + row.ToString()], -1);
                        ChaseXML.Append(Request.Form[key]).Append(",")
                            .Append(Request.Form["times" + row.ToString()]).Append(",")
                            .Append(money.ToString()).Append(";");
                    }
                }
            }

            string LotteryNumber = tb_LotteryNumber;

            if (ChaseXML.Length > 0)
            {
                ChaseXML.Remove(ChaseXML.Length - 1, 1);
            }

            if (LotteryNumber[LotteryNumber.Length - 1] == '\n')
            {
                LotteryNumber = LotteryNumber.Substring(0, LotteryNumber.Length - 1);
            }

            string[] XML = ChaseXML.ToString().Split(';');
            int CompetitionCount = XML.Length;

            string[] Xmlparams = new string[CompetitionCount * 6];

            string str_EndTime = DAL.Functions.F_GetIsuseSystemEndTime(long.Parse(XML[0].Split(',')[0]), int.Parse(playType)).ToString();
            DateTime EndTime = DateTime.Parse(str_EndTime);

            if (DateTime.Now >= EndTime)
            {
                Shove._Web.JavaScript.Alert(this.Page, "您选择的追号期号中包含已截止的期,请重新选择。");

                return;
            }

            //构建格式:期号,玩法类别,方案,倍数,金额,方案保密级别
            for (int i = 0; i < CompetitionCount; i++)
            {
                Xmlparams[i * 6] = XML[i].Split(',')[0];        //期号
                Xmlparams[i * 6 + 1] = playType;   //玩法类别
                Xmlparams[i * 6 + 2] = LotteryNumber;           //方案
                Xmlparams[i * 6 + 3] = XML[i].Split(',')[1];    //倍数
                Xmlparams[i * 6 + 4] = XML[i].Split(',')[2];    //金额
                Xmlparams[i * 6 + 5] = tbSecrecyLevel;
            }

            AdditionasXml = PF.BuildIsuseAdditionasXmlForChase(Xmlparams);
        }

        DAL.Tables.T_AlipayBuyTemp tbp = new DAL.Tables.T_AlipayBuyTemp();

        tbp.SiteID.Value = 1;
        tbp.UserID.Value = -1;
        tbp.Money.Value = tb_hide_SumMoney;
        tbp.HandleResult.Value = 0;
        tbp.IsChase.Value = Chase == "1";
        tbp.IsCoBuy.Value = Cobuy == "2";
        tbp.LotteryID.Value = HidLotteryID;
        tbp.IsuseID.Value = HidIsuseID;
        tbp.PlayTypeID.Value = playType;
        tbp.StopwhenwinMoney.Value = tbAutoStopAtWinMoney;
        tbp.AdditionasXml.Value = AdditionasXml;
        tbp.Title.Value = tb_Title;
        tbp.Description.Value = tb_Description;
        tbp.LotteryNumber.Value = tb_LotteryNumber;
        tbp.UpdateloadFileContent.Value = "";
        tbp.Multiple.Value = tb_Multiple;
        tbp.BuyMoney.Value = tb_BuyShare;
        tbp.SumMoney.Value = tb_hide_SumMoney;
        tbp.AssureMoney.Value = tb_hide_AssureMoney;
        tbp.Share.Value = tb_Share;
        tbp.BuyShare.Value = tb_BuyShare;
        tbp.AssureShare.Value = tb_AssureShare;
        tbp.OpenUsers.Value = tb_OpenUserList;
        tbp.SecrecyLevel.Value = tbSecrecyLevel;

        long Result = tbp.Insert();

        if (Result < 0)
        {
            new Log("System").Write("T_AlipayBuyTemp 数据库读写错误。");
        }

        Shove._Web.JavaScript.Alert(this.Page, "您的账户余额不足,请先充值,谢谢。", "../Home/Room/OnlinePay/Default.aspx?BuyID=" + Result.ToString());
    }
 private void SaveDataForAliBuy()
 {
     string request = Shove._Web.Utility.GetRequest("HidIsuseID");
     Shove._Web.Utility.GetRequest("HidIsuseEndTime");
     string str2 = Shove._Web.Utility.GetRequest("playType");
     string str3 = Shove._Web.Utility.GetRequest("Cobuy");
     string str4 = Shove._Web.Utility.GetRequest("tb_Share");
     string str5 = Shove._Web.Utility.GetRequest("tb_BuyShare");
     string str6 = Shove._Web.Utility.GetRequest("tb_AssureShare");
     string str7 = Shove._Web.Utility.GetRequest("tb_OpenUserList");
     string str8 = Shove._Web.Utility.GetRequest("tb_Title");
     string str9 = Shove._Web.Utility.GetRequest("tb_Description");
     string str10 = Shove._Web.Utility.GetRequest("SecrecyLevel");
     string str11 = Shove._Web.Utility.FilteSqlInfusion(base.Request["tb_LotteryNumber"]);
     string str12 = Shove._Web.Utility.GetRequest("tb_hide_SumMoney");
     string str13 = Shove._Web.Utility.GetRequest("tb_hide_AssureMoney");
     Shove._Web.Utility.GetRequest("tb_hide_SumNum");
     string str14 = Shove._Web.Utility.GetRequest("HidLotteryID");
     string str15 = Shove._Web.Utility.GetRequest("tb_Multiple");
     string str16 = Shove._Web.Utility.GetRequest("tbPlayTypeID");
     string str17 = Shove._Web.Utility.GetRequest("tb_SchemeMoney");
     if (str15 == "")
     {
         str15 = "1";
     }
     Tables.T_AlipayBuyTemp temp = new Tables.T_AlipayBuyTemp
     {
         SiteID = { Value = 1 },
         UserID = { Value = -1 }
     };
     if (str16 == str2)
     {
         temp.Money.Value = str12;
     }
     else
     {
         temp.Money.Value = str17;
     }
     temp.HandleResult.Value = 0;
     temp.IsCoBuy.Value = str3 == "2";
     temp.LotteryID.Value = str14;
     temp.IsuseID.Value = request;
     temp.PlayTypeID.Value = str2;
     temp.Title.Value = str8;
     temp.Description.Value = str9;
     temp.LotteryNumber.Value = str11;
     temp.UpdateloadFileContent.Value = "";
     temp.Multiple.Value = str15;
     temp.BuyMoney.Value = str5;
     temp.SumMoney.Value = str12;
     temp.AssureMoney.Value = str13;
     temp.Share.Value = str4;
     temp.BuyShare.Value = str5;
     temp.AssureShare.Value = str6;
     temp.OpenUsers.Value = str7;
     temp.SecrecyLevel.Value = str10;
     temp.Number.Value = this.Number;
     long num = temp.Insert();
     if (num < 0L)
     {
         new Log("System").Write("T_AlipayBuyTemp 数据库读写错误。");
     }
     JavaScript.Alert(this.Page, "您的账户余额不足,请先充值,谢谢。", "../Home/Room/OnlinePay/Default.aspx?BuyID=" + num.ToString());
 }
 private void BindDataForAliBuy(long BuyID)
 {
     DataTable table = new Tables.T_AlipayBuyTemp().Open("", "ID=" + BuyID.ToString(), "");
     if ((table != null) && (table.Rows.Count != 0))
     {
         DataRow row = table.Rows[0];
         string s = row["IsuseID"].ToString();
         string str2 = row["PlayTypeID"].ToString();
         bool flag = _Convert.StrToBool(row["IsCoBuy"].ToString(), false);
         string str3 = row["Share"].ToString();
         string str4 = row["BuyShare"].ToString();
         string str5 = row["AssureShare"].ToString();
         string str6 = row["OpenUsers"].ToString();
         string str7 = row["Title"].ToString();
         string str8 = row["Description"].ToString();
         string str9 = row["SecrecyLevel"].ToString();
         string str10 = row["LotteryNumber"].ToString();
         string str11 = row["SumMoney"].ToString();
         string str12 = row["AssureMoney"].ToString();
         string str13 = row["LotteryID"].ToString();
         string str14 = row["Multiple"].ToString();
         if (str14 == "")
         {
             str14 = "1";
         }
         double num = 0.0;
         int num2 = 0;
         int num3 = 0;
         double num4 = 0.0;
         int num5 = 0;
         short num6 = 0;
         int playType = 0;
         int num8 = 0;
         try
         {
             num = double.Parse(str11);
             num2 = int.Parse(str3);
             num3 = int.Parse(str4);
             num4 = double.Parse(str12);
             num5 = int.Parse(str14);
             num6 = short.Parse(str9);
             playType = int.Parse(str2);
             num8 = int.Parse(str13);
             long.Parse(s);
         }
         catch
         {
         }
         if ((num3 == num2) && (num4 == 0.0))
         {
             num2 = 1;
             num3 = 1;
         }
         double num1 = num / ((double)num2);
         string str15 = str10;
         if (!string.IsNullOrEmpty(str15) && (str15[str15.Length - 1] == '\n'))
         {
             str15 = str15.Substring(0, str15.Length - 1);
         }
         StringBuilder builder = new StringBuilder();
         builder.AppendLine("<script type='text/javascript' defer='defer'>");
         builder.Append("$Id('playType").Append(playType.ToString()).AppendLine("').checked = true;");
         builder.AppendLine("clickPlayType('" + playType.ToString() + "');");
         builder.AppendLine("function BindDataForFromAli(){");
         str15 = str15.Replace("\r", "");
         int num9 = 0;
         string canonicalNumber = "";
         foreach (string str17 in str15.Split(new char[] { '\n' }))
         {
             if (!string.IsNullOrEmpty(str17))
             {
                 num9 += new Lottery()[num8].ToSingle(str17, ref canonicalNumber, playType).Length;
                 builder.AppendLine("var option = document.createElement('option');");
                 builder.AppendLine("$Id('list_LotteryNumber').options.add(option);");
                 builder.Append("option.innerText = '").Append(str17).AppendLine("';");
                 builder.Append("option.value = '").Append(str17).AppendLine("';");
             }
         }
         if (flag)
         {
             builder.AppendLine("$Id('CoBuy').checked = true;");
             builder.AppendLine("oncbInitiateTypeClick();");
         }
         builder.Append("$Id('tb_LotteryNumber').value = '").Append(str10.Replace("\r", @"\r").Replace("\n", @"\n")).AppendLine("';");
         builder.Append("$Id('tb_Share').value = '").Append(str3).AppendLine("';");
         builder.Append("$Id('tb_BuyShare').value = '").Append(str4).AppendLine("';");
         builder.Append("$Id('tb_AssureShare').value = '").Append(str5).AppendLine("';");
         builder.Append("$Id('tb_OpenUserList').value = '").Append(str6).AppendLine("';");
         builder.Append("$Id('tb_Title').value = '").Append(str7).AppendLine("';");
         builder.Append("$Id('tb_Description').value = '").Append(str8.Replace("\r", @"\r").Replace("\n", @"\n")).AppendLine("';");
         builder.Append("$Id('SecrecyLevel").Append(num6.ToString()).AppendLine("').checked = true;");
         builder.Append("$Id('tb_hide_SumMoney').value = '").Append(str11).AppendLine("';");
         builder.Append("$Id('tb_hide_AssureMoney').value = '").Append(num4.ToString("N0")).AppendLine("';");
         builder.Append("$Id('tb_Multiple').value = '").Append(num5.ToString()).AppendLine("';");
         builder.Append("$Id('lab_AssureMoney').innerText = '").Append(num4.ToString("N0")).AppendLine("';");
         builder.Append("$Id('lab_SumMoney').innerText = '").Append(num.ToString("N0")).AppendLine("';");
         builder.Append("$Id('lab_Num').innerText = '").Append(num9.ToString()).AppendLine("';");
         builder.Append("$Id('tb_SchemeMoney').value = '").Append(num.ToString()).AppendLine("';");
         builder.AppendLine("CalcResult();");
         builder.AppendLine("}");
         if (str2.Length != (num8.ToString().Length + 2))
         {
             builder.AppendLine("BindDataForFromAli()");
         }
         builder.AppendLine("</script>");
         this.script = builder.ToString();
     }
 }
Example #8
0
    /// <summary>
    /// 余额不足时,保存数据
    /// </summary>
    private void SaveDataForAliBuy()
    {
        string HidIsuseID = Shove._Web.Utility.GetRequest("HidIsuseID");
        string HidIsuseEndTime = Shove._Web.Utility.GetRequest("HidIsuseEndTime");
        string playType = Shove._Web.Utility.GetRequest("playType");
        string Cobuy = Shove._Web.Utility.GetRequest("Cobuy");
        string tb_Share = Shove._Web.Utility.GetRequest("tb_Share");
        string tb_BuyShare = Shove._Web.Utility.GetRequest("tb_BuyShare");
        string tb_AssureShare = Shove._Web.Utility.GetRequest("tb_AssureShare");
        string tb_OpenUserList = Shove._Web.Utility.GetRequest("tb_OpenUserList");
        string tb_Title = Shove._Web.Utility.GetRequest("tb_Title");
        string tb_Description = Shove._Web.Utility.GetRequest("tb_Description");
        string tbSecrecyLevel = Shove._Web.Utility.GetRequest("SecrecyLevel");
        string tb_LotteryNumber = Shove._Web.Utility.FilteSqlInfusion(Request["tb_LotteryNumber"]);
        string tb_hide_SumMoney = Shove._Web.Utility.GetRequest("tb_hide_SumMoney");
        string tb_hide_AssureMoney = Shove._Web.Utility.GetRequest("tb_hide_AssureMoney");
        string tb_hide_SumNum = Shove._Web.Utility.GetRequest("tb_hide_SumNum");
        string HidLotteryID = Shove._Web.Utility.GetRequest("HidLotteryID");
        string tb_Multiple = Shove._Web.Utility.GetRequest("tb_Multiple");
        string playTypeID = Shove._Web.Utility.GetRequest("tbPlayTypeID");
        string tb_SumMoney = Shove._Web.Utility.GetRequest("tb_SchemeMoney");

        if (tb_Multiple == "")
        {
            tb_Multiple = "1";
        }

        DAL.Tables.T_AlipayBuyTemp tbp = new DAL.Tables.T_AlipayBuyTemp();

        tbp.SiteID.Value = 1;
        tbp.UserID.Value = -1;
        if (playTypeID == playType)
        {
            tbp.Money.Value = tb_hide_SumMoney;
        }
        else
        {
            tbp.Money.Value = tb_SumMoney;
        }

        tbp.HandleResult.Value = 0;
        tbp.IsCoBuy.Value = Cobuy == "2";
        tbp.LotteryID.Value = HidLotteryID;
        tbp.IsuseID.Value = HidIsuseID;
        tbp.PlayTypeID.Value = playType;
        tbp.Title.Value = tb_Title;
        tbp.Description.Value = tb_Description;
        tbp.LotteryNumber.Value = tb_LotteryNumber;
        tbp.UpdateloadFileContent.Value = "";
        tbp.Multiple.Value = tb_Multiple;
        tbp.BuyMoney.Value = tb_BuyShare;
        tbp.SumMoney.Value = tb_hide_SumMoney;
        tbp.AssureMoney.Value = tb_hide_AssureMoney;
        tbp.Share.Value = tb_Share;
        tbp.BuyShare.Value = tb_BuyShare;
        tbp.AssureShare.Value = tb_AssureShare;
        tbp.OpenUsers.Value = tb_OpenUserList;
        tbp.SecrecyLevel.Value = tbSecrecyLevel;
        tbp.Number.Value = Number;

        long Result = tbp.Insert();

        if (Result < 0)
        {
            new Log("System").Write("T_AlipayBuyTemp 数据库读写错误。");
        }

        Shove._Web.JavaScript.Alert(this.Page, "您的账户余额不足,请先充值,谢谢。", "../Home/Room/OnlinePay/Default.aspx?BuyID=" + Result.ToString());
    }
Example #9
0
 private void BindDataForAliBuy(long BuyID)
 {
     DataTable table = new Tables.T_AlipayBuyTemp().Open("", "ID=" + BuyID.ToString(), "");
     if ((table != null) && (table.Rows.Count != 0))
     {
         DataRow row = table.Rows[0];
         string s = row["IsuseID"].ToString();
         string str2 = row["PlayTypeID"].ToString();
         bool flag = _Convert.StrToBool(row["IsChase"].ToString(), false);
         bool flag2 = _Convert.StrToBool(row["IsCoBuy"].ToString(), false);
         string str3 = row["Share"].ToString();
         string str4 = row["BuyShare"].ToString();
         string str5 = row["AssureShare"].ToString();
         string str6 = row["OpenUsers"].ToString();
         string str7 = row["Title"].ToString();
         string str8 = row["Description"].ToString();
         string str9 = row["StopwhenwinMoney"].ToString();
         string str10 = row["SecrecyLevel"].ToString();
         string str11 = row["LotteryNumber"].ToString();
         string str12 = row["SumMoney"].ToString();
         string str13 = row["AssureMoney"].ToString();
         string str14 = row["LotteryID"].ToString();
         string str15 = row["Multiple"].ToString();
         string xml = row["AdditionasXml"].ToString();
         if (str15 == "")
         {
             str15 = "1";
         }
         double num = 0.0;
         int num2 = 0;
         int num3 = 0;
         double num4 = 0.0;
         int num5 = 0;
         short num6 = 0;
         int playType = 0;
         int num8 = 0;
         try
         {
             num = double.Parse(str12);
             num2 = int.Parse(str3);
             num3 = int.Parse(str4);
             num4 = double.Parse(str13);
             num5 = int.Parse(str15);
             num6 = short.Parse(str10);
             playType = int.Parse(str2);
             num8 = int.Parse(str14);
             long.Parse(s);
             double.Parse(str9);
         }
         catch
         {
         }
         if ((num3 == num2) && (num4 == 0.0))
         {
             num2 = 1;
             num3 = 1;
         }
         double num1 = num / ((double)num2);
         if (flag)
         {
             double.Parse(str12);
         }
         string str17 = str11;
         if (str17[str17.Length - 1] == '\n')
         {
             str17 = str17.Substring(0, str17.Length - 1);
         }
         StringBuilder builder = new StringBuilder();
         builder.AppendLine("<script type='text/javascript' defer='defer'>");
         if (num8 == 0x3f)
         {
             builder.AppendLine("function clickPlayClass(i,obj)").AppendLine("{").AppendLine("var tds = obj.offsetParent.rows[0].cells;").AppendLine("for(var a=0; a<tds.length-1; a++)").AppendLine("{").AppendLine("if(a%2==1)").AppendLine("{").AppendLine("tds[a].className = 'nsplay';").AppendLine("}").AppendLine("if($Id('playTypes' + String(a))!=null)").AppendLine("{").AppendLine("$Id('playTypes' + String(a)).style.display = 'none';").AppendLine("}").AppendLine("}").AppendLine("var pt = $Id('playTypes' + String(i));").AppendLine("pt.style.display = '';");
             builder.AppendLine("$Id('playTypes').style.display = ((i == 1 || i == 2 || i == 3) ? 'none':'');");
             builder.AppendLine("obj.className = 'msplay';").AppendLine("}");
             builder.Append("var playclass =").Append("$Id('playType").Append(playType.ToString()).AppendLine("').parentNode.id.substr(9,1);");
             builder.Append("clickPlayClass(playclass,").Append("$Id('tbPlayTypeMenu").Append(num8.ToString()).AppendLine("').rows[0].cells[playclass*2+1]);");
         }
         builder.Append("$Id('playType").Append(playType.ToString()).AppendLine("').checked = true;");
         builder.AppendLine("clickPlayType('" + playType.ToString() + "');");
         builder.AppendLine("function BindDataForFromAli(){");
         if (flag)
         {
             XmlDocument document = new XmlDocument();
             document.LoadXml(xml);
             foreach (XmlNode node in document.ChildNodes[0].ChildNodes)
             {
                 builder.Append("$Id('times").Append(node.Attributes["IsuseID"].Value).Append("').value = '").Append(node.Attributes["Multiple"].Value).AppendLine("';");
                 builder.Append("$Id('money").Append(node.Attributes["IsuseID"].Value).Append("').value = '").Append(node.Attributes["Money"].Value).AppendLine("';");
                 builder.Append("$Id('check").Append(node.Attributes["IsuseID"].Value).AppendLine("').checked = true;");
                 builder.Append("$Id('times").Append(node.Attributes["IsuseID"].Value).AppendLine("').disabled = '';");
             }
         }
         str17 = str17.Replace("\r", "");
         int num9 = 0;
         string canonicalNumber = "";
         foreach (string str19 in str17.Split(new char[] { '\n' }))
         {
             num9 += new Lottery()[num8].ToSingle(str19, ref canonicalNumber, playType).Length;
             builder.AppendLine("var option = document.createElement('option');");
             builder.AppendLine("$Id('list_LotteryNumber').options.add(option);");
             builder.Append("option.innerText = '").Append(str19).AppendLine("';");
             builder.Append("option.value = '").Append(str19).AppendLine("';");
         }
         if (flag)
         {
             builder.AppendLine("$Id('Chase').checked = true;");
             builder.AppendLine("oncbInitiateTypeClick($Id('Chase'));");
         }
         if (flag2)
         {
             builder.AppendLine("$Id('CoBuy').checked = true;");
             builder.AppendLine("oncbInitiateTypeClick($Id('CoBuy'));");
         }
         builder.Append("$Id('tb_LotteryNumber').value = '").Append(str11.Replace("\r", @"\r").Replace("\n", @"\n")).AppendLine("';");
         builder.Append("$Id('tb_Share').value = '").Append(str3).AppendLine("';");
         builder.Append("$Id('tb_BuyShare').value = '").Append(str4).AppendLine("';");
         builder.Append("$Id('tb_AssureShare').value = '").Append(str5).AppendLine("';");
         builder.Append("$Id('tb_OpenUserList').value = '").Append(str6).AppendLine("';");
         builder.Append("$Id('tb_Title').value = '").Append(str7).AppendLine("';");
         builder.Append("$Id('tb_Description').value = '").Append(str8.Replace("\r", @"\r").Replace("\n", @"\n")).AppendLine("';");
         builder.Append("$Id('tbAutoStopAtWinMoney').value = '").Append(str9).AppendLine("';");
         builder.Append("$Id('SecrecyLevel").Append(num6.ToString()).AppendLine("').checked = true;");
         builder.Append("$Id('tb_hide_SumMoney').value = '").Append(str12).AppendLine("';");
         builder.Append("$Id('tb_hide_AssureMoney').value = '").Append(num4.ToString("N0")).AppendLine("';");
         builder.Append("$Id('tb_Multiple').value = '").Append(num5.ToString()).AppendLine("';");
         builder.Append("$Id('lab_AssureMoney').innerText = '").Append(num4.ToString("N0")).AppendLine("';");
         builder.Append("$Id('lab_SumMoney').innerText = '").Append(num.ToString("N0")).AppendLine("';");
         builder.Append("$Id('LbSumMoney').innerText = '").Append(num.ToString("N0")).AppendLine("';");
         builder.Append("$Id('lab_Num').innerText = '").Append(num9.ToString()).AppendLine("';");
         builder.AppendLine("CalcResult();");
         builder.AppendLine("}");
         builder.AppendLine("</script>");
         this.script = builder.ToString();
     }
 }
Example #10
0
    private void SaveDataForAliBuy()
    {
        string request = Shove._Web.Utility.GetRequest("HidIsuseID");
        Shove._Web.Utility.GetRequest("HidIsuseEndTime");
        string s = Shove._Web.Utility.GetRequest("tbPlayTypeID");
        string str3 = Shove._Web.Utility.GetRequest("Chase");
        string str4 = Shove._Web.Utility.GetRequest("Cobuy");
        string str5 = Shove._Web.Utility.GetRequest("tb_Share");
        string str6 = Shove._Web.Utility.GetRequest("tb_BuyShare");
        string str7 = Shove._Web.Utility.GetRequest("tb_AssureShare");
        string str8 = Shove._Web.Utility.GetRequest("tb_OpenUserList");
        string str9 = Shove._Web.Utility.GetRequest("tb_Title");
        string str10 = Shove._Web.Utility.GetRequest("tb_Description");
        string str11 = Shove._Web.Utility.GetRequest("tbAutoStopAtWinMoney");
        string str12 = Shove._Web.Utility.GetRequest("SecrecyLevel");
        Shove._Web.Utility.GetRequest("tbPlayTypeName");
        string str13 = Shove._Web.Utility.FilteSqlInfusion(base.Request["tb_LotteryNumber"]);
        string str14 = Shove._Web.Utility.GetRequest("tb_hide_SumMoney");
        string str15 = Shove._Web.Utility.GetRequest("tb_hide_AssureMoney");
        string str = Shove._Web.Utility.GetRequest("tb_hide_SumNum");
        Shove._Web.Utility.GetRequest("HidIsuseCount");
        string str17 = Shove._Web.Utility.GetRequest("HidLotteryID");
        Shove._Web.Utility.GetRequest("HidIsAlipay");
        string str18 = Shove._Web.Utility.GetRequest("tb_Multiple");
        string str19 = "";
        StringBuilder builder = new StringBuilder();
        int num = 0;
        int num2 = 2;
        switch (s)
        {
            case "3903":
            case "3904":
                num2 = 3;
                break;

            default:
                num2 = 2;
                break;
        }
        if (str18 == "")
        {
            str18 = "1";
        }
        if (str3 == "1")
        {
            foreach (string str20 in base.Request.Form.AllKeys)
            {
                if (str20.IndexOf("check") > -1)
                {
                    int num4 = _Convert.StrToInt(str20.Replace("check", ""), -1);
                    if (num4 > 0)
                    {
                        num++;
                        int num5 = (_Convert.StrToInt(str, -1) * num2) * _Convert.StrToInt(base.Request.Form["times" + num4.ToString()], -1);
                        builder.Append(base.Request.Form[str20]).Append(",").Append(base.Request.Form["times" + num4.ToString()]).Append(",").Append(num5.ToString()).Append(";");
                    }
                }
            }
            string str21 = str13;
            if (builder.Length > 0)
            {
                builder.Remove(builder.Length - 1, 1);
            }
            if (str21[str21.Length - 1] == '\n')
            {
                str21 = str21.Substring(0, str21.Length - 1);
            }
            string[] strArray2 = builder.ToString().Split(new char[] { ';' });
            int length = strArray2.Length;
            string[] strArray3 = new string[length * 6];
            DateTime time2 = DateTime.Parse(Functions.F_GetIsuseSystemEndTime(long.Parse(strArray2[0].Split(new char[] { ',' })[0]), int.Parse(s)).ToString());
            if (DateTime.Now >= time2)
            {
                JavaScript.Alert(this.Page, "您选择的追号期号中包含已截止的期,请重新选择。");
                return;
            }
            for (int i = 0; i < length; i++)
            {
                strArray3[i * 6] = strArray2[i].Split(new char[] { ',' })[0];
                strArray3[(i * 6) + 1] = s;
                strArray3[(i * 6) + 2] = str21;
                strArray3[(i * 6) + 3] = strArray2[i].Split(new char[] { ',' })[1];
                strArray3[(i * 6) + 4] = strArray2[i].Split(new char[] { ',' })[2];
                strArray3[(i * 6) + 5] = str12;
            }
            str19 = PF.BuildIsuseAdditionasXmlForChase(strArray3);
        }
        long num8 = new Tables.T_AlipayBuyTemp
        {
            SiteID = { Value = 1 },
            UserID = { Value = -1 },
            Money = { Value = str14 },
            HandleResult = { Value = 0 },
            IsChase = { Value = str3 == "1" },
            IsCoBuy = { Value = str4 == "2" },
            LotteryID = { Value = str17 },
            IsuseID = { Value = request },
            PlayTypeID = { Value = s },
            StopwhenwinMoney = { Value = str11 },
            AdditionasXml = { Value = str19 },
            Title = { Value = str9 },
            Description = { Value = str10 },
            LotteryNumber = { Value = str13 },
            UpdateloadFileContent = { Value = "" },
            Multiple = { Value = str18 },
            BuyMoney = { Value = str6 },
            SumMoney = { Value = str14 },
            AssureMoney = { Value = str15 },
            Share = { Value = str5 },
            BuyShare = { Value = str6 },
            AssureShare = { Value = str7 },
            OpenUsers = { Value = str8 },
            SecrecyLevel = { Value = str12 }
        }.Insert();
        if (num8 < 0L)
        {
            new Log("System").Write("T_AlipayBuyTemp 数据库读写错误。");
        }
        JavaScript.Alert(this.Page, "您的账户余额不足,请先充值,谢谢。", "OnlinePay/Alipay02/Send.aspx?BuyID=" + num8.ToString());
    }
Example #11
0
    private void BindBet()
    {
        long BuyID = Shove._Convert.StrToLong(Shove._Web.Utility.GetRequest("BuyID"), 0);

        string FileName = Request.Cookies["ASP.NET_SessionId"].Value;

        string LotteryNumber = "";

        DataTable dt = null;

        int Multiple = 0;
        double SumMoney = 0;
        long IsuseID = 0;
        int Count = 0;
        int LotID = 0;
        int PlayID = 0;
        int Share = 1;
        int BuyShare = 1;
        double AssureMoney = 0;
        short SecrecyLevel = 0;

        if (BuyID > 0)
        {
            dt = new DAL.Tables.T_AlipayBuyTemp().Open("", "ID=" + BuyID.ToString(), "");

            if (dt == null || dt.Rows.Count == 0)
            {
                return;
            }

            hidBuyID.Value = BuyID.ToString();

            DataRow dr = dt.Rows[0];

            string HidIsuseID = dr["IsuseID"].ToString();
            string playType = dr["PlayTypeID"].ToString();
            string tb_Share = dr["Share"].ToString();
            string tb_BuyShare = dr["BuyShare"].ToString();
            string tb_AssureShare = dr["AssureShare"].ToString();
            string tb_OpenUserList = dr["OpenUsers"].ToString();
            string tb_Title = dr["Title"].ToString();
            string tb_Description = dr["Description"].ToString();
            string tbSecrecyLevel = dr["SecrecyLevel"].ToString();
            string tb_LotteryNumber = dr["LotteryNumber"].ToString();
            string tb_hide_SumMoney = dr["SumMoney"].ToString();
            string tb_hide_AssureMoney = dr["AssureMoney"].ToString();
            string HidLotteryID = dr["LotteryID"].ToString();
            string tb_Multiple = dr["Multiple"].ToString();

            if (tb_Multiple == "")
            {
                tb_Multiple = "1";
            }

            try
            {
                Share = int.Parse(tb_Share);
                BuyShare = int.Parse(tb_BuyShare);
                AssureMoney = double.Parse(tb_hide_AssureMoney);
                Multiple = int.Parse(tb_Multiple);
                SecrecyLevel = short.Parse(tbSecrecyLevel);
                PlayID = int.Parse(playType);
                LotID = int.Parse(HidLotteryID);
                IsuseID = long.Parse(HidIsuseID);
            }
            catch { }

            if ((BuyShare == Share) && (AssureMoney == 0))
            {
                Share = 1;
                BuyShare = 1;
            }

            double BuyMoney = BuyShare * (SumMoney / Share) + AssureMoney;

             LotteryNumber = tb_LotteryNumber;

            if (!string.IsNullOrEmpty(LotteryNumber) && LotteryNumber[LotteryNumber.Length - 1] == '\n')
            {
                LotteryNumber = LotteryNumber.Substring(0, LotteryNumber.Length - 1);
            }

            hidLotteryNumber.Value = LotteryNumber;
        }
        else
        {
            try
            {
                LotteryNumber = File.ReadAllText(System.AppDomain.CurrentDomain.BaseDirectory + "Temp\\" + FileName + ".txt");
            }
            catch { }
        }

        if (string.IsNullOrEmpty(LotteryNumber))
        {
            Shove._Web.JavaScript.Alert(this.Page, "传递的参数错误,请重新发起操作!");

            return;
        }

        dt = new DAL.Tables.T_PassRate().Open("MatchID, MatchNumber, StopSellTime", "", "");

        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);

            return;
        }

        if (dt.Rows.Count < 1)
        {
            return;
        }

        hidMatchID.Value = "";

        foreach (DataRow dr in dt.Rows)
        {
            hidMatchID.Value += dr["MatchID"].ToString() + ",";
        }

        if (hidMatchID.Value.EndsWith(","))
        {
            hidMatchID.Value = hidMatchID.Value.Substring(0, hidMatchID.Value.Length - 1);
        }

        StringBuilder sb = new StringBuilder();

        sb.Append("<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"2\" cellspacing=\"1\" class=\"BgBlue\">");
        sb.Append("<tr align=\"center\" bgcolor=\"#FFFFFF\" class=\"BlueLightBg WhiteWords\">");
        sb.Append("<td width=\"8%\"><strong>序号</strong></td>");
        sb.Append("<td><strong>过关场次</strong></td>");
        sb.Append("<td width=\"10%\"><strong>过关方式</strong></td>");
        sb.Append("<td width=\"10%\"><strong>注数</strong></td>");
        sb.Append("<td width=\"10%\"><strong>投注金额(元)</strong></td></tr>");

        string[] LotteryNumbers = LotteryNumber.Replace("\r","").Split('\n');
        string Number = "";
        int No = 0;
        string BuyWays = "";

        StringBuilder sbMatchIDs = new StringBuilder();

        PlayID = Shove._Convert.StrToInt(LotteryNumbers[0].Split(';')[0], 7201);
        LotID = Shove._Convert.StrToInt(PlayID.ToString().Substring(0, 2), 72);

        DateTime EndTime = DateTime.Now;

        if (BuyID > 0)
        {
            foreach (string str in LotteryNumbers)
            {
                if (string.IsNullOrEmpty(str))
                {
                    continue;
                }

                try
                {
                    Multiple = int.Parse(str.Split(';')[2].Substring(1, str.Split(';')[2].Length - 2).Substring(2));
                }
                catch
                {
                    Multiple = Shove._Convert.StrToInt(str.Split(';')[2].Substring(1, str.Split(';')[2].IndexOf(',') - 1).Substring(2), 1);
                }

                if (No > 10)
                {
                    continue;
                }

                sb.Append("<tr align=\"center\" class=\"" + ((No % 2 == 0) ? "BlueWord WhiteBg" : "BlueLightBg2 BlueWord") + "\">");
                sb.Append("<td>" + No.ToString() + "</td>");

                Number = str.Split(';')[1].Substring(1, str.Split(';')[1].Length - 2);
                string[] Numbers = Number.Split('|');

                if (Numbers.Length < 2)
                {
                    continue;
                }

                sb.Append("<td height=\"20\">");

                BuyWays = PF.GetPassWay(str);

                long MatchID = 0;

                for (int i = 0; i < Numbers.Length; i++)
                {
                    if (Numbers[i].IndexOf("(") < 0)
                    {
                        continue;
                    }

                    MatchID = Shove._Convert.StrToLong(Numbers[i].Substring(0, Numbers[i].IndexOf("(")), 1);

                    DataRow[] dr = dt.Select("MatchID=" + MatchID.ToString());

                    if (dr.Length < 1)
                    {
                        continue;
                    }

                    sbMatchIDs.Append(Numbers[i].Substring(0, Numbers[i].IndexOf("(")) + ",");

                    sb.Append(dr[0]["MatchNumber"].ToString() + "->" + PF.Getesult(PlayID.ToString(), Numbers[i].Substring(Numbers[i].IndexOf("(") + 1, Numbers[i].IndexOf(")") - Numbers[i].IndexOf("(") - 1)) + ";");
                }

                int ValidNum = 0;

                SLS.Lottery slsLottery = new SLS.Lottery();
                string temp_Number = slsLottery[LotID].AnalyseScheme(str, PlayID);

                if (string.IsNullOrEmpty(temp_Number))
                {
                    continue;
                }

                string[] str_s = temp_Number.Split('|');

                if (str_s == null || str_s.Length < 1)
                {
                    continue;
                }

                ValidNum += Shove._Convert.StrToInt(str_s[str_s.Length - 1], 0);

                sb.Append("</td>");
                sb.Append("<td height=\"20\">" + BuyWays + "</td>");
                sb.Append("<td>" + ValidNum.ToString() + "</td>");
                sb.Append("<td>" + (2 * Multiple * ValidNum).ToString() + "</td></tr>");

                SumMoney += 2 * Multiple * ValidNum;
                Count += ValidNum;
            }

            sb.Append("</table>");
            labLotteryNumber.Text = sb.ToString();
        }
        else
        {
            foreach (string str in LotteryNumbers)
            {
                if (string.IsNullOrEmpty(str))
                {
                    continue;
                }

                No++;
                Count++;

                if (str.Split(';').Length < 3)
                {
                    continue;
                }

                try
                {
                    Multiple = Shove._Convert.StrToInt(str.Split(';')[2].Substring(1, str.Split(';')[2].Length - 2).Substring(2), 1);
                }
                catch
                { }

                SumMoney += 2 * Multiple;

                if (No > 10)
                {
                    continue;
                }

                sb.Append("<tr align=\"center\" class=\"" + ((No % 2 == 0) ? "BlueWord WhiteBg" : "BlueLightBg2 BlueWord") + "\">");
                sb.Append("<td>" + No.ToString() + "</td>");

                Number = str.Split(';')[1].Substring(1, str.Split(';')[1].Length - 2);
                string[] Numbers = Number.Split('|');

                if (Numbers.Length < 2)
                {
                    continue;
                }

                sb.Append("<td height=\"20\">");

                BuyWays = Numbers.Length.ToString() + "串1";

                long MatchID = 0;

                for (int i = 0; i < Numbers.Length; i++)
                {
                    if (Numbers[i].IndexOf("(") < 0)
                    {
                        continue;
                    }

                    MatchID = Shove._Convert.StrToLong(Numbers[i].Substring(0, Numbers[i].IndexOf("(")), 1);

                    DataRow[] dr = dt.Select("MatchID=" + MatchID.ToString());

                    if (dr.Length < 1)
                    {
                        continue;
                    }

                    sbMatchIDs.Append(Numbers[i].Substring(0, Numbers[i].IndexOf("(")) + ",");

                    sb.Append(dr[0]["MatchNumber"].ToString() + "->" + PF.Getesult(PlayID.ToString(), Numbers[i].Substring(Numbers[i].IndexOf("(") + 1, Numbers[i].IndexOf(")") - Numbers[i].IndexOf("(") - 1)) + ";");
                }

                sb.Append("</td>");
                sb.Append("<td height=\"20\">" + BuyWays + "</td>");
                sb.Append("<td>1</td>");
                sb.Append("<td>" + (2 * Multiple).ToString() + "</td></tr>");
            }

            sb.Append("</table>");
            labLotteryNumber.Text = sb.ToString();
        }

        labShare.Text = Share.ToString();
        labBuyShare.Text = BuyShare.ToString();
        labAssureMoney.Text = AssureMoney.ToString();

        string MatchIDs = sbMatchIDs.ToString();

        if (MatchIDs.EndsWith(","))
        {
            MatchIDs = MatchIDs.Substring(0, MatchIDs.Length - 1);
        }

        DataRow[] drTime = dt.Select("MatchID in (" + MatchIDs + ")", "StopSellTime");

        if (drTime.Length > 0)
        {
            EndTime = Shove._Convert.StrToDateTime(drTime[0]["StopSellTime"].ToString(), DateTime.Now.AddHours(1).ToString());
        }

        labEndTime.Text = EndTime.ToString("yyyy-MM-dd HH:mm:ss");
        HidIsuseEndTime.Value = EndTime.ToString();

        labMultiple.Text = Multiple.ToString();
        labSchemeMoney.Text = SumMoney.ToString();
        labNum.Text = Count.ToString();

        dt = new DAL.Tables.T_Isuses().Open("ID", "LotteryID= " + LotID.ToString(), "EndTime desc");

        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);

            return;
        }

        if (dt.Rows.Count < 1)
        {
            PF.GoError(ErrorNumber.NoIsuse, "请添加期号", this.GetType().BaseType.FullName);

            return;
        }

        IsuseID = Shove._Convert.StrToLong(dt.Rows[0]["ID"].ToString(), 0);

        hidSchemeMoney.Value = SumMoney.ToString();
        hidMultiple.Value = Multiple.ToString();
        hidlotid.Value = LotID.ToString();
        hidplayid.Value = PlayID.ToString();
        hidSumNum.Value = Count.ToString();
        hidisuseid.Value = IsuseID.ToString();
    }
 private void GoBuy(long BuyID)
 {
     DataTable table = new Tables.T_AlipayBuyTemp().Open("", "ID=" + BuyID.ToString(), "");
     if ((table == null) || (table.Rows.Count != 1))
     {
         base.Response.Redirect("../../Default.aspx", true);
         return;
     }
     string str = table.Rows[0]["LotteryID"].ToString();
     string url = "";
     string str3 = str;
     if (str3 != null)
     {
         if (!(str3 == "5"))
         {
             if (str3 == "6")
             {
                 url = "Buy3D.aspx?BuyID=" + BuyID.ToString();
                 goto Label_011A;
             }
             if (str3 == "29")
             {
                 url = "BuyShssl.aspx?BuyID=" + BuyID.ToString();
                 goto Label_011A;
             }
             if (str3 == "39")
             {
                 url = "BuyDlt.aspx?BuyID=" + BuyID.ToString();
                 goto Label_011A;
             }
         }
         else
         {
             url = "BuySsq.aspx?BuyID=" + BuyID.ToString();
             goto Label_011A;
         }
     }
     url = "../../Default.aspx?BuyID=" + BuyID.ToString();
     Label_011A:
     base.Response.Redirect(url, true);
 }