//SupplierCategory #region [SupplierCategory Grid Bind] private void BindSupplierGrid() { try { EWA_Supplier objEWA = new EWA_Supplier(); objEWA.OrgId = orgId; DataSet ds = objBL.BindSupplierGrid_BL(objEWA); if (ds.Tables[0].Rows.Count == 0 || ds == null) { ds.Tables[0].Rows.Add(ds.Tables[0].NewRow()); GrdSupplier.DataSource = ds; GrdSupplier.DataBind(); int columncount = GrdSupplier.Rows[0].Cells.Count; GrdSupplier.Rows[0].Cells.Clear(); GrdSupplier.Rows[0].Cells.Add(new TableCell()); GrdSupplier.Rows[0].Cells[0].ColumnSpan = columncount; GrdSupplier.Rows[0].Cells[0].Text = "No Records Found"; } else { GrdSupplier.DataSource = ds; GrdSupplier.DataBind(); } } catch (Exception exp) { GeneralErr(exp.Message.ToString()); } }
//Grid Index Changed #region GrdIndexChanged protected void GrdSupplier_PageIndexChanging(object sender, GridViewPageEventArgs e) { try { objEWA.OrgId = orgId; GrdSupplier.PageIndex = e.NewPageIndex; GrdSupplier.DataSource = objBL.BindSupplierGrid_BL(objEWA); GrdSupplier.DataBind(); } catch (Exception exp) { GeneralErr(exp.Message.ToString()); } }
private void BindSupplier() { GrdSupplier.DataSource = BLL_TRV_Supplier.Get_SupplierList(UDFLib.ConvertStringToNull(txtSupplierSearch.Text), RequestID); GrdSupplier.DataBind(); }