MS
This commit is contained in:
30
app/DD-Record-Organiser/frmWD_CreateVersion.vb
Normal file
30
app/DD-Record-Organiser/frmWD_CreateVersion.vb
Normal file
@@ -0,0 +1,30 @@
|
||||
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
|
||||
Reference in New Issue
Block a user