private void Load_AllAdminInventory(int pageNo) { try { pageSize = 25;// Convert.ToInt32(ddlPageSize.SelectedValue); gvAdminInventory.PageSize = pageSize; CurrentPage = pageNo; int status = 1; int TireState = Convert.ToInt32(ddlTireState.SelectedValue); //string userName = txt.Text.Trim(); //string stewardship = txtInventoryStewardship.Text.Trim(); //string PlantCode = txtPlantCode.Text.Trim(); //string SizeCode = txtSizeCode.Text.Trim(); string size = txtSize.Text.Trim(); string brand = txtBrand.Text.Trim(); string lot = txtLot.Text.Trim(); DateTime frmDate = string.IsNullOrEmpty(txtFrmDate.Text) ? DateTime.MinValue : Convert.ToDateTime(txtFrmDate.Text); DateTime toDate = string.IsNullOrEmpty(txtToDate.Text) ? DateTime.MinValue : Convert.ToDateTime(txtToDate.Text); int quantity = string.IsNullOrEmpty(txtQuantity.Text.Trim()) ? 0 : Convert.ToInt32(txtQuantity.Text.Trim()); int count = 0; DataSet ds = Lots.SearchInventory(pageNo, pageSize, out count, "", UserOrganizationId, "", "", TireState, status, txtUserName.Text.Trim(), quantity, txtSpace.Text.Trim(), txtLane.Text.Trim(), txtGuid.Text.Trim(), txtLatitude.Text.Trim(), txtLongitude.Text.Trim(), frmDate, toDate, lot, size, brand,CatId); gvAdminInventory.DataSource = ds; gvAdminInventory.DataBind(); // GridPaging(); this.TotalItems = count; this.pgrLots.DrawPager(pageNo, this.TotalItems, pageSize, MaxPagesToShow); } catch (Exception ex) { new SqlLog().InsertSqlLog(0, "Admin site ViewLots.aspx Load_AllAdminInventory", ex); } }