private void DisplayInfo(int pageSize, int currentPage) { txtDescripcion.Text = txtDescripcion.Text.Trim(); int totalCount; IList <ProductInformation> lst = ControllerManager.Product.GetProductInformation(txtDescripcion.Text, ddlCategoria.SelectedValue, Convert.ToInt32(ddlSeleccion.SelectedValue), Convert.ToInt32(ddlEstado.SelectedValue), currentPage, pageSize, out totalCount, chbViejos.Checked); if (totalCount == 0) { totalCount = pageSize; } Pager1.PageCount = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(totalCount) / Convert.ToDouble(pageSize))); Pager2.PageCount = Pager1.PageCount; Pager1.CurrentPage = currentPage; Pager2.CurrentPage = Pager1.CurrentPage; repItems.DataSource = lst; repItems.DataBind(); Pager1.Step = 10; Pager2.Step = 10; Pager1.DataBind(); Pager2.DataBind(); if (lst.Count == 0) { lblBuscarError.Visible = true; repItems.Visible = false; } else { lblBuscarError.Visible = false; repItems.Visible = true; } }
void PagingDataBind(DataTable dt) { DataTable itemdt = new DataTable(); if (Null.IsNotNull(dt)) { itemdt = dt; if (Null.IsNotNull(itemdt) && itemdt.Rows.Count > 0) { Pager1.DataSource = itemdt; Pager1.DataBind(); if (itemdt.Rows.Count > Pager1.PageSize) { Pager1.Visible = true; } else { Pager1.Visible = false; } } else { Pager1.Visible = false; } } }
protected void SearchAndFillRepeater(IList <IFilter> filters) { int totalRecords = 0; object o = OnSetDataSource(filters, out totalRecords); GridHelper.PageNumber = Utils.AdjustPageNumber(GridHelper.PageNumber, GridHelper.PageSize, totalRecords); this.grdItems.DataSource = o; this.grdItems.DataBind(); GridHelper.SetSearchDate(DateTime.Now); GridHelper.TotalRecords = totalRecords; hidTotal.Value = GridHelper.TotalRecords.ToString(); //lnkCheckAll.Enabled = true; //if (GridHelper.TotalRecords == 0) // lnkCheckAll.Enabled = false; QuantitySelectedAndChecked(); Pager1.PageCount = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(GridHelper.TotalRecords) / Convert.ToDouble(GridHelper.PageSize))); Pager1.CurrentPage = GridHelper.PageNumber; Pager1.Step = 10; Pager1.DataBind(); }
private void DisplayInfo(int pageSize, int currentPage) { PagedDataSource pagedItems = new PagedDataSource(); pagedItems.DataSource = ControllerManager.Product.GetProductInformation(TextBox1.Text, DropDownList2.SelectedValue, Convert.ToInt32(DropDownList3.SelectedValue), Convert.ToInt32(DropDownList1.SelectedValue), Config.CurrentWeek, Config.CurrentDate.Year, 0, 0); pagedItems.AllowPaging = true; pagedItems.PageSize = pageSize; pagedItems.CurrentPageIndex = currentPage - 1; Pager1.PageCount = pagedItems.PageCount; Pager2.PageCount = Pager1.PageCount; Pager1.CurrentPage = currentPage; Pager2.CurrentPage = Pager1.CurrentPage; repItems.DataSource = pagedItems; repItems.DataBind(); if (pagedItems.PageCount < 1) { Pager1.Visible = false; Pager2.Visible = false; } Pager1.Step = 4; Pager2.Step = 4; Pager1.DataBind(); Pager2.DataBind(); }
protected void LoadSearch() { int recordcount = 0; param.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); List <ProductListView> p = ControllerManager.Product.GetProductList(param, out recordcount); param.Pagecount = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(recordcount) / Convert.ToDouble(param.PageSize))); TotalCount = recordcount; QuantitySelectedAndChecked(); if (recordcount == 0) { recordcount = param.PageSize; } Pager1.PageCount = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(recordcount) / Convert.ToDouble(param.PageSize))); Pager1.CurrentPage = param.PageNumber; Pager1.Step = 10; Pager1.DataBind(); rpterProductList.DataSource = p; rpterProductList.DataBind(); searchDate = DateTime.Now; }
protected void LoadSearch() { int recordcount; List <ProductListView> p = ControllerManager.Product.GetProductList(param, out recordcount); param.Pagecount = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(recordcount) / Convert.ToDouble(param.PageSize))); QuantitySelectedAndChecked(recordcount); if (recordcount == 0) { recordcount = param.PageSize; } Pager1.PageCount = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(recordcount) / Convert.ToDouble(param.PageSize))); Pager1.CurrentPage = param.PageNumber; Pager1.Step = 10; Pager1.DataBind(); rpterProductList.DataSource = p; rpterProductList.DataBind(); ScriptManager.RegisterStartupScript(this.UpdatePanel1, GetType(), "closePopup", "<script>closePopup();</script>", false); ScriptManager.RegisterStartupScript(this.upFilters, GetType(), "closePopup", "<script>closePopup();</script>", false); ScriptManager.RegisterStartupScript(this.upFilters_Data, GetType(), "closePopup", "<script>closePopup();</script>", false); }
private void DisplayInfo(int pageSize, int currentPage) { PagedDataSource pagedItems = new PagedDataSource(); int cod = 0; DateTime date = new DateTime(); if (TextBox1.Text != "") { cod = Convert.ToInt32(TextBox1.Text); } if (TextBox2.Text != "") { date = Convert.ToDateTime(TextBox2.Text); } else { date = Convert.ToDateTime("01/01/1900"); } IList <PurchaseOrderInformation> poinfo = ControllerManager.PurchaseOrder.GetPurchaseOrders(cod, date, Convert.ToInt32(DropDownList1.SelectedValue), Convert.ToInt32(DropDownList3.SelectedValue), 0, 0); foreach (PurchaseOrderInformation information in poinfo) { IList <PurchaseOrderItem> poi = ControllerManager.PurchaseOrderItem.GetPurchaseOrderItemList(ControllerManager.PurchaseOrder.GetById(information.Id)); information.Amount = 0; information.Totalcount = 0; foreach (PurchaseOrderItem item in poi) { Grundfos.ScalaConnector.Product prodscala = Grundfos.ScalaConnector.ControllerManager.Product.GetProductInfo(item.Product.ProductCode); information.Amount = information.Amount + (item.Quantity * prodscala.PurchasePrice); information.Totalcount = information.Totalcount + item.Quantity; information.Arrivaldate = information.Orderdate.AddDays(item.Product.LeadTime); } } pagedItems.DataSource = poinfo; pagedItems.AllowPaging = true; pagedItems.PageSize = pageSize; pagedItems.CurrentPageIndex = currentPage - 1; Pager1.PageCount = pagedItems.PageCount; Pager2.PageCount = Pager1.PageCount; Pager1.CurrentPage = currentPage; Pager2.CurrentPage = Pager1.CurrentPage; repItems.DataSource = pagedItems; repItems.DataBind(); if (pagedItems.PageCount < 1) { Pager1.Visible = false; Pager2.Visible = false; } Pager1.Step = 4; Pager2.Step = 4; Pager1.DataBind(); Pager2.DataBind(); }
protected override void BindEntities(IList <ImageEntity> infos) { if (infos == null) { return; } Repeater1.DataSource = infos; Repeater1.DataBind(); Pager1.DataBind(); }
/// <summary> /// 绑定 /// </summary> /// <param name="infos"></param> protected virtual void BindEntities(IList <OrderNoteEntity> infos) { if (infos == null) { return; } Repeater1.DataSource = infos; Repeater1.DataBind(); Pager1.DataBind(); }
private void FillRepeater() { int totalcount; rpterPriceImportList.DataSource = ControllerManager.PriceImport.GetList(Id, priceImportLogStatus, PageSize, PageNumber, out totalcount); rpterPriceImportList.DataBind(); Pager1.PageCount = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(totalcount) / Convert.ToDouble(PageSize))); Pager1.CurrentPage = PageNumber; Pager1.Step = 10; Pager1.DataBind(); lblSelectedCount.Text = totalcount.ToString(); }
private void DisplayInfo(int pageSize, int currentPage) { txtCodigoOc.Text = txtCodigoOc.Text.Trim(); int cod = 0; DateTime date = new DateTime(); DateTime dateEnd = new DateTime(); if (txtCodigoOc.Text != "") { cod = Convert.ToInt32(txtCodigoOc.Text); } if (txtFechaDesde.Text != "") { date = Convert.ToDateTime(txtFechaDesde.Text); } else { date = Convert.ToDateTime("01/01/1900"); } if (txtFechaHasta.Text != "") { dateEnd = Convert.ToDateTime(txtFechaHasta.Text); } else { dateEnd = Convert.ToDateTime("01/01/1900"); } int totalCount; IList <PurchaseOrderInformation> poinfo = ControllerManager.PurchaseOrder.GetPurchaseOrdersBetweenDates(cod, date, dateEnd, Convert.ToInt32(ddlProveedor.SelectedValue), Convert.ToInt32(ddlEstados.SelectedValue), 0, 0, Convert.ToInt32(ddlOrigen.SelectedValue), out totalCount); if (totalCount == 0) { totalCount = pageSize; } Pager1.PageCount = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(totalCount) / Convert.ToDouble(pageSize))); Pager2.PageCount = Pager1.PageCount; Pager1.CurrentPage = currentPage; Pager2.CurrentPage = Pager1.CurrentPage; repItems.DataSource = poinfo; repItems.DataBind(); Pager1.Step = 4; Pager2.Step = 4; Pager1.DataBind(); Pager2.DataBind(); if (poinfo.Count == 0) { lblBuscarError.Visible = true; repItems.Visible = false; } else { lblBuscarError.Visible = false; repItems.Visible = true; } }