Fix tool manager Osai update functions
Fix UI
This commit is contained in:
@@ -173,7 +173,7 @@ namespace Step.Database.Controllers
|
||||
return dtoShanks;
|
||||
}
|
||||
|
||||
public List<DbNcMagazinePositionModel> FindMagazinePositions()
|
||||
public List<DbNcMagazinePositionModel> FindMagazinesPositions()
|
||||
{
|
||||
List<DbNcMagazinePositionModel> positions = dbCtx
|
||||
.MagazinePositions
|
||||
@@ -264,8 +264,10 @@ namespace Step.Database.Controllers
|
||||
{
|
||||
DbNcToolModel tool = FindTool(toolId);
|
||||
|
||||
var shankId = tool.ShankId;
|
||||
// Update db model
|
||||
SupportFunctions.CopyProperties(dtoTool, tool);
|
||||
tool.ShankId = shankId;
|
||||
|
||||
// Save
|
||||
dbCtx.SaveChanges();
|
||||
@@ -346,10 +348,12 @@ namespace Step.Database.Controllers
|
||||
return dbShank;
|
||||
}
|
||||
|
||||
public void DeleteShank(int shankId)
|
||||
public DbNcShankModel DeleteShank(int shankId)
|
||||
{
|
||||
DbNcShankModel shank = FindShankWithTools(shankId);
|
||||
DeleteShank(shank);
|
||||
|
||||
return shank;
|
||||
}
|
||||
|
||||
public void DeleteShank(DbNcShankModel shank)
|
||||
@@ -361,6 +365,7 @@ namespace Step.Database.Controllers
|
||||
|
||||
public DbNcMagazinePositionModel UpdatePosition(DbNcMagazinePositionModel dbPos, DTONcMagazinePositionModel dtoPos)
|
||||
{
|
||||
dbCtx.MagazinePositions.Attach(dbPos);
|
||||
dbPos.Type = dtoPos.Type;
|
||||
dbPos.Disabled = dtoPos.Disabled;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user