public List <vw_KeyValueDate> GetCircuitRolls(int CircuitID, int?CaseType)
        {
            List <DateTime>        dates = new List <DateTime>();
            List <DateTime>        DatesWithoutWeekends = new List <DateTime>();
            List <vw_KeyValueDate> RemovedItems         = new List <vw_KeyValueDate>();

            var rolls = CircuitRollsRepository.GetCircuitRolls(CircuitID, CaseType).ToList();

            foreach (var item in rolls)
            {
                dates.Add(item.Date);
            }
            DatesWithoutWeekends = RemoveWeeekends(dates);

            foreach (var item in rolls)
            {
                if (!DatesWithoutWeekends.Contains(item.Date))
                {
                    RemovedItems.Add(item);
                }
            }
            rolls = rolls.Except(RemovedItems).Distinct().ToList();

            return(rolls);
        }
Ejemplo n.º 2
0
 public List <vw_KeyValueDate> GetCircuitRolls(int CircuitID)
 {
     return(CircuitRollsRepository.GetCircuitRolls(CircuitID));
 }