示例#1
0
        private DateTime?ArgumentDateTime(string value)
        {
            if (string.IsNullOrWhiteSpace(value))
            {
                return(null);
            }

            return(CalendarHelper.ConvertStringToDateTime(value, null));
        }
示例#2
0
        public void SetMaxDate(string maxDate, string dateFormat)
        {
            var dateTime = default(DateTime?);

            if (!string.IsNullOrWhiteSpace(maxDate))
            {
                dateTime = CalendarHelper.ConvertStringToDateTime(maxDate, dateFormat);
            }

            MaxDate = dateTime;
        }
示例#3
0
        private List <DateTime> ArgumentDateTimeList(IList <string> values)
        {
            var dateTimes = new List <DateTime>();

            if (values != null && values.Count > 0)
            {
                foreach (var item in values)
                {
                    var dateTime = CalendarHelper.ConvertStringToDateTime(item, null);

                    dateTimes.Add(dateTime);
                }
            }

            return(dateTimes);
        }