日期:2014-05-18 浏览次数:20410 次
public DataSet GetList(string strWhere) { StringBuilder strSql = new StringBuilder(); strSql.Append("select NewsTypeID,NewsType "); strSql.Append(" FROM Accounts_NewsType "); if (strWhere.Trim() != "") { strSql.Append(" where " + strWhere); } return SQLHelper.Query(strSql.ToString()); }
public DataSet GetList(string strWhere) { return dal.GetList(strWhere); } public DataSet GetAllList() { return GetList(""); }
private void BindNewsType() { BLL.Accounts_NewsType bll = new BLL.Accounts_NewsType(); DataSet ds = bll.GetAllList(); this. NewsType.DataSource = ds.Tables[0]; this.NewsType.DataTextField = "NewsType"; this.NewsType.DataValueField = "NewsTypeID"; this.NewsType.DataBind(); }