Ejemplo n.º 1
0
 public MarkingPeriod GetMarkingPeriodByDate(DateTime date, bool useLastExisting = false)
 {
     using (var uow = Read())
     {
         var da  = new MarkingPeriodDataAccess(uow);
         var res = da.GetMarkingPeriod(date, Context.SchoolYearId);
         if (res != null)
         {
             return(res);
         }
         if (useLastExisting)
         {
             return(GetLastMarkingPeriod(date));
         }
     }
     return(null);
 }