private void LoadFiles(string id) { int pid = 0; if (Request.QueryString["pid"] != null) { try { pid = Convert.ToInt32(Request.QueryString["pid"].ToString()); } catch (Exception ex) { pid = 0; } } RelatedContent rcp = new RelatedContent(); rcp.GetRelatedContentByTypeIDAndPageIDAndSubCatID(pid, 2,Convert.ToInt32(id)); PagedDataSource pds = new PagedDataSource(); pds.DataSource = rcp.DefaultView; pds.AllowPaging = true; pds.PageSize = 6; pds.CurrentPageIndex = currentPage; uiRepeaterFiles.DataSource = pds; uiRepeaterFiles.DataBind(); uiLinkButtonNext.Enabled = true; uiLinkButtonPrev.Enabled = true; if (currentPage == 0) { uiLinkButtonPrev.Enabled = false; } if (currentPage == (pds.PageCount - 1)) { uiLinkButtonNext.Enabled = false; } uiPanelSubCats.Visible = false; uiPanelCats.Visible = false; uiPanelFiles.Visible = true; ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "scroll5", "$(document).ready(function () {$('#scrollbar5').tinyscrollbar();});", true); }
private void LoadFiles() { RelatedContent rc = new RelatedContent(); rc.GetRelatedContentByTypeIDAndPageIDAndSubCatID(CurrentPage.PageID, 2, Convert.ToInt32(uiDropDownListsubCats.SelectedValue)); uiGridViewFiles.DataSource = rc.DefaultView; uiGridViewFiles.DataBind(); }
private void LoadCMS(string id) { int pid = 0; if (Request.QueryString["pid"] != null) { try { pid = Convert.ToInt32(Request.QueryString["pid"].ToString()); } catch (Exception ex) { pid = 0; } } RelatedContent rcp = new RelatedContent(); rcp.GetRelatedContentByTypeIDAndPageIDAndSubCatID(pid, 1, Convert.ToInt32(id)); PagedDataSource pds = new PagedDataSource(); pds.DataSource = rcp.DefaultView; pds.AllowPaging = true; pds.PageSize = 6; pds.CurrentPageIndex = currentCMSPage; uiRepeaterCMS.DataSource = pds; uiRepeaterCMS.DataBind(); uiLinkButtonCMSNext.Enabled = true; uiLinkButtonCMSPrev.Enabled = true; if (currentCMSPage == 0) { uiLinkButtonCMSPrev.Enabled = false; } if (currentCMSPage == (pds.PageCount - 1)) { uiLinkButtonCMSNext.Enabled = false; } uiPanelCMSSubCats.Visible = false; uiPanelCMSCats.Visible = false; uiPanelCMS.Visible = true; }