internal static List <Volunteer> GetVolunteersWithBirthdays(List <Volunteer> volunteers) { int currentday = UniversalHelpers.UniversalFunctions.GetDayOfYear(DateTime.Today); List <Volunteer> returnlistofvols = new List <Volunteer>(); foreach (var vol in volunteers) { int daytocompare = UniversalFunctions.GetDayOfYear(vol.Birthdate); if (UniversalFunctions.IsAboutToExpire(currentday, daytocompare)) { returnlistofvols.Add(vol); } } return(returnlistofvols); }
internal static List <Beneficiarycontract> GetExpiringContracts(List <Beneficiarycontract> benefcontracts) { int currentday = UniversalFunctions.GetDayOfYear(DateTime.Today); List <Beneficiarycontract> returnlistofbencontracts = new List <Beneficiarycontract>(); foreach (var benefcontract in benefcontracts) { int daytocompare = UniversalFunctions.GetDayOfYear(benefcontract.ExpirationDate); if (UniversalFunctions.IsAboutToExpire(currentday, daytocompare)) { returnlistofbencontracts.Add(benefcontract); } } return(returnlistofbencontracts); }
internal static List <Sponsor> GetExpiringContracts(List <Sponsor> sponsors) { int currentday = UniversalFunctions.GetDayOfYear(DateTime.Today); List <Sponsor> returnlistofspons = new List <Sponsor>(); foreach (var spons in sponsors) { int daytocompare = UniversalFunctions.GetDayOfYear(spons.Contract.ExpirationDate); if (UniversalFunctions.IsAboutToExpire(currentday, daytocompare)) { returnlistofspons.Add(spons); } } return(returnlistofspons); }