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