public WriteJobs( IWriteData d, IReadDataAccess readDb, IHoldManagement h, BlackMaple.MachineFramework.JobDB jDB, BlackMaple.MachineFramework.JobLogDB jLog, FMSSettings settings, bool check, bool useStarting, string progDir ) { writeDb = d; readDatabase = readDb; hold = h; jobDB = jDB; log = jLog; CheckPalletsUsedOnce = check; UseStartingOffsetForDueDate = useStarting; fmsSettings = settings; ProgramDirectory = progDir; var sch = jobDB.LoadMostRecentSchedule(); if (sch.Jobs != null) { foreach (var j in sch.Jobs) { for (int proc = 1; proc <= j.NumProcesses; proc++) { for (int path = 1; path <= j.GetNumPaths(proc); path++) { foreach (var stop in j.GetMachiningStop(proc, path)) { if (!string.IsNullOrEmpty(stop.StationGroup)) { _machineGroupName = stop.StationGroup; goto foundGroup; } } } } } foundGroup :; } }
public WriteJobs( IWriteData d, IReadDataAccess readDb, IHoldManagement h, BlackMaple.MachineFramework.JobDB jDB, BlackMaple.MachineFramework.JobLogDB jLog, FMSSettings settings, bool check, bool useStarting ) { writeDb = d; readDatabase = readDb; hold = h; jobDB = jDB; log = jLog; CheckPalletsUsedOnce = check; UseStartingOffsetForDueDate = useStarting; fmsSettings = settings; }