示例#1
0
 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());
 }
示例#2
0
        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());
        }