using AppData; using NKC_SDK; using System.Collections.Generic; using System.Web.Http; namespace NKC_WF.Controllers { public class MaterialController : ApiController { /// /// Restituisce ELENCO materiali /// /// // GET: api/Bunk [HttpGet] public List Get() { List answ = new List(); var table = DataLayer.man.taMat.GetData(); Material currMat = new Material(); foreach (var item in table) { currMat = new Material() { MatID = item.MatID, MatDesc = item.MatDesc, MatExtCode = item.MatExtCode, MatDtmx = item.MatDtmx, ApprovDate = item.ApprovDate, ApprovUser = item.ApprovUser, L_mm = item.L_mm, W_mm = item.W_mm, T_mm = item.T_mm }; answ.Add(currMat); } return answ; } #if false // GET: api/Barch/5 public string Get(int id) { return "value"; } // POST: api/Barch public void Post([FromBody]string value) { } // PUT: api/Barch/5 public void Put(int id, [FromBody]string value) { } // DELETE: api/Barch/5 public void Delete(int id) { } #endif } }