public void UpdateReworkTotes(int shiftId, int toteCount) { OperatorShiftLog shiftLog = _batchContext.ShiftLog.Where(x => x.OperatorShiftLogId == shiftId).First(); shiftLog.ReworkTotes = toteCount; _batchContext.Update(shiftLog); _batchContext.SaveChanges(); }
public void AddShiftColourOperatorsToShiftLog(int shiftId, string shiftColour) { ShiftTeam shiftTeam = GetOperators(shiftColour); OperatorShiftLog shiftLog = GetShiftLogById(shiftId); shiftLog.ShiftColour = shiftTeam.ShiftColour; shiftLog.Operators = $"{shiftTeam.Operator1}, {shiftTeam.Operator2}"; _batchContext.SaveChanges(); }
private OperatorShiftLog CreateNewShift(DateTime dateTime) { //dateTime = AdjustDateIfAfter12OClock(dateTime); OperatorShiftLog newLog = new OperatorShiftLog() { Date = dateTime, DaysNights = GetShiftDayNight(dateTime), }; _batchContext.Add(newLog); _batchContext.SaveChanges(); return(newLog); }
public OperatorLogViewModel() { CurrentShift = new OperatorShiftLog(); BatchReports = new List <BatchWithCIPViewModel>(); }