MS_04.01
This commit is contained in:
@@ -6,22 +6,24 @@ Public Class frmWD_CreateVersion
|
||||
End Sub
|
||||
|
||||
Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click
|
||||
clsDatabase.GUI = True
|
||||
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)
|
||||
For Each row As DataRow In CURRENT_DT_SELECTED_FILES.Rows
|
||||
If clsWD_SET.Create_Version(row.Item("FILEPATH"), txtComment.Text) Then
|
||||
MsgBox("Version was created successfully!", MsgBoxStyle.Information)
|
||||
Dim sql = "SELECT Version from TBPMO_DOCRESULT_LIST Where DocID = " & row.Item("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, row.Item("DOC_ID"))
|
||||
clsDatabase.Execute_non_Query(upd)
|
||||
End If
|
||||
Else
|
||||
|
||||
MsgBox("Could not create a version for file '" & row.Item("FILEPATH") & "'! Check log", MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
Me.Close()
|
||||
Else
|
||||
MsgBox("Could not create a version! Check log", MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
Next
|
||||
|
||||
Else
|
||||
MsgBox("Could not create a windream session! Check log", MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user