using BLL; using System; using System.Linq; using System.Web.Http; namespace WebAPI.Controllers.HSSE { public class ProtectionStandardsController : ApiController { #region 获取集合 /// /// 获取集合 /// /// 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获取 /// /// 根据id获取 /// /// 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 } }