コード例 #1
0
 private async Task CheckUpdateActiveOffersValidDates(EntityContext ctx, IQueryable<SpecialCommisionOffers> activeRecords)
 {
     for (int i = 0; i < activeRecords.Count(); i++)
     {
         if (_dateProvider.CompareDates(activeRecords.ElementAt(i).EndDate, _dateProvider.GetCurrentDateTime()))
         {
             ctx.SpecialCommisionOffers.Find(activeRecords.ElementAt(i).ID).ActiveStatus = false;
             await ctx.SaveChangesAsync();
         }
     }
 }
コード例 #2
0
 private bool CalculateWaitingStatus(DateTime startDate)
 {
     if (_dateProvider.CompareDates(startDate.Date, _dateProvider.GetCurrentDateTime().Date))
     {
         return(false);
     }
     return(true);
 }