/// <summary>分页获取数据列表 /// /// </summary> public DataSet GetList(string fileds, string order, string ordertype, int PageSize, int PageIndex, string strWhere) { MSSQLHelper h = new MSSQLHelper(GlobalHelp.ConfigConn); h.CreateStoredCommand("[proc_SplitPage]"); h.AddParameter("@tblName", "Bse_DataDictionary"); h.AddParameter("@strFields", fileds); h.AddParameter("@strOrder", order); h.AddParameter("@strOrderType", ordertype); h.AddParameter("@PageSize", PageSize); h.AddParameter("@PageIndex", PageIndex); h.AddParameter("@strWhere", strWhere); DataTable dt = h.ExecuteQuery(); DataSet ds = new DataSet(); ds.Tables.Add(dt); return(ds); }
/// <summary>分页获取数据列表 /// /// </summary> public List <Nikita.Assist.DBManager.Model.Bse_DataDictionary> GetListArray(string fileds, string order, string ordertype, int PageSize, int PageIndex, string strWhere) { MSSQLHelper h = new MSSQLHelper(GlobalHelp.ConfigConn); h.CreateStoredCommand("[proc_SplitPage]"); h.AddParameter("@tblName", "Bse_DataDictionary"); h.AddParameter("@strFields", fileds); h.AddParameter("@strOrder", order); h.AddParameter("@strOrderType", ordertype); h.AddParameter("@PageSize", PageSize); h.AddParameter("@PageIndex", PageIndex); h.AddParameter("@strWhere", strWhere); List <Nikita.Assist.DBManager.Model.Bse_DataDictionary> list = new List <Nikita.Assist.DBManager.Model.Bse_DataDictionary>(); using (IDataReader dataReader = h.ExecuteReader()) { while (dataReader.Read()) { list.Add(ReaderBind(dataReader)); } h.CloseConn(); } return(list); }