Public Class frmMRNStorno
    Dim brg_DE_VeragAG As String = "1" ' aus eigener DB
    Dim brg_AT_VeragAG_Aufschub As String = "2"
    Dim brg_AT_VeragZS_Aufschub As String = "4"
    Dim brg_AT_VeragCS_Aufschub As String = "3"

    Dim brg_AT_VeragAG As String = "3025365"
    Dim brg_AT_VeragZS As String = "3026400"
    Dim brg_AT_VeragCS As String = "3517233"

    Private BRG As New cBrgDb

    Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click
        Me.Close()
    End Sub

    Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
        lblErr.Visible = False
        lblSaved.Visible = False

        If cboSystem.Text = "" Then MsgBox("System angeben!") : Exit Sub
        If txtMRN.Text = "" Then MsgBox("MRN angeben!") : Exit Sub

        If cboSystem.Text = "TELOTEC" Then
            Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
            If SQL.getValueTxtBySql("SELECT COUNT(*) FROM [tblTelotec_Anmeldung] where telanm_CRN='" & txtMRN.Text & "'", "FMZOLL") > 0 Then
                If SQL.doSQL("update [tblTelotec_Anmeldung] set telanm_Status=98,telanm_Status_KEWILL_Equivalent=98  where telanm_CRN='" & txtMRN.Text & "'", "FMZOLL") Then
                    lblSaved.Visible = True
                End If
            Else
                lblErr.Visible = True
            End If
        End If

    End Sub

    Private Sub frmKtoStandAkt_Load(sender As Object, e As EventArgs) Handles Me.Load
        cboSystem.SelectedIndex = 0
    End Sub
End Class