コード例 #1
0
ファイル: WorkShiftModule.cs プロジェクト: Ivansus/pgsources
 private void _resetWorkShift(WorkShift _shift, WorkEmployer _employer, WorkAreaVisitEvent _event)
 {
     if (_shift.workShiftType == WorkShiftTypes.wstOnce) {
         // this is one call shift, like cook station, it signaled by some outside activity, not timer.
         _shift.notificationTimerDelay = Int32.MaxValue;
         _shift.alarmTimerDelay = Int32.MaxValue;
         _shift.shiftState = WorkShiftState.wssInactive;
         _shift.lastAccessTime = Core.now();
         db.SaveChangesAsync();
         ResetEventHandler(this, new WorkShiftInfoEvent(_shift));
     } else if (_shift.workShiftType == WorkShiftTypes.wstPassive)
     {
         // Passive work shifts created only for logging emploers access and havent timer and notifications.
     } else if (_shift.workShiftType == WorkShiftTypes.wstActive)
     {
         int nNow = Core.now();
         _shift.notificationTimerDelay = nNow + 5*60;
         _shift.alarmTimerDelay = nNow + 10 * 60;
         _shift.lastAccessTime = Core.now();
         db.SaveChangesAsync();
         ResetEventHandler(this, new WorkShiftInfoEvent(_shift));
     }
 }
コード例 #2
0
ファイル: WorkShiftModule.cs プロジェクト: Ivansus/pgsources
 public WorkShiftInfoEvent(WorkShift _shift)
 {
     workShift = _shift;
 }