Пример #1
0
        public void PostClocking(Clocking clocking)
        {
            var timeClock = TimeClockRepository.GetByUserName(clocking.UserName);

            if (timeClock == null)
                timeClock = new TimeClock(clocking.UserName);

            timeClock.AddTime(clocking.Date);

               TimeClockRepository.Store(timeClock);
        }
 public void Store(TimeClock timeClock)
 {
     Session.Store(timeClock);
     Session.SaveChanges();
 }
Пример #3
0
 protected bool Equals(TimeClock other)
 {
     return string.Equals(UserName, other.UserName) &&
            Enumerable.SequenceEqual(CheckedTimes.OrderBy(x => x), other.CheckedTimes.OrderBy(x => x));
 }