Imports System.Threading

Public Class SetNotTested
    Inherits InternalAPIBase

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Try
            Dim testId = Logic.Conversion.ToInteger(Request.Form("testId"))
            Dim reason = Logic.Conversion.ToString(Request.Form("reason"))

            Dim test = New Logic.DrugAlcoholTest(testId)

            VerifyContractAccess(test.contractID)

            test.status = "Not Tested"
            test.notes = "Reason Not Being Tested: " & reason & vbCrLf & vbCrLf & test.notes

            test.Save("[web: " & CurrentClient.username & "]")

            RespondSuccess()

        Catch ex As ThreadAbortException
        Catch ex As Exception
            RespondError(ex)
        End Try
    End Sub

End Class