示例#1
0
        private CounteragentProperty getActualPeriodicObject(DateTime?_actualDate)
        {
            if (actualProperty != null && (actualDate.HasValue) && (actualDate.Value == _actualDate.Value))
            {
                return(actualProperty);
            }
            var _list = PeriodicProperty.ToList <CounteragentProperty>();

            actualProperty = _list.Where <CounteragentProperty>((x => x.BeginDate.Value <= _actualDate.Value))
                             .OrderByDescending(t => t.BeginDate.Value)
                             .FirstOrDefault <CounteragentProperty>();
            actualDate = _actualDate;
            return(actualProperty);
        }
示例#2
0
        private RailwayCountryProperty getActualPeriodicObject(DateTime?_actualDate)
        {
            if (actualProperty != null && (actualDate.HasValue) && (actualDate.Value == _actualDate.Value))
            {
                return(actualProperty);
            }
            //actualProperty = (from t in PeriodicProperty
            //                  where t.BeginDate.Value <= _actualDate.Value
            //                  orderby t.BeginDate.Value descending
            //                  select t).FirstOrDefault<RailwayCountryProperty>();
            var _list = PeriodicProperty.ToList <RailwayCountryProperty>();

            actualProperty = _list.Where <RailwayCountryProperty>((x => x.BeginDate.Value <= _actualDate.Value))
                             .OrderByDescending(t => t.BeginDate.Value)
                             .FirstOrDefault <RailwayCountryProperty>();
            actualDate = _actualDate;
            return(actualProperty);
        }