protected void grdReports_RowCommand(object sender, GridViewCommandEventArgs e) { //String sError = ""; int iIndex; //string hn; string sReportFilename = ""; //if (pubHideNames == "") //{ // pubHideNames = Session["HideNames"].ToString(); //} if (e.CommandName == "Select") { iIndex = Convert.ToInt16(e.CommandArgument); sReportFilename = grdReports.Rows[iIndex].Cells[2].Text; if (sReportFilename == "") { DataSet ds = CReport.GetReportList(); if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { sReportFilename = ds.Tables[0].Rows[iIndex]["ReportFileName"].ToString(); } } Response.Redirect(sReportFilename); } //else if (e.CommandName == "View") //{ // iIndex = Convert.ToInt16(e.CommandArgument); //} }
private void ControlsInitialize() { Master.ShowFooter = false; Master.PageTitle = "Improper Payment (IP) Reports"; //UserMsg.Text = ""; //UserMsg.Visible = false; Session["IPReviewStartDate"] = System.Configuration.ConfigurationManager.AppSettings.Get("IPReviewStartDate"); Session["IPReviewEndDate"] = System.Configuration.ConfigurationManager.AppSettings.Get("IPReviewEndDate"); //pubHideNames = GetParameter("hn"); //hidHideNames.Value = pubHideNames; //if (hidHideNames.Value == "") // hidHideNames.Value = Session["HideNames"].ToString(); DataSet ds = CReport.GetReportList(); if (ds.Tables[0].Rows.Count > 0) { grdReports.DataSource = ds; grdReports.DataBind(); } }