56 lines
1.6 KiB
C#
56 lines
1.6 KiB
C#
using BLL;
|
|
using System;
|
|
using System.Linq;
|
|
using System.Web.Http;
|
|
namespace WebAPI.Controllers.HSSE
|
|
{
|
|
public class ProtectionStandardsController : ApiController
|
|
{
|
|
#region 获取集合
|
|
/// <summary>
|
|
/// 获取集合
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getProtectionStandardsList(int PageNumber, int PageSize)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = ProtectionStandardsService.GetProtectionStandardsList(PageNumber, PageSize);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 根据id获取
|
|
/// <summary>
|
|
/// 根据id获取
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Model.ResponeData getProtectionStandardsListById(string ProtectionStandardsId)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
var data = ProtectionStandardsService.GetProtectionStandardsListById(ProtectionStandardsId);
|
|
data.AttachUrl = BLL.AttachFileService.getFileUrl(data.ProtectionStandardsId);
|
|
responeData.data = data;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
#endregion
|
|
}
|
|
} |