Пример #1
0
 public void DeleteCheckedHealthRecords(bool withCancel = true)
 {
     GetSelectedHrs().ForAll(hr =>
     {
         if (withCancel)
         {
             hr.IsDeleted = true;
         }
         else
         {
             holder.RemoveHealthRecord(hr);
         }
     });
 }
Пример #2
0
        private static IEnumerable <HealthRecord> RemoveEmptyHrs(IHrsHolder holder)
        {
            Contract.Requires(holder != null);
            Contract.Ensures(holder.HealthRecords.All(x => !x.IsEmpty()));

            var emptyHrs = holder.HealthRecords.Where(hr => hr.IsEmpty()).ToList();

            emptyHrs.ForEach(hr => holder.RemoveHealthRecord(hr));
            return(emptyHrs);
        }