Ejemplo n.º 1
0
    private void BindData(int LotteryID)
    {
        string CacheKey = "LotteryAgreements";
        DataTable dt = Shove._Web.Cache.GetCacheAsDataTable(CacheKey);

        if (dt == null)
        {
            dt = new DAL.Tables.T_Lotteries().Open("[ID],[Code],[Agreement]", "[ID] in (" + (_Site.UseLotteryList == "" ? "-1" : _Site.UseLotteryList) + ")", "");

            if (dt == null || dt.Rows.Count < 1)
            {
                PF.GoError(ErrorNumber.NoData, "数据库繁忙,请重试", this.GetType().FullName);

                return;
            }

            Shove._Web.Cache.SetCache(CacheKey, dt, 6000);
        }

        DataRow[] drA = dt.Select("[ID] = " + LotteryID.ToString());

        if (drA.Length > 0)
        {
            lbAgreement.Text = drA[0]["Agreement"].ToString().ToLower().Replace("[sitename]", _Site.Name).Replace("[siteurl]", Shove._Web.Utility.GetUrl());
            imgLogo.ImageUrl = "images/" + drA[0]["Code"].ToString().ToLower() + ".jpg";
        }
    }
Ejemplo n.º 2
0
    private void BindDataForLottery()
    {
        DataTable dt = new DAL.Tables.T_Lotteries().Open("[ID], [Name], PrintOutType", "[ID] in (" + (_Site.UseLotteryListRestrictions == "" ? "-1" : _Site.UseLotteryListRestrictions) + ")", "[Order]");

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

            return;
        }

        g.DataSource = dt;
        g.DataBind();

        g.Columns[2].Visible = false;
        g.Columns[3].Visible = false;

        // 设置出票方式的下拉框
        for (int i = 0; i < g.Rows.Count; i++)
        {
            DropDownList ddlElectronTicket = (DropDownList)g.Rows[i].Cells[1].FindControl("ddlElectronTicket");

            int LotteryID = Shove._Convert.StrToInt(g.Rows[i].Cells[2].Text, -1);

            if (LotteryID < 1)
            {
                continue;
            }

            short PrintOutType = Shove._Convert.StrToShort(g.Rows[i].Cells[3].Text, 0);

            Shove.ControlExt.SetDownListBoxTextFromValue(ddlElectronTicket, PrintOutType.ToString());
        }
    }
Ejemplo n.º 3
0
    private void dataBindLottery()
    {
        ddlLottery.Items.Clear();
        ddlLottery.Items.Add(new ListItem("------------请选择------------", "-1"));

        DataTable dtLotterys = Shove._Web.Cache.GetCacheAsDataTable(_ElectronTicketAgents.ID.ToString() + "Agent_ElectronTicket_AgentQueryBet_dtLotterys");

        if (dtLotterys == null)
        {
            dtLotterys = new DAL.Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + (_ElectronTicketAgents.UseLotteryList) + ")", "[Order]");

            if (dtLotterys == null)
            {
                PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Room_FrameLeft");

                return;
            }

            Shove._Web.Cache.SetCache(_ElectronTicketAgents.ID.ToString() + "Agent_ElectronTicket_AgentQueryBet_dtLotterys", dtLotterys);
        }

        for (int i = 0; i < dtLotterys.Rows.Count; i++)
        {
            ddlLottery.Items.Add(new ListItem(dtLotterys.Rows[i]["Name"].ToString(), dtLotterys.Rows[i]["ID"].ToString()));
        }
    }
