private void bindResult() { string _progcd = ddlProgCd.SelectedItem.Text; string _eyrmo = ddlEffYrmo.SelectedItem.Text; DataSet ds1 = new DataSet(); lblHeading.Text = "Benefit Hierarchy Information for Program Code - '" + _progcd + "'"; ds1 = BenhierDAL.getplanhierA(_progcd, _eyrmo); //if (ds1.Tables[0].Rows.Count > 0) //{ grdvBen.DataSource = ds1; grdvBen.DataBind(); //} }
private void SortGridView(string sortExpression, string direction, string src) { DataTable dt; DataView dv; if (src.Equals("Ben")) { string _progcd = ddlProgCd.SelectedItem.Text; //string _bencd = ddlBencd.SelectedItem.Text; string _eyrmo = ddlEffYrmo.SelectedItem.Text; dt = BenhierDAL.getplanhierA(_progcd, _eyrmo).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdvBen.DataSource = dv; grdvBen.DataBind(); } else if (src.Equals("Rate")) { string _py = ddlRpy.SelectedItem.Text; string _Rprogcd = ddlRProgcd.SelectedItem.Text; //string _Rbencd = ddlRBencd.SelectedItem.Text; string _Reyrmo = ddlREffYrmo.SelectedItem.Text; dt = BenhierDAL.getplanRatesA(_py, _Reyrmo, _Rprogcd).Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdvRates.DataSource = dv; grdvRates.DataBind(); bindratefooterplan(); } else if (src.Equals("PAudit")) { dt = BenhierDAL.getPlanhierAuditReport().Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdv_dtlBenAud.DataSource = dv; grdv_dtlBenAud.DataBind(); } else if (src.Equals("RAudit")) { dt = BenhierDAL.getRateAuditReport().Tables[0]; dv = new DataView(dt); dv.Sort = sortExpression + direction; grdv_dtlrateAud.DataSource = dv; grdv_dtlrateAud.DataBind(); } }