Esempio n. 1
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();
            }
        }
    }
Esempio n. 2
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";
        }
    }
Esempio n. 3
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        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 (tb_Multiple == "")
        {
            tb_Multiple = "1";
        }

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

            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;
            }

            double SumMoney = 0;

            try
            {
                SumMoney = double.Parse(tb_hide_SumMoney);
            }
            catch
            {
                Shove._Web.JavaScript.Alert(this.Page, "输入有错误,请仔细检查。(-1325)");

                return;
            }

            if (SumMoney < 2)
            {
                Shove._Web.JavaScript.Alert(this.Page, "输入有错误,请仔细检查。(-1332)");

                return;
            }

            int Multiple = 0;

            try
            {
                Multiple = int.Parse(tb_Multiple);
            }
            catch
            {
                Shove._Web.JavaScript.Alert(this.Page, "输入有错误,请仔细检查。");

                return;
            }

            int SumNum = 0;

            try
            {
                SumNum = int.Parse(tb_hide_SumNum);
            }
            catch
            {
                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;

                if (Shove._Convert.StrToDouble(Xmlparams[i * 6 + 3], 0) * SumMoney != Shove._Convert.StrToDouble(Xmlparams[i * 6 + 4], 1))
                {
                    Shove._Web.JavaScript.Alert(this.Page, "输入有错误,请仔细检查。");

                    return;
                }

                if (Shove._Convert.StrToDouble(Xmlparams[i * 6 + 3], 0) < Multiple)
                {
                    Shove._Web.JavaScript.Alert(this.Page, "追号倍数有错误,请仔细检查!");

                    return;
                }

                if (double.Parse(Xmlparams[i * 6 + 3]) * SumNum * Price != double.Parse(Xmlparams[i * 6 + 4]))
                {
                    Shove._Web.JavaScript.Alert(this.Page, "追号金额有错误,请仔细检查!可能原因:浏览器不兼容,建议使用IE 7.0");

                    return;
                }
            }

            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());
    }
Esempio n. 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();
    }
Esempio n. 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("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());
    }
Esempio n. 6
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();
    }