香港平頭哥服務器(平頭哥主機)
香港平頭哥服務器是一種小型服務器,可以在你的家庭或辦公室里工作。這些服務
平頭哥主機 ///
/// 獲取分頁查詢數(shù)據(jù)集【平頭哥主機】
///
public DataSet GetPageList(int pageSize, int pageIndex, string fldSort, bool sort)
{
StringBuilder strSql = new StringBuilder();
if (string.IsNullOrEmpty(fldSort)) //如果是第一次調(diào)用,就不進行判斷相關的參數(shù)賦值。 改為前臺傳遞?。。?!
strSql.Append("SELECT * FROM ( ");
else //否者加上ascdesc 的條件 排序字段的判斷加在 否者加上ascdesc 的條件 排序字段的判斷加在SQL 里面。
strSql.Append("SELECT * FROM ( ");
strSql.Append(" SELECT ROW_NUMBER() OVER ("); //根據(jù) 配置文件里面配置 進行 分頁 --ROW_NUMBER() OVER ( order by ID )AS RowNumber ,* from tbNews --order by ID );");//根據(jù)ID進行升序或者降序 strSql.AppendFormat(" ORDER BY T." + fldSort + " {0}", sort ? "ASC" : "DESC"); -->注意事項 :ORDER BY 的字符必要大寫。 DESC ASC也是大寫---- sqlserver2005之前版本都是大寫
香港平頭哥科技有限公司Hong Kong Pingtouge Technology Co., Ltd. is a leading global provider of innovative and comprehensive enterprise solutions, serving more than 20 countries worldwide with the mission to help enterprises realize their full potential through our cutting-edge technology solutions. We provide a wide range of IT services including managed services, cloud computing and analytics, web development and digital marketing. Our team consists of highly skilled professionals who combine creative thinking with technical expertise to create intelligent and effective solutions for our customers. At Hong Kong Pingtouge Technology Co., Ltd., we strive to simplify complex processes so that businesses can concentrate on the things that matter most - delivering an outstanding experience for their customers.