Files
NKC/NKC_WF/Controllers/BunkController.cs
T

93 lines
1.6 KiB
C#

using AppData;
using NKC_SDK;
using System.Web.Http;
namespace NKC_WF.Controllers
{
public class BunkController : ApiController
{
/// <summary>
/// Restituisce il FIRST BUNK da lavorare
/// </summary>
/// <returns></returns>
// GET: api/Bunk
[HttpGet]
public ProdBunk Get()
{
ProdBunk answ = null;
try
{
answ = ComLib.prodGetFirstBunk();
}
catch
{ }
return answ;
}
#if false
/// <summary>
/// Ottengo dati del BUNK RICHEISTO
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
// GET: api/Bunk/5
[HttpGet]
public WBunk Get(int id)
{
WBunk answ = null;
try
{
answ = ComLib.prodGetBunk(id);
}
catch
{ }
return answ;
}
#endif
/// <summary>
/// Ottengo NEXT BUNK
/// </summary>
/// <param name="id"></param>
/// <param name="showNext"></param>
/// <returns></returns>
// GET: api/GetNext/5
[HttpGet]
public ProdBunk Get(int id, bool showNext)
{
ProdBunk answ = null;
try
{
if (showNext)
{
answ = ComLib.prodGetNextBunk(id);
}
else
{
answ = ComLib.prodGetBunk(id);
}
}
catch
{ }
return answ;
}
// POST: api/Bunk
[HttpPost]
public void Post([FromBody]string value)
{
}
// PUT: api/Bunk/5
[HttpPut]
public void Put(int id, [FromBody]string value)
{
}
// DELETE: api/Bunk/5
[HttpDelete]
public void Delete(int id)
{
}
}
}