Ejemplo n.º 1
0
 public IHttpActionResult Insertrecord([FromBody] BuildModels buildModels)
 {
     using (BuildService buildservice = new BuildService())
     {
         int insertdata = buildservice.InsertData(buildModels.Build_Date, buildModels.Class_ID, buildModels.Build_Money);
         if (insertdata == 1)
         {
             String status = buildservice.InsertImg(buildModels.Img_Base);
             if (status.Equals("新增成功"))
             {
                 return(Ok("新增成功"));
             }
             else
             {
                 return(Ok("圖片新增失敗"));
             }
         }
         else
         {
             return(Ok("新增失敗"));
         }
     }
 }