Added:
+ Families API + Shanks API + Magazines Position API
This commit is contained in:
Binary file not shown.
@@ -652,6 +652,23 @@ namespace Step.NC
|
||||
return numericalControl.TOOLS_RToolTable(ref config);
|
||||
}
|
||||
|
||||
public CmsError GetShanksData(out List<ShankModel> shanks)
|
||||
{
|
||||
shanks = new List<ShankModel>();
|
||||
return numericalControl.TOOLS_RShanksData(ref shanks);
|
||||
}
|
||||
|
||||
public CmsError GetFamiliesData(out List<FamilyModel> families)
|
||||
{
|
||||
families = new List<FamilyModel>();
|
||||
return numericalControl.TOOLS_RFamilyData(ref families);
|
||||
}
|
||||
|
||||
public CmsError GetMagazinesPositionsData(out List<MagazinePositionsModel> magazinesPositions)
|
||||
{
|
||||
magazinesPositions = new List<MagazinePositionsModel>();
|
||||
return numericalControl.TOOLS_RMagazinePositions(ref magazinesPositions);
|
||||
}
|
||||
#endregion Read Data
|
||||
|
||||
#region Write data
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Step.Controllers.WebApi
|
||||
}
|
||||
|
||||
[Route("tools"), HttpGet]
|
||||
public IHttpActionResult GetToolTableData()
|
||||
public IHttpActionResult GetToolTable()
|
||||
{
|
||||
using (NcHandler ncHandler = new NcHandler())
|
||||
{
|
||||
@@ -37,5 +37,50 @@ namespace Step.Controllers.WebApi
|
||||
return Ok(tools);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("shanks"), HttpGet]
|
||||
public IHttpActionResult GetShanks()
|
||||
{
|
||||
using (NcHandler ncHandler = new NcHandler())
|
||||
{
|
||||
ncHandler.Connect();
|
||||
CmsError libraryError = ncHandler.GetShanksData(out List<ShankModel> shanks);
|
||||
if (libraryError.IsError())
|
||||
if (libraryError.errorCode != CMS_ERROR_CODES.NOT_CONNECTED)
|
||||
return BadRequest(libraryError.message);
|
||||
|
||||
return Ok(shanks);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("families"), HttpGet]
|
||||
public IHttpActionResult GetFamilies()
|
||||
{
|
||||
using (NcHandler ncHandler = new NcHandler())
|
||||
{
|
||||
ncHandler.Connect();
|
||||
CmsError libraryError = ncHandler.GetFamiliesData(out List<FamilyModel> families);
|
||||
if (libraryError.IsError())
|
||||
if (libraryError.errorCode != CMS_ERROR_CODES.NOT_CONNECTED)
|
||||
return BadRequest(libraryError.message);
|
||||
|
||||
return Ok(families);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("magazines_positions"), HttpGet]
|
||||
public IHttpActionResult GetMagazinesPositions()
|
||||
{
|
||||
using (NcHandler ncHandler = new NcHandler())
|
||||
{
|
||||
ncHandler.Connect();
|
||||
CmsError libraryError = ncHandler.GetMagazinesPositionsData(out List<MagazinePositionsModel> magazines);
|
||||
if (libraryError.IsError())
|
||||
if (libraryError.errorCode != CMS_ERROR_CODES.NOT_CONNECTED)
|
||||
return BadRequest(libraryError.message);
|
||||
|
||||
return Ok(magazines);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user