65 lines
1.3 KiB
C#
65 lines
1.3 KiB
C#
using AppData;
|
|
using NKC_SDK;
|
|
using System.Collections.Generic;
|
|
using System.Web.Http;
|
|
|
|
namespace NKC_WF.Controllers
|
|
{
|
|
public class MaterialController : ApiController
|
|
{
|
|
/// <summary>
|
|
/// Restituisce ELENCO materiali
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
// GET: api/Bunk
|
|
[HttpGet]
|
|
public List<Material> Get()
|
|
{
|
|
List<Material> answ = new List<Material>();
|
|
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
|
|
|
|
}
|
|
}
|