Public Class DeleteAppointment
Inherits System.Web.UI.Page
Dim iAppointmentID As Integer
Dim sAppointmentType As String
#Region " Web Form Designer Generated Code "
This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
CODEGEN: This method call is required by the Web Form Designer
Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Put user code to initialize the page here
iAppointmentID = Page.Request.QueryString("Appointment_ID")
sAppointmentType = Page.Request.QueryString("Type")
DeleteAppointment()
**** I WOULD LIKE TO CLOSE THE WINDOW HERE *********
End Sub
Private Sub DeleteAppointment()
Dim oDBHandler As New DBHandler()
Dim sSql As String
sSql = "Delete from [" & sAppointmentType & "] where appointment_id =" & iAppointmentID
If oDBHandler.Connect = True Then
If oDBHandler.ExecuteSQLCommand(sSql) = False Then
error
End If
oDBHandler.EndConnection()
Else
error connecting
End If
oDBHandler = Nothing
End Sub
End Class