Ejemplo n.º 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);";
        }
    }
Ejemplo n.º 2
0
    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);
    }
Ejemplo n.º 3
0
        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());
        }
Ejemplo n.º 4
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["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 SLS.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();
            }
        }
Ejemplo n.º 5
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;

            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, "您的账户余额不足,请先充值,谢谢。", "../Home/Room/OnlinePay/Default.aspx?BuyID=" + num8.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["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'>");
            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('share").Append(node.Attributes["IsuseID"].Value).Append("').value = '").Append(node.Attributes["Share"].Value).AppendLine("';");
                    builder.Append("$Id('buyedShare").Append(node.Attributes["IsuseID"].Value).Append("').value = '").Append(node.Attributes["BuyedShare"].Value).AppendLine("';");
                    builder.Append("$Id('assureShare").Append(node.Attributes["IsuseID"].Value).Append("').value = '").Append(node.Attributes["AssureShare"].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 = '';");
                    builder.Append("$Id('share").Append(node.Attributes["IsuseID"].Value).AppendLine("').disabled = '';");
                    builder.Append("$Id('buyedShare").Append(node.Attributes["IsuseID"].Value).AppendLine("').disabled = '';");
                    builder.Append("$Id('assureShare").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();
        }
    }