public override IEnumerable <DetentionForOffence> ModifyDetention(IEnumerable <IOffence> offences, IDEntityList <StandardDetentionForOffence, IStandardDetentionForOffence> standardDetentions)
 {
     if (offences != null && offences.Count() > 1)
     {
         return(base.ModifyDetention(offences, standardDetentions));
     }
     else
     {
         return(null);
     }
 }
 public override IEnumerable <DetentionForOffence> GetDetention(IEnumerable <IOffence> offences, IDEntityList <StandardDetentionForOffence, IStandardDetentionForOffence> standardDetentions)
 {
     return(ModifyDetention(offences, standardDetentions));
 }
 public virtual IEnumerable <DetentionForOffence> ModifyDetention(IEnumerable <IOffence> offences, IDEntityList <StandardDetentionForOffence, IStandardDetentionForOffence> standardDetentions)
 {
     System.Collections.Generic.List <DetentionForOffence> detentionList = new System.Collections.Generic.List <DetentionForOffence>(base.GetDetention(offences, standardDetentions));
     if (detentionList != null && detentionList.Count > 0)
     {
         detentionList.ForEach(detention => detention.DetentionInHours = detention.DetentionInHours * (1 + (this.PercentageValue / 100.0)));
     }
     return(detentionList);
 }
 public virtual IEnumerable <DetentionForOffence> GetDetention(IEnumerable <IOffence> offences, IDEntityList <StandardDetentionForOffence, IStandardDetentionForOffence> standardDetentions)
 {
     System.Collections.Generic.List <DetentionForOffence> detentionList = new System.Collections.Generic.List <DetentionForOffence>();
     if (offences != null && offences.Count() > 0)
     {
         offences.ToList().ForEach(offence => detentionList.Add(new DetentionForOffence {
             Offence = offence, DetentionInHours = standardDetentions.InternalList.Where(sd => sd.Offence.Id == offence.Id).FirstOrDefault().DetentionInHours
         }));
     }
     return(detentionList);
 }