public object GetSample([FromUri] string styleId) { if (styleId != "") { var obj = SampleOper.GetSample(styleId); if (obj != null) { return(Ok(obj)); } else { return(BadRequest("找到不指定ID的样衣信息")); } } return(NotFound()); }
public object GetEditSample([FromUri] string styleId) { if (styleId != "") { var obj = SampleOper.GetSample(styleId); if (obj != null) { SessionManage.CurrentSample = new SampleInfo(SessionManage.CurrentUser); SessionManage.CurrentSample.LoadSampleById(styleId); return(Ok(obj)); } else { return(BadRequest("找到不指定ID的样衣信息")); } } return(NotFound()); }