Added api to modify offsets

And magazine signalR
This commit is contained in:
Lucio Maranta
2018-08-29 17:02:51 +02:00
parent a54dd90472
commit 2e22f4db3d
10 changed files with 183 additions and 24 deletions
@@ -294,6 +294,29 @@ namespace Step.Database.Controllers
return tool;
}
public DbNcToolModel UpdateToolOffset(int toolId, int position, int offsetId)
{
DbNcToolModel tool = FindTool(toolId);
switch (position)
{
case 1:
tool.OffsetId1 = offsetId;
break;
case 2:
tool.OffsetId2 = offsetId;
break;
case 3:
tool.OffsetId3 = offsetId;
break;
}
// Save
dbCtx.SaveChanges();
return tool;
}
public void DeleteTool(int toolId)
{
DbNcToolModel tool = FindTool(toolId);