コード例 #1
0
    private void BindPlay()
    {
        DataTable table = new Views.V_PlayTypes().Open("ID, LotteryID, Name, LotteryName, BuyFileName, Price", "LotteryID=" + _Convert.StrToInt(this.LotteryID, -1).ToString(), "[ID]");

        if ((table == null) || (table.Rows.Count == 0))
        {
            PF.GoError(1, "此玩法没有开通", "Room_Chase");
        }
        else
        {
            this.LotteryName  = table.Rows[0]["LotteryName"].ToString();
            this.PlayTypeName = table.Rows[0]["Name"].ToString();
            this.IframeUrl    = table.Rows[0]["BuyFileName"].ToString().Replace("Surrogate", "ChasePage").Replace("[Lottery]", table.Rows[0]["LotteryID"].ToString()).Replace("[PlayType]", table.Rows[0]["ID"].ToString());
            int num2 = 0;
            for (int i = 0; i < table.Rows.Count; i++)
            {
                string text = this.LbPlay.Text;
                this.LbPlay.Text = text + "<a href =" + table.Rows[i]["BuyFileName"].ToString().Replace("Surrogate", "ChasePage").Replace("[Lottery]", table.Rows[i]["LotteryID"].ToString()).Replace("[PlayType]", table.Rows[i]["ID"].ToString()) + "&Price=" + table.Rows[i]["Price"].ToString() + " target='iframeplay' class='hei'>" + table.Rows[i]["Name"].ToString() + "追号</a>&nbsp;&nbsp;&nbsp;&nbsp;";
                if (((num2 % 6) == 0) && (num2 > 0))
                {
                    this.LbPlay.Text = this.LbPlay.Text.Trim() + " </br>";
                }
                num2++;
            }
        }
    }
コード例 #2
0
    private void BindData()
    {
        DataTable dt = new Views.V_PlayTypes().Open("", "LotteryID in (" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[Order], [ID]");

        if (dt == null)
        {
            PF.GoError(4, "数据库繁忙,请重试", "Admin_LotteryTimeSet");
        }
        else
        {
            PF.DataGridBindData(this.g, dt);
        }
    }
コード例 #3
0
 private void BindDataForLottery()
 {
     this.ddlLottery.Items.Clear();
     this.ddlLottery.Items.Add(new ListItem("全部彩种", "-1"));
     if (base._Site.UseLotteryList == "")
     {
         PF.GoError(1, "暂无玩法", base.GetType().FullName);
     }
     else
     {
         string    key = "dtLotteriesUseLotteryList";
         DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key);
         if (cacheAsDataTable == null)
         {
             cacheAsDataTable = new Tables.T_Lotteries().Open("[ID], [Name], [Code]", "[ID] in(" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[ID]");
             if (cacheAsDataTable == null)
             {
                 PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName + "(-46)");
                 return;
             }
             Shove._Web.Cache.SetCache(key, cacheAsDataTable, 0x1770);
         }
         for (int i = 0; i < cacheAsDataTable.Rows.Count; i++)
         {
             string str2 = cacheAsDataTable.Rows[i]["ID"].ToString();
             key = "dtVPlayTypes_" + str2.ToString();
             DataTable table2 = Shove._Web.Cache.GetCacheAsDataTable(key);
             if (table2 == null)
             {
                 table2 = new Views.V_PlayTypes().Open("", "LotteryID = " + str2.ToString(), "[ID]");
                 if ((table2 == null) || (table2.Rows.Count < 1))
                 {
                     PF.GoError(7, "数据库繁忙,请重试", base.GetType().FullName);
                     return;
                 }
                 Shove._Web.Cache.SetCache(key, table2, 0x1770);
             }
             if (this.arrLotteries.Contains <int>(_Convert.StrToInt(cacheAsDataTable.Rows[i]["ID"].ToString(), 0)))
             {
                 this.ddlLottery.Items.Add(new ListItem(table2.Rows[0]["LotteryName"].ToString(), table2.Rows[0]["LotteryID"].ToString()));
             }
         }
         if (this.ddlLottery.Items.Count > 0)
         {
             this.BindDataForPlayType(this.ddlLottery.Items[0].Value);
         }
     }
 }
