Files
RecordOrganizer/app/DD-Record-Organiser/frmWD_CreateVersion.vb
SchreiberM 1ecf84cdcb MS
2016-12-09 10:44:47 +01:00

30 lines
1.3 KiB
VB.net

Imports DD_LIB_Standards
Public Class frmWD_CreateVersion
Private Sub btncancel_Click(sender As Object, e As EventArgs) Handles btncancel.Click
Me.Close()
End Sub
Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click
If clsWindream.Create_Session = True Then
If clsWD_SET.Create_Version(CURRENT_FILEIN_WD, txtComment.Text) Then
MsgBox("Version was created successfully!", MsgBoxStyle.Information)
Dim sql = "SELECT Version from TBPMO_DOCRESULT_LIST Where DocID = " & CURRENT_DOC_ID
Dim VERSION = clsDatabase.Execute_Scalar(sql, True)
If Not IsNothing(VERSION) Then
VERSION = VERSION + 1
Dim upd = String.Format("UPDATE TBPMO_DOCRESULT_LIST SET Version = {0} WHERE DocID = {1}", VERSION, CURRENT_DOC_ID)
clsDatabase.Execute_non_Query(upd, True)
Else
End If
Me.Close()
Else
MsgBox("Could not create a version! Check log", MsgBoxStyle.Exclamation)
End If
Else
MsgBox("Could not create a windream session! Check log", MsgBoxStyle.Exclamation)
End If
Me.Close()
End Sub
End Class