Example #1
0
        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();
        }
Example #2
0
        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();
        }
Example #3
0
        private OperatorShiftLog CreateNewShift(DateTime dateTime)
        {
            //dateTime = AdjustDateIfAfter12OClock(dateTime);
            OperatorShiftLog newLog = new OperatorShiftLog()
            {
                Date       = dateTime,
                DaysNights = GetShiftDayNight(dateTime),
            };

            _batchContext.Add(newLog);
            _batchContext.SaveChanges();
            return(newLog);
        }
Example #4
0
 public OperatorLogViewModel()
 {
     CurrentShift = new OperatorShiftLog();
     BatchReports = new List <BatchWithCIPViewModel>();
 }