Пример #1
0
 public void PerformBeforeStoreUpdate()
 {
     if (ReferenceToInformation == null)
     {
         ReferenceToInformation = OIP.ReferenceToInformation.CreateDefault();
     }
     this.ReferenceToInformation.Title              = this.Title;
     ReferenceToInformation.URL                     = DefaultViewSupport.GetDefaultViewURL(this);
     this.LocationCollection.IsCollectionFiltered   = true;
     this.CategoryCollection.IsCollectionFiltered   = true;
     this.ImageGroupCollection.IsCollectionFiltered = true;
     if (Excerpt == null)
     {
         Excerpt = "";
     }
     if (Excerpt.Length > 200)
     {
         Excerpt = Excerpt.Substring(0, 200);
     }
     SetProfileImageAsFeaturedImage();
     if (Published == default(DateTime))
     {
         Published = DateTime.UtcNow.Date;
     }
 }
Пример #2
0
        public string GetExcerpt(int Length, string Ellipses = "...")
        {
            var excerpt = Excerpt.Substring(0, (Excerpt.Length > Length) ? Length : Excerpt.Length);

            if (Excerpt.Length >= Length)
            {
                excerpt += Ellipses;
            }

            return(excerpt);
        }
Пример #3
0
 public void PerformBeforeStoreUpdate()
 {
     if (ReferenceToInformation == null)
     {
         ReferenceToInformation = OIP.ReferenceToInformation.CreateDefault();
     }
     ReferenceToInformation.Title = this.ActivityName;
     ReferenceToInformation.URL   = DefaultViewSupport.GetDefaultViewURL(this);
     this.LocationCollection.IsCollectionFiltered   = true;
     this.CategoryCollection.IsCollectionFiltered   = true;
     this.ImageGroupCollection.IsCollectionFiltered = true;
     if (Excerpt == null)
     {
         Excerpt = "";
     }
     if (Excerpt.Length > 200)
     {
         Excerpt = Excerpt.Substring(0, 200);
     }
     if (this.StartingTime == default(DateTime))
     {
         StartingTime = DateTime.UtcNow.Date;
     }
 }