/// <summary> /// 绑定Grid /// </summary> protected void BindGrid() { LCheckGunBB lCheckGunBB = new LCheckGunBB(); DataSet ds = new DataSet(); try { ds = lCheckGunBB.GetList(""); ddlGun.DataSource = ds; ddlGun.DataValueField = "id"; ddlGun.DataTextField = "checkGunNm"; ddlGun.DataBind(); ddlGun.Items.Insert(0, new ListItem("请选择", "0")); } finally { lCheckGunBB.Dispose(); } }
public DataTable GetCheckGun() { LCheckGunBB checkGunBB = new LCheckGunBB(); try { DataTable dt = new DataTable(); dt = checkGunBB.GetList("isDel=0").Tables[0]; return dt; } finally { checkGunBB.Dispose(); } }