private void BindNews() { RptNews.DataSource = null; RptNews.DataBind(); PnlFilter.ControlsBind(FilterDictionary, TableName); int NewsID; int.TryParse(TxtNewsID.Text, out NewsID); if (NewsID == 0) { NewsID = -1; } FilterDictionary = new Dictionary <string, object>() { { "Id", NewsID }, { "LangsId", Langs.Id }, { "OrganizationsId", DALCL._Login.organizationsId }, { "OrganizationsLangsId", Langs.Id }, { "NewsLangsStatusId", int.Parse(DListNewsStatus.SelectedValue) } }; int PageNum; int RowNumber = 50; if (!int.TryParse(ConfigL._Route("pagenum", "1"), out PageNum)) { PageNum = 1; } HdnPageNumber.Value = PageNum.ToString(); DALC.DataTableResult NewsResult = DALC.GetFilterList(Tools.Tables.V_News, FilterDictionary, PageNum, RowNumber); if (NewsResult.Count == -1) { return; } LblCount.Text = string.Format("Axtarış üzrə nəticə: {0}", NewsResult.Count.ToString()); int Total_Count = NewsResult.Count % RowNumber > 0 ? (NewsResult.Count / RowNumber) + 1 : NewsResult.Count / RowNumber; HdnTotalCount.Value = Total_Count.ToString(); PnlPager.Visible = NewsResult.Count > RowNumber; RptNews.DataSource = NewsResult.Dt; RptNews.DataBind(); }
protected void BtnFilter_Click(object sender, EventArgs e) { PnlFilter.ControlsBind(FilterDictionary, TableName, "", true); ConfigL.RedirectURL(string.Format("/{0}/modules/news/1", Langs.Name)); }