fix:添加分页
This commit is contained in:
parent
edda376377
commit
557c867b56
|
@ -24,7 +24,7 @@ public class AwardStandardsService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="AwardStandardsId"></param>
|
/// <param name="AwardStandardsId"></param>
|
||||||
/// <returns></returns>
|
/// <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
|
List<AwardStandardsItem> getDataLists = (from x in Funs.DB.Technique_AwardStandards
|
||||||
select new AwardStandardsItem
|
select new AwardStandardsItem
|
||||||
|
@ -39,6 +39,11 @@ public class AwardStandardsService
|
||||||
UpState = x.UpState,
|
UpState = x.UpState,
|
||||||
Remark = x.Remark
|
Remark = x.Remark
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
if (PageNumber > 0 && PageSize > 0)
|
||||||
|
{
|
||||||
|
getDataLists = getDataLists.Skip((PageNumber - 1) * PageSize).Take(PageSize).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
return getDataLists;
|
return getDataLists;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class ConstructionStandardsService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ConstructionStandardsId"></param>
|
/// <param name="ConstructionStandardsId"></param>
|
||||||
/// <returns></returns>
|
/// <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
|
List<ConstructionStandardsItem> getDataLists = (from x in Funs.DB.Technique_ConstructionStandards
|
||||||
select new ConstructionStandardsItem
|
select new ConstructionStandardsItem
|
||||||
|
@ -39,6 +39,10 @@ public class ConstructionStandardsService
|
||||||
UpState = x.UpState,
|
UpState = x.UpState,
|
||||||
Remark = x.Remark
|
Remark = x.Remark
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
if (PageNumber > 0 && PageSize > 0)
|
||||||
|
{
|
||||||
|
getDataLists = getDataLists.Skip((PageNumber - 1) * PageSize).Take(PageSize).ToList();
|
||||||
|
}
|
||||||
return getDataLists;
|
return getDataLists;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class ProtectionStandardsService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ProtectionStandardsId"></param>
|
/// <param name="ProtectionStandardsId"></param>
|
||||||
/// <returns></returns>
|
/// <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
|
List<ProtectionStandardsItem> getDataLists = (from x in Funs.DB.Technique_ProtectionStandards
|
||||||
select new ProtectionStandardsItem
|
select new ProtectionStandardsItem
|
||||||
|
@ -41,6 +41,10 @@ public class ProtectionStandardsService
|
||||||
UpState = x.UpState,
|
UpState = x.UpState,
|
||||||
Remark = x.Remark
|
Remark = x.Remark
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
if (PageNumber > 0 && PageSize > 0)
|
||||||
|
{
|
||||||
|
getDataLists = getDataLists.Skip((PageNumber - 1) * PageSize).Take(PageSize).ToList();
|
||||||
|
}
|
||||||
return getDataLists;
|
return getDataLists;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class SafetyResponsibilitiesService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="SafetyResponsibilitiesId"></param>
|
/// <param name="SafetyResponsibilitiesId"></param>
|
||||||
/// <returns></returns>
|
/// <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
|
List<SafetyResponsibilitiesItem> getDataLists = (from x in Funs.DB.Technique_SafetyResponsibilities
|
||||||
select new SafetyResponsibilitiesItem
|
select new SafetyResponsibilitiesItem
|
||||||
|
@ -39,6 +39,10 @@ public class SafetyResponsibilitiesService
|
||||||
UpState = x.UpState,
|
UpState = x.UpState,
|
||||||
Remark = x.Remark
|
Remark = x.Remark
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
if (PageNumber > 0 && PageSize > 0)
|
||||||
|
{
|
||||||
|
getDataLists = getDataLists.Skip((PageNumber - 1) * PageSize).Take(PageSize).ToList();
|
||||||
|
}
|
||||||
return getDataLists;
|
return getDataLists;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,12 +12,12 @@ namespace WebAPI.Controllers.HSSE
|
||||||
/// 获取集合
|
/// 获取集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Model.ResponeData getAwardStandardsList()
|
public Model.ResponeData getAwardStandardsList(int PageNumber, int PageSize)
|
||||||
{
|
{
|
||||||
var responeData = new Model.ResponeData();
|
var responeData = new Model.ResponeData();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
responeData.data = AwardStandardsService.GetAwardStandardsList();
|
responeData.data = AwardStandardsService.GetAwardStandardsList(PageNumber,PageSize);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,12 +12,12 @@ namespace WebAPI.Controllers.HSSE
|
||||||
/// 获取集合
|
/// 获取集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Model.ResponeData getConstructionStandardsList()
|
public Model.ResponeData getConstructionStandardsList(int PageNumber, int PageSize)
|
||||||
{
|
{
|
||||||
var responeData = new Model.ResponeData();
|
var responeData = new Model.ResponeData();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
responeData.data = ConstructionStandardsService.GetConstructionStandardsList();
|
responeData.data = ConstructionStandardsService.GetConstructionStandardsList(PageNumber, PageSize);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,12 +11,12 @@ namespace WebAPI.Controllers.HSSE
|
||||||
/// 获取集合
|
/// 获取集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Model.ResponeData getProtectionStandardsList()
|
public Model.ResponeData getProtectionStandardsList(int PageNumber, int PageSize)
|
||||||
{
|
{
|
||||||
var responeData = new Model.ResponeData();
|
var responeData = new Model.ResponeData();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
responeData.data = ProtectionStandardsService.GetProtectionStandardsList();
|
responeData.data = ProtectionStandardsService.GetProtectionStandardsList(PageNumber, PageSize);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,12 +12,12 @@ namespace WebAPI.Controllers.HSSE
|
||||||
/// 获取集合
|
/// 获取集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Model.ResponeData getSafetyResponsibilitiesList()
|
public Model.ResponeData getSafetyResponsibilitiesList(int PageNumber, int PageSize)
|
||||||
{
|
{
|
||||||
var responeData = new Model.ResponeData();
|
var responeData = new Model.ResponeData();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
responeData.data = SafetyResponsibilitiesService.GetSafetyResponsibilitiesList();
|
responeData.data = SafetyResponsibilitiesService.GetSafetyResponsibilitiesList(PageNumber, PageSize);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue