fix:添加分页
This commit is contained in:
@@ -26,7 +26,7 @@ public class ProtectionStandardsService
|
||||
/// </summary>
|
||||
/// <param name="ProtectionStandardsId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<ProtectionStandardsItem> GetProtectionStandardsList()
|
||||
public static List<ProtectionStandardsItem> GetProtectionStandardsList(int PageNumber, int PageSize)
|
||||
{
|
||||
List<ProtectionStandardsItem> getDataLists = (from x in Funs.DB.Technique_ProtectionStandards
|
||||
select new ProtectionStandardsItem
|
||||
@@ -41,6 +41,10 @@ public class ProtectionStandardsService
|
||||
UpState = x.UpState,
|
||||
Remark = x.Remark
|
||||
}).ToList();
|
||||
if (PageNumber > 0 && PageSize > 0)
|
||||
{
|
||||
getDataLists = getDataLists.Skip((PageNumber - 1) * PageSize).Take(PageSize).ToList();
|
||||
}
|
||||
return getDataLists;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user