//-------------------------------------------------------- #endregion #region --------------LoadRepeater-------------- //--------------------------------------------------------- //LoadRepeater //--------------------------------------------------------- public void LoadRepeater(Repeater r, List <ItemCategoriesEntity> categoriesList) { if (categoriesList != null && categoriesList.Count > 0) { r.DataSource = categoriesList; r.DataBind(); r.Visible = true; if (totalRecords > pager.PageSize) { pager.Visible = true; trPagerContainer.Visible = true; pager.TotalRecords = totalRecords; PagerManager.PrepareUserPager(pager); } else { pager.TotalRecords = totalRecords; pager.Visible = false; trPagerContainer.Visible = false; } lblResult.Visible = false; } else { /* * r.Visible = false; * pager.Visible = false; * trPagerContainer.Visible = false; * lblResult.CssClass = "lblResult_Faild"; * lblResult.Text = DynamicResource.GetText("AdminText", "ThereIsNoData"); * lblResult.Visible = true;*/ this.Visible = false; } }
//-------------------------------------------------------- #endregion public void LoadDataList(DataList dl, List <UsersDataEntity> usersDataList) { if (usersDataList != null && usersDataList.Count > 0) { dl.DataSource = usersDataList; dl.DataBind(); dl.Visible = true; if (totalRecords > pager.PageSize) { pager.Visible = true; trPagerContainer.Visible = true; pager.TotalRecords = totalRecords; PagerManager.PrepareUserPager(pager); } else { pager.TotalRecords = totalRecords; pager.Visible = false; trPagerContainer.Visible = false; } lblResult.Visible = false; } else { /* * dl.Visible = false; * pager.Visible = false; * trPagerContainer.Visible = false; * lblResult.CssClass = "lblResult_Faild"; * lblResult.Text = DynamicResource.GetText("AdminText", "ThereIsNoData"); * lblResult.Visible = true;*/ this.Visible = false; } }
//------------------------------------------------------- #region ---------------Page_Load--------------- //----------------------------------------------- //Page_Load //----------------------------------------------- private void Page_Load(object sender, System.EventArgs e) { currentModule = UsersDataGlobalOptions.GetType(ModuleTypeID); siteUrls = DCSiteUrls.Instance; //------------------------------------------------- //Prepaare user control CatchControls(); Prepare(); //------------------------------------------------- lblResult.Text = ""; if (!IsPostBack) { PagerManager.PrepareUserPager(pager); pager.Visible = false; LoadData(); } }
//----------------------------------------------- //Page_Load //----------------------------------------------- public void Page_Load(object sender, System.EventArgs e) { //--------------------------------------------- currentModule = ItemsModulesOptions.GetType(ModuleTypeID); siteUrls = DCSiteUrls.Instance; //------------------------------------------------- //Prepaare user control CatchControls(); Prepare(); //------------------------------------------------- if (!IsPostBack) { PagerManager.PrepareUserPager(pager); pager.Visible = false; trPagerContainer.Visible = false; LoadData(); } }
//----------------------------------------------------------- #region ---------------FirstLoad--------------- //----------------------------------------------- //FirstLoad //----------------------------------------------- public void FirstLoad() { PagerManager.PrepareUserPager(pager); pager.Visible = false; LoadData(); }