Ejemplo n.º 4
0
    private void BindLotteryType()
    {
        string LotteryID = Shove._Web.Utility.GetRequest("LotteryID");

        string CacheKey = "dtLotteriesUseLotteryList";
        DataTable dtLotteries = Shove._Web.Cache.GetCacheAsDataTable(CacheKey);

        if (dtLotteries == null)
        {
            dtLotteries = new DAL.Tables.T_Lotteries().Open("[ID], [Name], [Code]", "[ID] in(" + (_Site.UseLotteryList == "" ? "-1" : _Site.UseLotteryList) + ")", "[ID]");

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

                return;
            }

            Shove._Web.Cache.SetCache(CacheKey, dtLotteries, 6000);
        }

        ddlLotteries.DataSource = dtLotteries;
        ddlLotteries.DataTextField = "Name";
        ddlLotteries.DataValueField = "ID";
        ddlLotteries.DataBind();

        if (ddlLotteries.Items.FindByValue(LotteryID) != null)
        {
            ddlLotteries.SelectedValue = LotteryID;
        }
    }
Ejemplo n.º 5
0
    private void BindDataForLottery()
    {
        DataTable dt = new DAL.Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + (_Site.UseLotteryListRestrictions == "" ? "-1" : _Site.UseLotteryListRestrictions) + ")", "[Order]");

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

            return;
        }

        Shove.ControlExt.FillDropDownList(ddlLottery, dt, "Name", "ID");

        if (ddlLottery.Items.Count < 1)
        {
            btnGO_Step1.Enabled = false;
            btnGO_Step2.Enabled = false;
            btnGO_Step3.Enabled = false;
            tbWinNumber.Enabled = false;
        }
        else
        {
            ddlLottery_SelectedIndexChanged(ddlLottery, new EventArgs());
        }
    }
 private void bindData(int lotteryID)
 {
     DataTable table = new Tables.T_Lotteries().Open("Agreement", "ID = " + lotteryID, "");
     if ((table != null) && (table.Rows.Count > 0))
     {
         string str = table.Rows[0]["Agreement"].ToString();
         this.lbAgreement.Text = str.Replace("[SiteName]", base._Site.Name).Replace("[SiteUrl]", base._Site.Url);
     }
 }
 private void BindDataForLottery()
 {
     DataTable dt = new Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[Order]");
     if (dt == null)
     {
         PF.GoError(4, "数据库繁忙,请重试", "Admin_LotteryInformation");
     }
     else
     {
         ControlExt.FillDropDownList(this.ddlLottery, dt, "Name", "ID");
     }
 }
Ejemplo n.º 8
0
    private void bindData(int lotteryID)
    {
        
        DAL.Tables.T_Lotteries dt = new DAL.Tables.T_Lotteries();
        DataTable dtAgreement  = dt.Open("Agreement","ID = "+lotteryID+"","");

        if (dtAgreement != null && dtAgreement.Rows.Count > 0)
        {
            string aggrement = dtAgreement.Rows[0]["Agreement"].ToString();
            this.lbAgreement.Text = aggrement.Replace("[SiteName]", _Site.Name).Replace("[SiteUrl]",_Site.Url);
        }
    }
Ejemplo n.º 9
0
    private void BindDataForLottery()
    {
        DataTable dt = new DAL.Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (1,2,3,4,9,10,14,15,39)", "[Order]");

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

            return;
        }

        Shove.ControlExt.FillDropDownList(ddlLottery, dt, "Name", "ID");
    }
Ejemplo n.º 10
0
    private void BindDataForLottery()
    {
        DataTable dt = new DAL.Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + (_Site.UseLotteryListRestrictions == "" ? "-1" : _Site.UseLotteryListRestrictions) + ")", "[Order]");

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

            return;
        }

        Shove.ControlExt.FillListBox(listLottery, dt, "Name", "ID");
    }
