protected void ProductMaster_SelectedIndexedChanged(object sender, EventArgs e) { DataSet ds = new DataSet(); MaintenanceBo obj = new MaintenanceBo(); DivPager.Style.Add("display", "visible"); if (ddlProductMaster.SelectedValue == Contants.ProductMaster.ScripMaster.ToString()) { hdnEquityCount.Value = obj.GetScripMasterRecords("C").ToString(); lblgvEquityMaintenanceTotalRows.Text = hdnEquityCount.Value; ds = obj.GetScripMasterRecords(1, "N"); gvEquityMaintenance.DataSource = ds.Tables[0]; gvEquityMaintenance.DataBind(); DivEquity.Style.Add("display", "visible"); DivMF.Style.Add("display", "none"); mypager.CurrentPage = ds.Tables[0].Rows.Count > 0 ? 1 : 0; this.GetPageCount_Equity(); } else if (ddlProductMaster.SelectedValue == Contants.ProductMaster.SchemeMaster.ToString()) { hdnMFCount.Value = obj.GetSchemeMasterRecord("C").ToString(); lblgvMFMaintenanceTotalRows.Text = hdnMFCount.Value; ds = obj.GetSchemeMasterRecord(1, "N"); gvMFMaintenance.DataSource = ds.Tables[0]; gvMFMaintenance.DataBind(); DivEquity.Style.Add("display", "none"); DivMF.Style.Add("display", "visible"); mypager.CurrentPage = ds.Tables[0].Rows.Count > 0 ? 1 : 0; this.GetPageCount_MF(); } }
public void HandlePagerEvent(object sender, ItemClickEventArgs e) { if (ddlProductMaster.SelectedValue == Contants.ProductMaster.ScripMaster.ToString()) { GetPageCount_Equity(); DataSet ds = new DataSet(); MaintenanceBo obj = new MaintenanceBo(); ds = obj.GetScripMasterRecords(mypager.CurrentPage, "N"); gvEquityMaintenance.DataSource = ds.Tables[0]; gvEquityMaintenance.DataBind(); gvEquityMaintenance.PageIndex = mypager.CurrentPage; DivPager.Style.Add("display", "visible"); DivEquity.Style.Add("display", "visible"); DivMF.Style.Add("display", "none"); } if (ddlProductMaster.SelectedValue == Contants.ProductMaster.SchemeMaster.ToString()) { GetPageCount_MF(); DataSet ds = new DataSet(); MaintenanceBo obj = new MaintenanceBo(); ds = obj.GetSchemeMasterRecord(mypager.CurrentPage, "N"); gvMFMaintenance.DataSource = ds.Tables[0]; gvMFMaintenance.DataBind(); gvMFMaintenance.PageIndex = mypager.CurrentPage; DivPager.Style.Add("display", "visible"); DivMF.Style.Add("display", "visible"); DivEquity.Style.Add("display", "none"); } }