コード例 #1
0
        /// <summary>
        /// Gets the common criteria.
        /// </summary>
        /// <param name="fastDateOptions">The fast date options class to use.</param>
        /// <param name="commonBookCriteria">The common book criteria.</param>
        public void GetCommonCriteria(FastDateOptions fastDateOptions, CommonBookCriteria commonBookCriteria)
        {
            SelectedDateTypeIndex = commonBookCriteria.SelectedDateTypeIndex;
            SelectedFastDateIndex = commonBookCriteria.SelectedFastDateIndex;

            if (SelectedFastDateIndex == fastDateOptions.GetIndex("FreeSearch"))
            {
                if (!string.IsNullOrEmpty(commonBookCriteria.StartDate))
                {
                    StartDate = commonBookCriteria.StartDate;
                }

                if (!string.IsNullOrEmpty(commonBookCriteria.EndDate))
                {
                    EndDate = commonBookCriteria.EndDate;
                }
            }

            if (!string.IsNullOrEmpty(commonBookCriteria.FullText))
            {
                FullText = commonBookCriteria.FullText;
            }

            var iHaveArchiveLocation = this as IHaveArchiveLocation;

            if (iHaveArchiveLocation != null && !string.IsNullOrEmpty(commonBookCriteria.ArchiveLocation))
            {
                iHaveArchiveLocation.ArchiveLocation = commonBookCriteria.ArchiveLocation;
            }
        }
コード例 #2
0
        /// <summary>
        /// Loads a <see cref="FastDateOptionList" /> collection from the database.
        /// </summary>
        /// <param name="fastDateOptions">The fast date options.</param>
        protected void DataPortal_Fetch(FastDateOptions fastDateOptions)
        {
            IsReadOnly = false;
            var rlce = RaiseListChangedEvents;

            RaiseListChangedEvents = false;

            var dictionary = fastDateOptions.GetDictionary();

            foreach (var entry in dictionary)
            {
                AddNameValuePair(entry.Key, entry.Value);
            }

            RaiseListChangedEvents = rlce;
            IsReadOnly             = true;
        }
コード例 #3
0
 /// <summary>
 /// Factory method. Loads a <see cref="FastDateOptionList" /> collection.
 /// </summary>
 /// <param name="fastDateOptions">The fast date option.</param>
 /// <returns>
 /// A reference to the fetched <see cref="FastDateOptionList" /> collection.
 /// </returns>
 public static FastDateOptionList GetFastDateOptionList(FastDateOptions fastDateOptions)
 {
     return(DataPortal.Fetch <FastDateOptionList>(fastDateOptions));
 }