Ejemplo n.º 1
0
 public void AddObserver(ModelObserve observer)
 {
     if (observer.Duration.TimeOfDay >= TimeSpan.FromSeconds(30))
     {
         context.Entry(observer).State = System.Data.Entity.EntityState.Added;
         context.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public StatisticItem(ModelObserve observe)
 {
     Id                = observe.ObserveId;
     Name              = observe.Name;
     TypeItem          = GetTypeItem(observe.TypeItem);
     Duration          = GetDuration(observe.Duration);
     PC                = GetPC(observe.PC);
     TimeStart         = GetTimeStart(observe.TimeStart);
     TimePause         = GetTimePause(observe.TimePause);
     TimeStop          = GetTimeStop(observe.TimeStop);
     PressStartCounter = observe.PressStartCouner;
     PressPauseCounter = observe.PressPauseCouner;
     Halted            = GetHalted(observe.Halted);
     Manager           = GetManager(observe.User);
 }