private void getProtypeList() { SearchNewsType search = new SearchNewsType(); using (BLLNewsType bll = new BLLNewsType()) { DataTable dt = bll.GetTable(search);//ScriptQuery.SortEnum.DESC if (dt != null) { ddlNewsType.DataSource = dt; ddlNewsType.DataTextField = NewsType.NewsTypeName_FieldName; ddlNewsType.DataValueField = NewsType.ID_FieldName; ddlNewsType.DataBind(); } } }
private void getProtypeList() { SearchNewsType search = new SearchNewsType(); using (BLLNewsType bll = new BLLNewsType()) { DataTable dt = bll.GetTable(search); if (dt != null) { ddlNewsType.DataSource = dt; ddlNewsType.DataTextField = NewsType.NewsTypeName_FieldName; ddlNewsType.DataValueField = NewsType.ID_FieldName; ddlNewsType.DataBind(); ddlNewsType.Items.Insert(0, new ListItem("==请选择类型==", "0")); } } }