using BLL; using System; using System.Linq; using System.Web.Http; namespace WebAPI.Controllers.HSSE { public class ConstructionStandardsController : ApiController { #region 获取集合 /// /// 获取集合 /// /// public Model.ResponeData getConstructionStandardsList(int PageNumber, int PageSize) { var responeData = new Model.ResponeData(); try { responeData.data = ConstructionStandardsService.GetConstructionStandardsList(PageNumber, PageSize); } catch (Exception ex) { responeData.code = 0; responeData.message = ex.Message; } return responeData; } #endregion #region 根据id获取 /// /// 根据id获取 /// /// public Model.ResponeData getConstructionStandardsListById(string ConstructionStandardsId) { var responeData = new Model.ResponeData(); try { var data = ConstructionStandardsService.GetConstructionStandardsListById(ConstructionStandardsId); data.AttachUrl = BLL.AttachFileService.getFileUrl(data.ConstructionStandardsId); responeData.data = data; } catch (Exception ex) { responeData.code = 0; responeData.message = ex.Message; } return responeData; } #endregion } }