Exemple #1
0
 private void PopulateControls()
 {
     if (CurrentID != null &&
         int.Parse(CurrentID) >= 0)
     {
         Blog blog = DataAccessContext.BlogRepository.GetOne(CurrentID);
         uxBlogUrlLink.NavigateUrl              = UrlManager.GetBlogUrl(blog.BlogID, blog.UrlName);
         uxBlogUrlLink.Text                     = UrlPath.StorefrontUrl + blog.UrlName + "-blog.aspx";
         uxImageText.Text                       = blog.ImageFile;
         uxBlogTitleText.Text                   = blog.BlogTitle;
         uxShortContentText.Text                = blog.ShortContent;
         uxBlogContentText.Text                 = blog.BlogContent;
         uxBlogMetaTitleText.Text               = blog.MetaTitle;
         uxBlogMetaKeywordText.Text             = blog.MetaKeyword;
         uxBlogMetaDescriptionText.Text         = blog.MetaDescription;
         uxBlogTagsText.Text                    = blog.Tags;
         uxIsEnabledCheck.Checked               = blog.IsEnabled;
         uxCreateDateCalendarPopup.SelectedDate = blog.CreateDate;
         InitStoreList();
         InitBlogCategoryList();
     }
     else
     {
         ClearInputField();
     }
 }
Exemple #2
0
    protected string CreateFacebookLikeUrl(object blogID, object urlName)
    {
        string getBlogUrl       = UrlManager.GetBlogUrl(blogID, urlName);
        int    indexRealUrlName = getBlogUrl.LastIndexOf("/");
        int    indexUrl         = UrlPath.GetDisplayedUrl().LastIndexOf("/");

        getBlogUrl = UrlPath.GetDisplayedUrl().Substring(0, indexUrl) + "/" + getBlogUrl.Substring(indexRealUrlName + 1);
        return("https://www.facebook.com/plugins/like.php?href= " + getBlogUrl + "&layout=button_count&width=100&show_faces=false&action=like&colorscheme=light&font=arial&locale=en_US");
    }
Exemple #3
0
    protected string CreateGooglePlusUrl(object blogID, object urlName)
    {
        string getBlogUrl       = UrlManager.GetBlogUrl(blogID, urlName);
        int    indexRealUrlName = getBlogUrl.LastIndexOf("/");
        int    indexUrl         = UrlPath.GetDisplayedUrl().LastIndexOf("/");

        getBlogUrl = UrlPath.GetDisplayedUrl().Substring(0, indexUrl) + "/" + getBlogUrl.Substring(indexRealUrlName + 1);

        return(getBlogUrl);
    }
 protected string GetBlogUrl(object blogID, object urlName)
 {
     return(UrlManager.GetBlogUrl(blogID, urlName));
 }
    protected string GetNavURL(object item)
    {
        Blog blog = ( Blog )item;

        return(UrlManager.GetBlogUrl(blog.BlogID, blog.UrlName));
    }