Ejemplo n.º 11
0
    private void BindDataForLottery()
    {
        DataTable dt = new DAL.Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + (_Site.UseLotteryListRestrictions == "" ? "-1" : _Site.UseLotteryListRestrictions) + ")", "[Order]");

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

            return;
        }

        Shove.ControlExt.FillDropDownList(ddlLottery, dt, "Name", "ID");
    }
 private void BindLotteryType()
 {
     DataTable table = new Tables.T_Lotteries().Open("[ID], [Name], [Code]", "[ID] in(" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "[ID]");
     if (table == null)
     {
         PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName + "(-46)");
     }
     else
     {
         this.ddlLotteries.DataSource = table;
         this.ddlLotteries.DataTextField = "Name";
         this.ddlLotteries.DataValueField = "ID";
         this.ddlLotteries.DataBind();
     }
 }
    private void BindDataForLottery(int LotteryID)
    {
        string CacheKey = "dtLotteriesUseLotteryList";
        DataTable dtLotteries = Shove._Web.Cache.GetCacheAsDataTable(CacheKey);

        if (dtLotteries == null)
        {
            dtLotteries = new DAL.Tables.T_Lotteries().Open("[ID], [Name], [Code]", "[ID] in(" + (_Site.UseLotteryList == "" ? "-1" : _Site.UseLotteryList) + ")", "[ID]");

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

                return;
            }

            Shove._Web.Cache.SetCache(CacheKey, dtLotteries, 6000);
        }

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

            return;
        }

        ddlLotteries.Items.Clear();
        ddlLotteries.Items.Add(new ListItem("全部彩种", "-1"));

        foreach (DataRow dr in dtLotteries.Rows)
        {
            string strLotteryName = dr["Name"].ToString();
            ddlLotteries.Items.Add(new ListItem(strLotteryName , dr["ID"].ToString()));
        }

        if (ddlLotteries.Items.FindByValue(LotteryID.ToString()) != null)
        {
            for (int i = 0; i < ddlLotteries.Items.Count; i++)
            {
                if (ddlLotteries.Items[i].Value == LotteryID.ToString())
                {
                    ddlLotteries.SelectedIndex = i;
                }
            }
        }

        ddlLotteries_SelectedIndexChanged(ddlLotteries, new EventArgs());
    }
 private void BindData(int id)
 {
     DataTable table = new Tables.T_Lotteries().Open("[ID],[Name],[SchemeExemple]", "[ID] = " + id.ToString() + " and [ID] in (" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "");
     if (table == null)
     {
         PF.GoError(4, "数据库繁忙,请重试", "Room_SchemeExemple");
     }
     else if (table.Rows.Count == 0)
     {
         JavaScript.ClosePage(this.Page);
     }
     else
     {
         this.labContent.Text = table.Rows[0]["SchemeExemple"].ToString().Replace("[SiteName]", base._Site.Name).Replace("[SiteUrl]", base._Site.Urls).Replace("[siteurl]", base._Site.Urls);
     }
 }
Ejemplo n.º 15
0
 private void BindDataForLottery()
 {
     DataTable dt = new Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (1,2,3,4,9,10,14,15,39)", "[Order]");
     if (dt == null)
     {
         PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName);
     }
     else
     {
         ControlExt.FillDropDownList(this.ddlLottery, dt, "Name", "ID");
         string request = Utility.GetRequest("LotteryID");
         if (request != "")
         {
             ControlExt.SetDownListBoxTextFromValue(this.ddlLottery, request);
         }
     }
 }
Ejemplo n.º 16
0
    private void BindData(CheckBoxList list,string temp)
    {
        DataTable dt = new DAL.Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + (_Site.UseLotteryList == "" ? "-1" : _Site.UseLotteryList) + ") "+temp, "[Order]");

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

            return;
        }

        list.Items.Clear();

        foreach (DataRow dr in dt.Rows)
        {
            list.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString()));
        }
    }
 private void BindData()
 {
     if (this.ddlLottery.Items.Count >= 1)
     {
         DataTable table = new Tables.T_Lotteries().Open("Explain, SchemeExemple, Agreement, OpenAfficheTemplate", "[ID] = " + Utility.FilteSqlInfusion(this.ddlLottery.SelectedValue), "");
         if ((table == null) || (table.Rows.Count < 1))
         {
             PF.GoError(4, "数据库繁忙,请重试", "Admin_LotteryInformation");
         }
         else
         {
             this.tbExplain.Text = table.Rows[0]["Explain"].ToString();
             this.tbLotteryExemple.Text = table.Rows[0]["SchemeExemple"].ToString();
             this.tbAgreement.Text = table.Rows[0]["Agreement"].ToString();
             this.tbOpenAfficheTemplate.Text = table.Rows[0]["OpenAfficheTemplate"].ToString();
         }
     }
 }
