using System.Collections.Generic; using System.Web.Http; using Model; namespace Mvc.Controllers { public class DrawController : ApiController { // // GET: /Draw/ [HttpGet] public ResponseData> Index(string projectId, int index, int page,string name=null) { ResponseData> res = new ResponseData>(); if (name == null) name = ""; res.successful = true; res.resultValue = BLL.DrawService.GetDrawByProjectIdForApi(name,projectId, index, page); ; return res; } // // GET: /Draw/ [HttpGet] public ResponseData GetDrawByDrawId(string id) { ResponseData res = new ResponseData(); Check_Draw cd = BLL.DrawService.GetDrawByDrawId(id ); res.successful = true; res.resultValue = BeanUtil.CopyOjbect(cd, true); return res; } /// /// 根据code获取详情 /// /// /// public ResponseData GetDraw(string id) { ResponseData res = new ResponseData(); Check_Draw checkControl = BLL.DrawService.GetDrawForApi(id); res.successful = true; res.resultValue = BeanUtil.CopyOjbect(checkControl, true); res.resultValue.Edition = checkControl.Edition; return res; } // // GET: /Draw/ [HttpGet] public ResponseData responseData(string id) { ResponseData res = new ResponseData(); Check_Draw cd = BLL.DrawService.GetDrawByDrawId(id); res.successful = true; res.resultValue = BeanUtil.CopyOjbect(cd, true); return res; } [HttpGet] public ResponseData see(string dataId, string userId) { ResponseData res = new ResponseData(); res.successful = true; BLL.DrawApproveService.See(dataId, userId); return res; } } }