Пример #1
0
        protected void bindSorce()
        {
            DataSet ds = aca_bll.GetAcademic();

            ddl_source.DataValueField = "academic_id";
            ddl_source.DataTextField  = "academic_name";
            ddl_source.DataSource     = ds;
            ddl_source.DataBind();
        }
Пример #2
0
        //绑定新闻来源——院系
        protected void bindSource()
        {
            DataSet ds = aca_bll.GetAcademic();

            this.tg_ly.DataValueField = "academic_id";
            this.tg_ly.DataTextField  = "academic_name";
            this.tg_ly.DataSource     = ds;
            this.tg_ly.DataBind();
        }
Пример #3
0
        //绑定学院列表
        protected void bindAcademic()
        {
            DataSet ds = aca_bll.GetAcademic();

            ddl_academic.DataValueField = "academic_id";
            ddl_academic.DataTextField  = "academic_name";
            ddl_academic.DataSource     = ds;
            ddl_academic.DataBind();
            ddl_academic.Items.Insert(0, new ListItem("", "0"));
        }
Пример #4
0
        protected void bindSorce()
        {
            YouthAcademicBLL aca_bll = new YouthAcademicBLL();
            DataSet          ds      = aca_bll.GetAcademic();

            ddl_source.DataValueField = "academic_id";
            ddl_source.DataTextField  = "academic_name";
            ddl_source.DataSource     = ds;
            ddl_source.DataBind();
            ddl_source.Items.Insert(0, new ListItem("", "0"));
        }
        //绑定新闻来源——院系
        protected void bindSource()
        {
            DataSet   ds       = aca_bll.GetAcademic();
            DataTable dtSource = ds.Tables[0];

            DataRow newRow = dtSource.NewRow();

            newRow["academic_id"]   = "-1";
            newRow["academic_name"] = "请选择来源";
            dtSource.Rows.InsertAt(newRow, 0);

            this.tg_ly.DataValueField = "academic_id";
            this.tg_ly.DataTextField  = "academic_name";
            this.tg_ly.DataSource     = dtSource;
            this.tg_ly.DataBind();
        }