예제 #1
0
 private void resetMonitorTimer(VacationOverTimeReason curOT)
 {
     if (MonitorTimer == null) MonitorTimer = new System.Timers.Timer();
     if (MonitorTimer != null && !timerStop)
     {
         //VacationOverTimeReason curOT = GetCurrentVocationOT();
         long interval = 60000; //1分钟间隔
         MonitorTimer.AutoReset = false;
         MonitorTimer.Enabled = true;
         MonitorTimer.Interval = interval;
         MonitorTimer.Elapsed += new ElapsedEventHandler(CheckVocation);
         MonitorTimer.Start();
     }
 }
예제 #2
0
 private void InitVacationOverTimeReasons()
 {
     if (vacationOverTimeReasons == null) vacationOverTimeReasons = new List<VacationOverTimeReason>();
     VacationOverTimeReason curOT = GetCurrentVocationOT();
     if (curOT == null)
     {
         VacationInfo curVac = GetCurrentVocation();
         if (curVac != null)
         {
             curOT = new VacationOverTimeReason();
             curOT.shp_VCMID = new Guid(curVac.Code);
             curOT.shp_cMachineID = this.MachineNo;
             curOT.shp_dBeginTime = curVac.StartDate;
             curOT.shp_dEndTime = curVac.EndDate;
             curOT.shp_cRemark = curVac.Description;//curVac.Type;
             curOT.shp_VCMName = curVac.Description;
             vacationOverTimeReasons.Add(curOT);
             ChangeVacationData();
         }
     }
 }