Ejemplo n.º 18
0
    private void BindLotteryType()
    {
        string CacheKey = "dtLotteriesUseLotteryList";
        DataTable dtLotteries = Shove._Web.Cache.GetCacheAsDataTable(CacheKey);

        if (dtLotteries == null)
        {
            dtLotteries = new DAL.Tables.T_Lotteries().Open("[ID], [Name], [Code]", "[ID] in(" + (_Site.UseLotteryList == "" ? "-1" : _Site.UseLotteryList) + ")", "[ID]");

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

                return;
            }

            Shove._Web.Cache.SetCache(CacheKey, dtLotteries, 6000);
        }

        ddlLotteries.DataSource = dtLotteries;
        ddlLotteries.DataTextField = "Name";
        ddlLotteries.DataValueField = "ID";
        ddlLotteries.DataBind();

        hidID.Value = Shove._Web.Utility.GetRequest("ID");
        DataTable dt = new DAL.Tables.T_Personages().Open("", "ID=" + Shove._Web.Utility.FilteSqlInfusion(hidID.Value) + "", "");

        if (dt == null || dt.Rows.Count == 0)
        {
            Shove._Web.JavaScript.Alert(this.Page, "记录不存在!");

            return;
        }

        if (ddlLotteries.Items.FindByValue(dt.Rows[0]["LotteryID"].ToString()) != null)
        {
            ddlLotteries.SelectedValue = dt.Rows[0]["LotteryID"].ToString();
        }

        tbOrder.Text = dt.Rows[0]["Order"].ToString();
        cbisShow.Checked = Shove._Convert.StrToBool(dt.Rows[0]["IsShow"].ToString(), true);
        tbName.Text = dt.Rows[0]["UserName"].ToString();
    }
Ejemplo n.º 19
0
    private void BindDataForLottery()
    {
        DataTable dt = new DAL.Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + (_Site.UseLotteryListRestrictions == "" ? "-1" : _Site.UseLotteryListRestrictions) + ") and [ID] <> " + SLS.Lottery.ZCDC.sID, "[Order]");

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

            return;
        }

        Shove.ControlExt.FillDropDownList(ddlLottery, dt, "Name", "ID");

        if (ddlLottery.Items.Count < 1)
        {
            btnGO.Enabled = false;
            tbWinNumber.Enabled = false;
        }
    }
Ejemplo n.º 20
0
    private void BindDataForLottery()
    {
        DataTable dt = new DAL.Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (1,2,3,4,9,10,14,15,39) and [ID] <> " + SLS.Lottery.ZCDC.sID, "[Order]");

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

            return;
        }

        Shove.ControlExt.FillDropDownList(ddlLottery, dt, "Name", "ID");

        if (ddlLottery.Items.Count < 1)
        {
            btnGO.Enabled = false;
            tbWinNumber.Enabled = false;
        }
    }
Ejemplo n.º 21
0
    private void BindData(int id)
    {
        DataTable dt = new DAL.Tables.T_Lotteries().Open("[ID],[Name],[SchemeExemple]", "[ID] = " + id.ToString() + " and [ID] in (" + (_Site.UseLotteryList == "" ? "-1" : _Site.UseLotteryList) + ")", "");

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

            return;
        }

        if (dt.Rows.Count == 0)
        {
            Shove._Web.JavaScript.ClosePage(this.Page);

            return;
        }
        
        labContent.Text = dt.Rows[0]["SchemeExemple"].ToString().Replace("[SiteName]", _Site.Name).Replace("[SiteUrl]", _Site.Urls).Replace("[siteurl]", _Site.Urls);
    }
