If you are in session(DMXXX) I want you to have access to the row with links of 230, 243, 247. This person is in district 230 and oversees offices 243 and 247 so when you come on this page I want the person to have links. I have a querystring with dist so this one would come over as dist="230"
Region A B C D
PHI 65234 89546 85423 85421
AREA 5489 4587 2456 4597
230 12 56 23 12
243 125 6 4 4
247 15 14 78 89
Would I put this in pageload?
If Session("Pos") = "DMXXX" Then
Dim sqlConnection1 As NewData.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("PendingClaimsConnectionString").ConnectionString)
Dim cmd As New SqlCommand
cmd.Connection = sqlConnection1
cmd.CommandText = "GetDistInfo"
cmd.CommandType = System.Data.CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@officecode", Request.QueryString("officecode"))
cmd.Parameters.AddWithValue("@reportsto", Request.QueryString("reportsto"))
cmd.Connection.Open()
cmd.Connection.Close()
If e.Row.RowType = DataControlRowType.DataRow Then
'Checking specific position access by fieldoffice and Expception
'comparing the doc column value (which is called region on the gridview) to session FO
If DirectCast(e.Row.DataItem, DataRowView)("doc").ToString() = Session("FO").ToString() Or Session("PendingClaims") Then
'Checking ADXXX access to only show links for their area
ElseIf (Session("FO") = "H20" And Request.QueryString("area") = "01") Or _
(Session("FO") = "H21" And Request.QueryString("area") = "02") Or _
(Session("FO") = "H22" And Request.QueryString("area") = "03") Or _
(Session("FO") = "H23" And Request.QueryString("area") = "04") Or _
(Session("FO") = "H24" And Request.QueryString("area") = "05") Or _
(Session("FO") = "H25" And Request.QueryString("area") = "06") Then
e.Row.Cells(5).Enabled = True
e.Row.Cells(6).Enabled = True
e.Row.Cells(7).Enabled = True
e.Row.Cells(8).Enabled = True
e.Row.Cells(9).Enabled = True
e.Row.Cells(10).Enabled = True
How would I get the DMXXX? I hope this makes sense.
Region A B C D
PHI 65234 89546 85423 85421
AREA 5489 4587 2456 4597
230 12 56 23 12
243 125 6 4 4
247 15 14 78 89
Would I put this in pageload?
If Session("Pos") = "DMXXX" Then
Dim sqlConnection1 As NewData.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("PendingClaimsConnectionString").ConnectionString)
Dim cmd As New SqlCommand
cmd.Connection = sqlConnection1
cmd.CommandText = "GetDistInfo"
cmd.CommandType = System.Data.CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@officecode", Request.QueryString("officecode"))
cmd.Parameters.AddWithValue("@reportsto", Request.QueryString("reportsto"))
cmd.Connection.Open()
cmd.Connection.Close()
If e.Row.RowType = DataControlRowType.DataRow Then
'Checking specific position access by fieldoffice and Expception
'comparing the doc column value (which is called region on the gridview) to session FO
If DirectCast(e.Row.DataItem, DataRowView)("doc").ToString() = Session("FO").ToString() Or Session("PendingClaims") Then
'Checking ADXXX access to only show links for their area
ElseIf (Session("FO") = "H20" And Request.QueryString("area") = "01") Or _
(Session("FO") = "H21" And Request.QueryString("area") = "02") Or _
(Session("FO") = "H22" And Request.QueryString("area") = "03") Or _
(Session("FO") = "H23" And Request.QueryString("area") = "04") Or _
(Session("FO") = "H24" And Request.QueryString("area") = "05") Or _
(Session("FO") = "H25" And Request.QueryString("area") = "06") Then
e.Row.Cells(5).Enabled = True
e.Row.Cells(6).Enabled = True
e.Row.Cells(7).Enabled = True
e.Row.Cells(8).Enabled = True
e.Row.Cells(9).Enabled = True
e.Row.Cells(10).Enabled = True
How would I get the DMXXX? I hope this makes sense.