public FeatureArticle GetFeatureArticle(DateTime dateTime, string friendlyUrl) { FeatureArticle articles = new FeatureArticleDA().Get(dateTime, friendlyUrl); if (!articles.MessageBoardID.HasValue) { articles.MessageBoardID = InsertNewMessageBoard(); new FeatureArticleDA().Update(articles); } return(articles); }
public void Page_Init(Object o, EventArgs e) { ClimbFind.Model.Objects.MessageBoard messageBoard = cfController.GetMessageBoard(Article.MessageBoardID.Value); MessageBoardUC.RenderMessageBoard(messageBoard); ArticlePhotoSets = new PhotoSetDA().Get(Article.ID); //-- Absolutely TERRIBLE Hack foreach (PhotoSet set in ArticlePhotoSets) { set.ParentDirectory = Article.ContentDirectory; } Articles = new FeatureArticleDA().GetAll().OrderBy(c => c.Date).ToList(); Articles.Reverse(); }