Пример #1
0
        public string GetSicSource(DateTime?maxDate = null)
        {
            if (maxDate == null || maxDate.Value == DateTime.MinValue)
            {
                maxDate = SectorType.GetAccountingStartDate().AddYears(1);
            }

            return(OrganisationSicCodes
                   .FirstOrDefault(s => s.Created < maxDate.Value && (s.Retired == null || s.Retired.Value > maxDate.Value))
                   ?.Source);
        }
 public string GetSicSource(DateTime accountingDate)
 {
     return(OrganisationSicCodes.FirstOrDefault(s =>
                                                s.Created < accountingDate && (s.Retired == null || s.Retired.Value > accountingDate))
            ?.Source);
 }