Protected Sub GridView1_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView1.RowUpdating
Dim row = GridView1.Rows(e.RowIndex)
Dim sXML As String
sXML = "<Resources OfficeID='" & CType(row.Cells(1).Controls(0), TextBox).Text & "'"
sXML &= " OfficeName='" & CType(row.Cells(3).Controls(0), TextBox).Text & "'"
sXML &= " RegionID='" & CType(row.Cells(2).Controls(0), TextBox).Text & "'>"
sXML &= " UserName='" & row.Cells(3).Controls(0).ToString & "'>"
sXML &= "</Resources>"
Dim SQLParamList As New ArrayList
SQLParamList.Add(New SearchParameter("@xmlString", sXML))
Utils.DBUtilities.spExecute("spInsertOffices", SQLParamList)
Response.Redirect("/WebForms/OfficeLocations.aspx")
'Reset the edit index.
GridView1.EditIndex = -1
'Bind data to the GridView control.
BindGrid()
End Sub
End Class
|