fix:添加分页
This commit is contained in:
@@ -24,7 +24,7 @@ public class AwardStandardsService
|
||||
/// </summary>
|
||||
/// <param name="AwardStandardsId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<AwardStandardsItem> GetAwardStandardsList()
|
||||
public static List<AwardStandardsItem> GetAwardStandardsList(int PageNumber, int PageSize)
|
||||
{
|
||||
List<AwardStandardsItem> getDataLists = (from x in Funs.DB.Technique_AwardStandards
|
||||
select new AwardStandardsItem
|
||||
@@ -39,6 +39,11 @@ public class AwardStandardsService
|
||||
UpState = x.UpState,
|
||||
Remark = x.Remark
|
||||
}).ToList();
|
||||
if (PageNumber > 0 && PageSize > 0)
|
||||
{
|
||||
getDataLists = getDataLists.Skip((PageNumber - 1) * PageSize).Take(PageSize).ToList();
|
||||
}
|
||||
|
||||
return getDataLists;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public class ConstructionStandardsService
|
||||
/// </summary>
|
||||
/// <param name="ConstructionStandardsId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<ConstructionStandardsItem> GetConstructionStandardsList()
|
||||
public static List<ConstructionStandardsItem> GetConstructionStandardsList(int PageNumber, int PageSize)
|
||||
{
|
||||
List<ConstructionStandardsItem> getDataLists = (from x in Funs.DB.Technique_ConstructionStandards
|
||||
select new ConstructionStandardsItem
|
||||
@@ -39,6 +39,10 @@ public class ConstructionStandardsService
|
||||
UpState = x.UpState,
|
||||
Remark = x.Remark
|
||||
}).ToList();
|
||||
if (PageNumber > 0 && PageSize > 0)
|
||||
{
|
||||
getDataLists = getDataLists.Skip((PageNumber - 1) * PageSize).Take(PageSize).ToList();
|
||||
}
|
||||
return getDataLists;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public class SafetyResponsibilitiesService
|
||||
/// </summary>
|
||||
/// <param name="SafetyResponsibilitiesId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<SafetyResponsibilitiesItem> GetSafetyResponsibilitiesList()
|
||||
public static List<SafetyResponsibilitiesItem> GetSafetyResponsibilitiesList(int PageNumber, int PageSize)
|
||||
{
|
||||
List<SafetyResponsibilitiesItem> getDataLists = (from x in Funs.DB.Technique_SafetyResponsibilities
|
||||
select new SafetyResponsibilitiesItem
|
||||
@@ -39,6 +39,10 @@ public class SafetyResponsibilitiesService
|
||||
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