コード例 #4
0
    private void BindDataForPlayType(string LotteryID)
    {
        this.ddlPlayType.Items.Clear();
        this.ddlPlayType.Items.Add(new ListItem("全部玩法", "-1"));
        DataTable table = new Views.V_PlayTypes().Open("ID,LotteryID,Name,LotteryName,BuyFileName", "LotteryID=" + LotteryID, "");

        if (table == null)
        {
            PF.GoError(1, "暂无玩法", base.GetType().FullName);
        }
        else
        {
            for (int i = 0; i < table.Rows.Count; i++)
            {
                this.ddlPlayType.Items.Add(new ListItem(table.Rows[i]["Name"].ToString(), table.Rows[i]["ID"].ToString()));
            }
        }
    }
コード例 #5
0
    private void BindDataForPlayType(int type)
    {
        DataTable table = null;

        if (type == 1)
        {
            if (this.ddlLottery.Items.Count < 1)
            {
                return;
            }
            this.ddlPlayType.Items.Clear();
            this.ddlPlayType.Items.Add(new ListItem("全部玩法", "-1"));
            table = new Views.V_PlayTypes().Open("ID,LotteryID,Name,LotteryName,BuyFileName", "LotteryID=" + this.ddlLottery.SelectedValue, "");
        }
        else if (type == 2)
        {
            if (this.ddlLotterySet.Items.Count < 1)
            {
                return;
            }
            this.ddlPlayTypeSet.Items.Clear();
            this.ddlPlayTypeSet.Items.Add(new ListItem("全部玩法", "-1"));
            table = new Views.V_PlayTypes().Open("ID,LotteryID,Name,LotteryName,BuyFileName", "LotteryID=" + this.ddlLotterySet.SelectedValue, "");
        }
        else if (type == 3)
        {
            if (this.ddlWhoLottery.Items.Count < 1)
            {
                return;
            }
            this.ddlWhoPlaytype.Items.Clear();
            this.ddlWhoPlaytype.Items.Add(new ListItem("全部玩法", "-1"));
            table = new Views.V_PlayTypes().Open("ID,LotteryID,Name,LotteryName,BuyFileName", "LotteryID=" + this.ddlWhoLottery.SelectedValue, "");
        }
        if (table == null)
        {
            PF.GoError(1, "暂无玩法", base.GetType().FullName);
        }
        else if (type == 1)
        {
            for (int i = 0; i < table.Rows.Count; i++)
            {
                string text = table.Rows[i]["Name"].ToString().ToString();
                if (table.Rows[i]["Name"].ToString() == "61")
                {
                    text = text.Replace("江西", "");
                }
                if (table.Rows[i]["Name"].ToString() != "混合投注")
                {
                    this.ddlPlayType.Items.Add(new ListItem(text, table.Rows[i]["ID"].ToString()));
                }
            }
        }
        else if (type == 2)
        {
            for (int j = 0; j < table.Rows.Count; j++)
            {
                string str2 = table.Rows[j]["Name"].ToString().ToString();
                if (table.Rows[j]["Name"].ToString() == "61")
                {
                    str2 = str2.Replace("江西", "");
                }
                if (table.Rows[j]["Name"].ToString() != "混合投注")
                {
                    this.ddlPlayTypeSet.Items.Add(new ListItem(str2, table.Rows[j]["ID"].ToString()));
                }
            }
        }
        else if (type == 3)
        {
            for (int k = 0; k < table.Rows.Count; k++)
            {
                string str3 = table.Rows[k]["Name"].ToString().ToString();
                if (table.Rows[k]["Name"].ToString() == "61")
                {
                    str3 = str3.Replace("江西", "");
                }
                if (table.Rows[k]["Name"].ToString() != "混合投注")
                {
                    this.ddlWhoPlaytype.Items.Add(new ListItem(str3, table.Rows[k]["ID"].ToString()));
                }
            }
        }
    }