Beispiel #1
0
        public Dictionary <ISimpleEmployee, ICollection <SeatArrangement> > GetAgentsWithSeatArrangement(Guid[] employeeIds, DateTime start, DateTime end, IDictionary <string, SeatBox> seatBoxes)
        {
            var timeBoxes = _timeBoxRepository.GetTimeBoxesByRange(employeeIds, start, end);
            var results   = new Dictionary <ISimpleEmployee, ICollection <SeatArrangement> >(timeBoxes.Count);

            foreach (var timeBox in timeBoxes)
            {
                results[timeBox.Agent] = timeBox.TermSet.GenSeatArrangements(timeBox.Agent, seat => seatBoxes.ContainsKey(seat) ? seatBoxes[seat].SaftyGetProperty <Seat, SeatBox>(o => o.Seat) : default(Seat),
                                                                             (seat, seatArrangement) => true);
            }

            return(results);
        }
Beispiel #2
0
 public IList <TimeBox> Save(IList <TimeBox> timeBoxs)
 {
     _timeBoxRepository.Clear();
     return(_timeBoxRepository.GetTimeBoxesByRange(timeBoxs.Select(o => o.Agent.Id).ToArray(), _watchRange.Start,
                                                   _watchRange.End));
 }