protected void lbtnName_Click(object sender, EventArgs e) { try { string CustomerRSN; LinkButton lnkOpenProjBtn = (LinkButton)sender; GridDataItem row = (GridDataItem)lnkOpenProjBtn.NamingContainer; Session["ResidentRSN"] = lnkOpenProjBtn.CommandName.ToString(); CustomerRSN = Session["ResidentRSN"].ToString(); DataSet dsSpecialReport = sqlobj.ExecuteSP("SP_ResidentSpecialReport", new SqlParameter() { ParameterName = "@RTRSN", SqlDbType = SqlDbType.BigInt, Value = CustomerRSN.ToString() }); if (dsSpecialReport.Tables[0].Rows.Count > 0) { rgSpecialReport.DataSource = dsSpecialReport; rgSpecialReport.DataBind(); rwSpecialReport.Visible = true; } else { rgSpecialReport.DataSource = string.Empty; rwSpecialReport.DataBind(); rwSpecialReport.Visible = false; } dsSpecialReport.Dispose(); } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
protected void lbtnName_Click(object sender, EventArgs e) { string CustomerRSN; LinkButton lnkOpenProjBtn = (LinkButton)sender; GridDataItem row = (GridDataItem)lnkOpenProjBtn.NamingContainer; Session["ResidentRSN"] = row.Cells[5].Text; CustomerRSN = Session["ResidentRSN"].ToString(); DataSet dsSpecialReport = sqlobj.ExecuteSP("SP_ResidentSpecialReport", new SqlParameter() { ParameterName = "@RTRSN", SqlDbType = SqlDbType.BigInt, Value = CustomerRSN.ToString() }); if (dsSpecialReport.Tables[0].Rows.Count > 0) { rgSpecialReport.DataSource = dsSpecialReport; rgSpecialReport.DataBind(); rwSpecialReport.Visible = true; } else { rgSpecialReport.DataSource = string.Empty; rwSpecialReport.DataBind(); rwSpecialReport.Visible = false; } dsSpecialReport.Dispose(); //Response.Redirect("TransactionLevel.aspx"); }