Exemplo n.º 1
0
 private void BindData()
 {
     zs.BLL.Tbl_Xueyuan bllg = new zs.BLL.Tbl_Xueyuan();
     this.ddl_xueyuanid.DataSource     = bllg.GetModelList("");
     this.ddl_xueyuanid.DataTextField  = "name";
     this.ddl_xueyuanid.DataValueField = "id";
     this.ddl_xueyuanid.DataBind();
     if (Request.QueryString["id"] != null)
     {
         string ids = Request.QueryString["id"].ToString();
         if (ids != "0")
         {
             zs.Model.Tbl_Zhuanye model = bll.GetModel(int.Parse(ids));
             this.tb_name.Text = model.name;
             //this.tb_cont.Html = model.cont;
             this.ddl_xueyuanid.SelectedValue = model.xueyuanid.Value.ToString();
             this.btn_add.Text = "修改";
         }
     }
 }