fix:添加分页
This commit is contained in:
parent
edda376377
commit
557c867b56
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,12 +12,12 @@ namespace WebAPI.Controllers.HSSE
|
|||
/// 获取集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getAwardStandardsList()
|
||||
public Model.ResponeData getAwardStandardsList(int PageNumber, int PageSize)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = AwardStandardsService.GetAwardStandardsList();
|
||||
responeData.data = AwardStandardsService.GetAwardStandardsList(PageNumber,PageSize);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -12,12 +12,12 @@ namespace WebAPI.Controllers.HSSE
|
|||
/// 获取集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getConstructionStandardsList()
|
||||
public Model.ResponeData getConstructionStandardsList(int PageNumber, int PageSize)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = ConstructionStandardsService.GetConstructionStandardsList();
|
||||
responeData.data = ConstructionStandardsService.GetConstructionStandardsList(PageNumber, PageSize);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -11,12 +11,12 @@ namespace WebAPI.Controllers.HSSE
|
|||
/// 获取集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getProtectionStandardsList()
|
||||
public Model.ResponeData getProtectionStandardsList(int PageNumber, int PageSize)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = ProtectionStandardsService.GetProtectionStandardsList();
|
||||
responeData.data = ProtectionStandardsService.GetProtectionStandardsList(PageNumber, PageSize);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -12,12 +12,12 @@ namespace WebAPI.Controllers.HSSE
|
|||
/// 获取集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getSafetyResponsibilitiesList()
|
||||
public Model.ResponeData getSafetyResponsibilitiesList(int PageNumber, int PageSize)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = SafetyResponsibilitiesService.GetSafetyResponsibilitiesList();
|
||||
responeData.data = SafetyResponsibilitiesService.GetSafetyResponsibilitiesList(PageNumber, PageSize);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue