DTCMS_GetListByPage 水深无声 2023-10-16 20:34 8阅读 0赞 public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex) { StringBuilder strSql=new StringBuilder(); strSql.Append("select * from oa_org T "); if (!string.IsNullOrEmpty(strWhere.Trim())) { strSql.Append(" WHERE " + strWhere); } if (!string.IsNullOrEmpty(orderby.Trim())) { strSql.Append(" order by "+orderby); } strSql.AppendFormat(" limit {0} , {1}", startIndex, endIndex); return DbHelperMySQL.Query(strSql.ToString()); } Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex) { StringBuilder strSql = new StringBuilder(); strSql.Append("select T.*,m.real_name from oa_project T INNER JOIN dt_manager m on T.empid=m.id "); if (!string.IsNullOrEmpty(strWhere.Trim())) { strSql.Append(" and " + strWhere); } if (!string.IsNullOrEmpty(orderby.Trim())) { strSql.Append(" order by " + orderby); } strSql.AppendFormat(" limit {0} , {1}", startIndex, endIndex); return DbHelperMySQL.Query(strSql.ToString()); }
还没有评论,来说两句吧...