private void BindAboutUsNav() { int contentTypeID = Convert.ToInt32(ContentTypes.AboutUs); if (contentTypeID > 0) { BPContent bp = new BPContent(); BEContent ds = bp.SelectActiveByContentTypeID(contentTypeID); if (ds.tbl_Content.Count > 0) { ds.tbl_Content.DefaultView.Sort = "ContentOrder"; rptAboutUs.DataSource = ds.tbl_Content.DefaultView; rptAboutUs.DataBind(); } BindOrgOfCOPRNav(); BindStrategicPlanNav(); BindFAQNav(); if ((rptAboutUs.Items.Count > 0 || rptFAQ.Items.Count > 0) || rptOrgOfCOPR.Items.Count > 0 || rptStrategicPlan.Items.Count > 0) plcAboutUsDynamicNav.Visible = true; else { plcAboutUsDynamicNav.Visible = false; lnkAboutUs.NavigateUrl = ""; } } }
private void BindStandardsContentPages() { BPContent bp = new BPContent(); BEContent ds = null; ds = bp.SelectActiveFRByContentTypeID(Convert.ToInt32(ContentTypes.Standards)); ds.tbl_Content.DefaultView.Sort = ds.tbl_Content.ContentOrderColumn.ColumnName; rptStandardsPages.DataSource = ds.tbl_Content.DefaultView; rptStandardsPages.DataBind(); }
private void BindFAQNav() { int contentTypeID = Convert.ToInt32(ContentTypes.FAQ); if (contentTypeID > 0) { BPContent bp = new BPContent(); BEContent ds = bp.SelectActiveFRByContentTypeID(contentTypeID); if (ds.tbl_Content.Count > 0) { ds.tbl_Content.DefaultView.Sort = "ContentOrder"; rptFAQ.DataSource = ds.tbl_Content.DefaultView; rptFAQ.DataBind(); } else lnkFAQ.Visible = false; } }
private void BindAboutUsNav() { int contentTypeID = Convert.ToInt32(ContentTypes.AboutUs); if (contentTypeID > 0) { BPContent bp = new BPContent(); BEContent ds = bp.SelectActiveByContentTypeID(contentTypeID); if (ds.tbl_Content.Count > 0) { ds.tbl_Content.DefaultView.Sort = "ContentOrder"; rptAboutUs.DataSource = ds.tbl_Content.DefaultView; rptAboutUs.DataBind(); } else { lnkAboutUs.NavigateUrl = ""; } BindOrgOfCOPRNav(); BindStrategicPlanNav(); } }
private void BindContentInfo() { BPContent bp = new BPContent(); BEContent ds = null; BEContent.tbl_ContentRow contentRow = null; if (ContentID == 0) //for single pages (no landing page for subtype) - nav passes in SubTypeID { ds = bp.SelectActiveFRByContentTypeIDWithROColumns(SubTypeID); if (ds.tbl_Content.Count > 0) { contentRow = ds.tbl_Content[0]; ContentID = contentRow.ContentID; } } else if (ContentID > 0) //landing page exists - nav passes in ContentID { ds = bp.SelectActiveFRByIDWithROColumns(ContentID); if (ds.tbl_Content.Count > 0) { contentRow = ds.tbl_Content[0]; SubTypeID = contentRow.ContentTypeID; } } if (contentRow != null) { string contentTitle = contentRow.IsContentTitleFRNull() ? "" : contentRow.ContentTitleFR; PageName = contentTitle + " :: " + PageName; SetUpSubType(); lblTitleCrumb.Text = contentTitle; lblTitle.Text = contentTitle; string sidebarImagePrefix = GetResizedImagePrefix(Convert.ToInt32(ResizeInfo.Content_Sidebar)); string fullSizeImagePrefix = GetResizedImagePrefix(Convert.ToInt32(ResizeInfo.Content_FullSize)); bool image1Exists = false; bool image2Exists = false; bool image3Exists = false; if (!contentRow.IsImage1NameNull()) image1Exists = true; if (!contentRow.IsImage2NameNull()) image2Exists = true; if (!contentRow.IsImage3NameNull()) image3Exists = true; //image 1 if (image1Exists) { int imageNumber = 1; string fileName = sidebarImagePrefix + contentRow.Image1Name; string caption = contentRow.IsImage1AliasNull() ? "" : contentRow.Image1Alias; imgImageTop.ImageUrl = uploadsPath + fileName; lblOpenDiv1.Text = "<div id='mediumimg" + imageNumber.ToString() + "' class='hidden'>"; lblOpenDivTop.Text = "<div id='mediumimg" + imageNumber.ToString() + "' class='hidden'>"; lnkImage1.Attributes.Add("rel", "gallery[imagegallery]"); lnkImage1.Attributes.Add("caption", caption); lnkImage1.NavigateUrl = uploadsPath + fullSizeImagePrefix + contentRow.Image1Name; lblCloseDiv1.Text = "</div>"; lblCloseDivTop.Text = "</div>"; imgImageTop.ImageUrl = uploadsPath + fullSizeImagePrefix + contentRow.Image1Name; imgImage1.ImageUrl = uploadsPath + fileName; string alignmentClass = ""; if (!contentRow.IsContentImageAlignment1Null()) alignmentClass = GetImageAlignmentClass(contentRow.ContentImageAlignment1); else alignmentClass = GetImageAlignmentClass(-1); imgImage1.Attributes.Add("class", alignmentClass); imgImageTop.Attributes.Add("class", alignmentClass); if (!contentRow.IsImage1AliasNull()) { imgImage1.AlternateText = contentRow.Image1Alias; imgImageTop.AlternateText = contentRow.Image1Alias; } if (ContentID == 3) { plcImageTop.Visible = true; } else { plcImage1.Visible = true; } } //body 1 text if (!contentRow.IsContentBody1FRNull()) { lblBody1.Text = contentRow.ContentBody1FR; plcBody1.Visible = true; } //image 2 if (image2Exists) { int imageNumber = image1Exists ? 2 : 1; string fileName = sidebarImagePrefix + contentRow.Image2Name; string caption = contentRow.IsImage2AliasNull() ? "" : contentRow.Image2Alias; lblOpenDiv2.Text = "<div id='mediumimg" + imageNumber.ToString() + "' class='hidden'>"; lnkImage2.Attributes.Add("rel", "gallery[imagegallery]"); lnkImage2.Attributes.Add("caption", caption); lnkImage2.NavigateUrl = uploadsPath + fullSizeImagePrefix + contentRow.Image2Name; lblCloseDiv2.Text = "</div>"; imgImage2.ImageUrl = uploadsPath + fileName; string alignmentClass = ""; if (!contentRow.IsContentImageAlignment2Null()) alignmentClass = GetImageAlignmentClass(contentRow.ContentImageAlignment2); else alignmentClass = GetImageAlignmentClass(-1); imgImage2.Attributes.Add("class", alignmentClass); if (!contentRow.IsImage2AliasNull()) imgImage2.AlternateText = contentRow.Image2Alias; plcImage2.Visible = true; } //body 2 text if (!contentRow.IsContentBody2FRNull()) { lblBody2.Text = contentRow.ContentBody2FR; plcBody2.Visible = true; } //image 3 if (image3Exists) { int imageNumber; if (!image1Exists && !image2Exists) imageNumber = 1; else if (!image1Exists || !image2Exists) imageNumber = 2; else imageNumber = 3; string fileName = sidebarImagePrefix + contentRow.Image3Name; string caption = contentRow.IsImage3AliasNull() ? "" : contentRow.Image3Alias; lblOpenDiv3.Text = "<div id='mediumimg" + imageNumber.ToString() + "' class='hidden'>"; lnkImage3.Attributes.Add("rel", "gallery[imagegallery]"); lnkImage3.Attributes.Add("caption", caption); lnkImage3.NavigateUrl = uploadsPath + fullSizeImagePrefix + contentRow.Image3Name; lblCloseDiv3.Text = "</div>"; imgImage3.ImageUrl = uploadsPath + fileName; string alignmentClass = ""; if (!contentRow.IsContentImageAlignment3Null()) alignmentClass = GetImageAlignmentClass(contentRow.ContentImageAlignment3); else alignmentClass = GetImageAlignmentClass(-1); imgImage3.Attributes.Add("class", alignmentClass); if (!contentRow.IsImage3AliasNull()) imgImage3.AlternateText = contentRow.Image3Alias; plcImage3.Visible = true; } //image 4 //if (!contentRow.IsImage4NameNull()) //{ // string fileName = bodyImagePrefix + contentRow.Image4Name; // if (File.Exists(Server.MapPath(uploadsPath) + fileName)) // { // imgImage4.ImageUrl = uploadsPath + fileName; // string alignmentClass = ""; // if (!contentRow.IsContentImageAlignment4Null()) // alignmentClass = GetImageAlignmentClass(contentRow.ContentImageAlignment4); // else // alignmentClass = GetImageAlignmentClass(-1); // imgImage4.Attributes.Add("class", alignmentClass); // if (!contentRow.IsImage4AliasNull()) // imgImage4.AlternateText = contentRow.Image4Alias; // plcImage4.Visible = true; // } //} //Links Title //if (!contentRow.IsContentLinkTitleNull()) // lblLinkListTitle.Text = contentRow.ContentLinkTitle; } else Redirect(); }
private void BindListingsInfo() { BPContent bp = new BPContent(); BEContent ds = null; ds = bp.SelectActiveFRByContentTypeID(SubTypeID); ds.tbl_Content.DefaultView.Sort = ds.tbl_Content.ContentOrderColumn.ColumnName; rptListings.DataSource = ds.tbl_Content.DefaultView; rptListings.DataBind(); }
private void BindNewsPagesNav() { int contentTypeID = Convert.ToInt32(ContentTypes.News); if (contentTypeID > 0) { BPContent bp = new BPContent(); BEContent ds = bp.SelectActiveByContentTypeID(contentTypeID); if (ds.tbl_Content.Count > 0) { ds.tbl_Content.DefaultView.Sort = "ContentOrder"; rptNewsPages.DataSource = ds.tbl_Content.DefaultView; rptNewsPages.DataBind(); } //else //lnkFAQ.NavigateUrl = ""; } }
private void BindStandardsContentPages() { int contentTypeID = Convert.ToInt32(ContentTypes.Standards); if (contentTypeID > 0) { BPContent bp = new BPContent(); BEContent ds = bp.SelectActiveByContentTypeID(contentTypeID); if (ds.tbl_Content.Count > 0) { ds.tbl_Content.DefaultView.Sort = ds.tbl_Content.ContentOrderColumn.ColumnName; rptStandardsContentPages.DataSource = ds.tbl_Content.DefaultView; rptStandardsContentPages.DataBind(); } } }
private void BindOrgOfCOPRNav() { int contentTypeID = Convert.ToInt32(ContentTypes.OrgOfCOPR); if (contentTypeID > 0) { BPContent bp = new BPContent(); BEContent ds = bp.SelectActiveByContentTypeID(contentTypeID); if (ds.tbl_Content.Count > 0) { ds.tbl_Content.DefaultView.Sort = "ContentOrder"; rptOrgOfCOPR.DataSource = ds.tbl_Content.DefaultView; rptOrgOfCOPR.DataBind(); } else { lnkOrgOfCOPR.Visible = false; } } }
private void BindArchivePagesNav() { int contentTypeID = Convert.ToInt32(ContentTypes.Archive); if (contentTypeID > 0) { BPContent bp = new BPContent(); BEContent ds = bp.SelectActiveByContentTypeID(contentTypeID); if (ds.tbl_Content.Count > 0) { ds.tbl_Content.DefaultView.Sort = "ContentOrder"; rptArchivePages.DataSource = ds.tbl_Content.DefaultView; rptArchivePages.DataBind(); } } }