Пример #1
0
 public WorkAreaVisitEvent(WorkDay _workDay, WorkArea _workArea, AreaVisitEvent _event)
 {
     workDay = _workDay;
     workArea = _workArea;
     device = _event.device;
     areaEvent = _event;
 }
Пример #2
0
 private void _workAreaModule_AreaVisitEvent(object _sender, AreaVisitEvent _e)
 {
     WorkDay wd = workDayModule.currentWorkDay;
     if (wd == null)
     {
         System.Diagnostics.Debug.Write("Area visit event with no started work day.");
         return;
     }
     try
     {
         WorkArea wa = (
             from m in db.WorkAreas
             where m.workDayId == wd.workDayId &&
             m.areaId == _e.area.areaId
             select m
         ).First<WorkArea>();
         WorkAreaVisitEventHandler(this, new WorkAreaVisitEvent(wd, wa, _e));
     }
     catch (Exception)
     {
         System.Diagnostics.Debug.Write("There is no work area associated with '" + _e.area.areaName +"' in current work day (" + wd.workDayId + ")");
     }
 }