diff --git a/EgtBEAMWALL.DataLayer/Controllers/MachGroupController.cs b/EgtBEAMWALL.DataLayer/Controllers/MachGroupController.cs
index fe1ca2b0..ea169c3d 100644
--- a/EgtBEAMWALL.DataLayer/Controllers/MachGroupController.cs
+++ b/EgtBEAMWALL.DataLayer/Controllers/MachGroupController.cs
@@ -309,6 +309,39 @@ namespace EgtBEAMWALL.DataLayer.Controllers
return done;
}
+ ///
+ /// Set Supervisor & state for MachGroup
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool UpdateEnd(int ProdId, int MachGroupId, int PartId, DateTime DtEnd)
+ {
+ bool done = false;
+ try
+ {
+ // aggiorno
+ var currRecord = dbCtx
+ .PartList
+ .Where(x => x.MachGroup.Prod.ProdId == ProdId && x.MachGroup.MachGroupId == MachGroupId && x.PartId == PartId)
+ .FirstOrDefault();
+
+ currRecord.DtEnd = DtEnd;
+
+ // Commit changes
+ dbCtx.SaveChanges();
+ done = true;
+ }
+ catch (Exception exc)
+ {
+ Console.WriteLine($"EXCEPTION on UpdateStartEnd: {exc}");
+ }
+
+ return done;
+ }
+
///
/// Set Order for MachGroup
///
@@ -338,6 +371,39 @@ namespace EgtBEAMWALL.DataLayer.Controllers
return done;
}
+ ///
+ /// Set Supervisor & state for MachGroup
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool UpdateStart(int ProdId, int MachGroupId, int PartId, DateTime DtStart)
+ {
+ bool done = false;
+ try
+ {
+ // aggiorno
+ var currRecord = dbCtx
+ .PartList
+ .Where(x => x.MachGroup.Prod.ProdId == ProdId && x.MachGroup.MachGroupId == MachGroupId && x.PartId == PartId)
+ .FirstOrDefault();
+
+ currRecord.DtStart = DtStart;
+
+ // Commit changes
+ dbCtx.SaveChanges();
+ done = true;
+ }
+ catch (Exception exc)
+ {
+ Console.WriteLine($"EXCEPTION on UpdateStartEnd: {exc}");
+ }
+
+ return done;
+ }
+
///
/// Set Supervisor & state for MachGroup
///