Ejemplo n.º 22
0
    private void BindDataForLottery()
    {
        DataTable dt = new DAL.Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + (_Site.UseLotteryList == "" ? "-1" : _Site.UseLotteryList) + ")", "[Order]");

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

            return;
        }

        Shove.ControlExt.FillDropDownList(ddlLottery, dt, "Name", "ID");

        string LotteryID = Shove._Web.Utility.GetRequest("LotteryID");

        if (LotteryID != "")
        {
            Shove.ControlExt.SetDownListBoxTextFromValue(ddlLottery, LotteryID);
        }
    }
Ejemplo n.º 23
0
 private void BindData(int LotteryID)
 {
     string key = "LotteryAgreements";
     DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key);
     if (cacheAsDataTable == null)
     {
         cacheAsDataTable = new Tables.T_Lotteries().Open("[ID],[Code],[Agreement]", "[ID] in (" + ((base._Site.UseLotteryList == "") ? "-1" : base._Site.UseLotteryList) + ")", "");
         if ((cacheAsDataTable == null) || (cacheAsDataTable.Rows.Count < 1))
         {
             PF.GoError(7, "数据库繁忙,请重试", base.GetType().FullName);
             return;
         }
         Shove._Web.Cache.SetCache(key, cacheAsDataTable, 0x1770);
     }
     DataRow[] rowArray = cacheAsDataTable.Select("[ID] = " + LotteryID.ToString());
     if (rowArray.Length > 0)
     {
         this.lbAgreement.Text = rowArray[0]["Agreement"].ToString().ToLower().Replace("[sitename]", base._Site.Name).Replace("[siteurl]", Utility.GetUrl());
         this.imgLogo.ImageUrl = "images/" + rowArray[0]["Code"].ToString().ToLower() + ".jpg";
     }
 }
Ejemplo n.º 24
0
    private void BindData()
    {
        if (ddlLottery.Items.Count < 1)
        {
            return;
        }

        DataTable dt = new DAL.Tables.T_Lotteries().Open("Explain, SchemeExemple, Agreement, OpenAfficheTemplate", "[ID] = " + Shove._Web.Utility.FilteSqlInfusion(ddlLottery.SelectedValue), "");

        if ((dt == null) || (dt.Rows.Count < 1))
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_LotteryInformation");

            return;
        }
        
        tbExplain.Value = dt.Rows[0]["Explain"].ToString();
        tbLotteryExemple.Value = dt.Rows[0]["SchemeExemple"].ToString();
        tbAgreement.Value = dt.Rows[0]["Agreement"].ToString();
        tbOpenAfficheTemplate.Value = dt.Rows[0]["OpenAfficheTemplate"].ToString();
    }
Ejemplo n.º 25
0
    /// <summary>
    /// 绑定ddl中的彩种,玩法
    /// </summary>
    private void BindDataForLottery()
    {
        ddlLottery.Items.Clear();
        ddlLottery.Items.Add(new ListItem("全部彩种", "-1"));

        ddlLotterySet.Items.Clear();
        ddlLotterySet.Items.Add(new ListItem("全部彩种", "-1"));
        BindDataForPlayType(2);
        ddlWhoLottery.Items.Clear();

        ddlWhoLottery.Items.Add(new ListItem("全部彩种", "-1"));
        BindDataForPlayType(3);
        if (_Site.UseLotteryList == "")
        {
            PF.GoError(ErrorNumber.Unknow, "暂无玩法", "Room_InvestHistory");

            return;
        }

        DataTable dt = new DAL.Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + (_Site.UseLotteryList == "" ? "-1" : _Site.UseLotteryList) + ")", "[Order]");

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

            return;
        }
        //绑定彩种
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            string strLotteryName = dt.Rows[i]["Name"].ToString();
            if (dt.Rows[i]["ID"].ToString() == "61")
            {
                strLotteryName = strLotteryName.Replace("江西","");
            }
            ddlLottery.Items.Add(new ListItem(strLotteryName, dt.Rows[i]["ID"].ToString()));
            ddlLotterySet.Items.Add(new ListItem(strLotteryName, dt.Rows[i]["ID"].ToString()));
            ddlWhoLottery.Items.Add(new ListItem(strLotteryName, dt.Rows[i]["ID"].ToString()));
        }
    }
