/// <summary> /// 根据条件查询日志分页信息 /// </summary> /// <param name="qModel">查询条件</param> /// <param name="pageM">分页对象</param> /// <returns>日志信息</returns> public MPagingData <List <LogModel> > GetInfoByWhere(LogQueryModel qModel, MPagingModel pageM) { DataSet ds = SQLServerManager.Pagination(qModel.GetQuerySQL(false), qModel.GetGroupStr(), pageM.PagingIndex, pageM.PagingSize); MPagingData <List <LogModel> > resM = new MPagingData <List <LogModel> >(); resM.Data = ConvertManager.DataTableToList <LogModel>(ds.Tables[0]); pageM.PagingIndex = Convert.ToInt32(ds.Tables[1].Rows[0][0]); pageM.DataCount = Convert.ToInt32(ds.Tables[1].Rows[0][1]); pageM.PagingCount = Convert.ToInt32(ds.Tables[1].Rows[0][2]); resM.PageInfo = pageM; return(resM); }
/// <summary> /// 根据条件查询日志信息 /// </summary> /// <param name="qModel">查询条件</param> /// <returns>日志信息</returns> public List <LogModel> GetInfoByWhere(LogQueryModel qModel) { DataSet ds = SQLServerManager.ExecuteQuery(qModel.GetQuerySQL(), qModel.ListParams.ToArray()); return(ConvertManager.DataTableToList <LogModel>(ds.Tables[0], true)); }
/// <summary> /// 列表转换为数据表 /// </summary> public void DataTableToList() { ListUserM = ConvertManager.DataTableToList <UserModel>(DtUser); }