Ejemplo n.º 26
0
    private void BindDataForLottery()
    {
        DataTable dt = new DAL.Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (" + (_Site.UseLotteryListRestrictions == "" ? "-1" : _Site.UseLotteryListRestrictions) + ")", "[ID]");

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

            return;
        }

        g.DataSource = dt;
        g.DataBind();

        g.Columns[2].Visible = false;

        // 选中已经设置的彩种
        for (int i = 0; i < g.Rows.Count; i++)
        {
            CheckBox cbisUsed = (CheckBox)g.Rows[i].Cells[1].FindControl("cbisUsed");

            if (_Site.UseLotteryListRestrictions == "")
            {
                cbisUsed.Checked = false;

                continue;
            }

            int LotteryID = Shove._Convert.StrToInt(g.Rows[i].Cells[2].Text, -1);

            if (LotteryID < 1)
            {
                continue;
            }

            cbisUsed.Checked = (("," + _Site.UseLotteryList + ",").IndexOf("," + LotteryID.ToString() + ",") >= 0);
        }
    }
 private void BindDataForLottery()
 {
     DataTable table = new Tables.T_Lotteries().Open("[ID], [Name], PrintOutType", "[ID] in (" + ((base._Site.UseLotteryListRestrictions == "") ? "-1" : base._Site.UseLotteryListRestrictions) + ")", "[Order]");
     if (table == null)
     {
         PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName);
     }
     else
     {
         this.g.DataSource = table;
         this.g.DataBind();
         this.g.Columns[2].Visible = false;
         this.g.Columns[3].Visible = false;
         for (int i = 0; i < this.g.Rows.Count; i++)
         {
             DropDownList ddl = (DropDownList)this.g.Rows[i].Cells[1].FindControl("ddlElectronTicket");
             if (_Convert.StrToInt(this.g.Rows[i].Cells[2].Text, -1) >= 1)
             {
                 ControlExt.SetDownListBoxTextFromValue(ddl, _Convert.StrToShort(this.g.Rows[i].Cells[3].Text, 0).ToString());
             }
         }
     }
 }
 private void BindDataForLottery()
 {
     DataTable dt = new Tables.T_Lotteries().Open("[ID], [Name]", "[ID] in (1,2,3,4,9,10,14,15,39)", "[Order]");
     if (dt == null)
     {
         PF.GoError(4, "数据库繁忙,请重试", base.GetType().FullName);
     }
     else
     {
         ControlExt.FillDropDownList(this.ddlLottery, dt, "Name", "ID");
     }
 }
Ejemplo n.º 29
0
 private void BindDataForLottery()
 {
     this.ddlLottery.Items.Clear();
     this.ddlLottery.Items.Add(new ListItem("全部彩种", "-1"));
     if (base._Site.UseLotteryList == "")
     {
         PF.GoError(1, "暂无玩法", "Room_InvestHistory");
     }
     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++)
         {
             this.ddlLottery.Items.Add(new ListItem(cacheAsDataTable.Rows[i]["Name"].ToString(), cacheAsDataTable.Rows[i]["ID"].ToString()));
         }
     }
 }
Ejemplo n.º 30
0
    /// <summary>
    /// 获得彩种
    /// </summary>
    /// <param name="_lotteryId">彩种ID</param>
    /// <returns>彩种Name</returns>
    protected string GetLottery(object _lotteryId)
    {
        int lotteryId = Shove._Convert.StrToInt(_lotteryId.ToString(), 0);
        if (lotteryId < 1)
        {
            return "全部彩种";
        }
        else
        {
            DataTable dt = new DAL.Tables.T_Lotteries().Open("Name", "id = " + lotteryId, "");
            return dt.Rows[0][0].ToString();
        }

    }