MS Diverses Customizing

This commit is contained in:
Developer01
2024-07-31 11:10:21 +02:00
parent 2039b614c1
commit c15a0ee5a0
36 changed files with 1140 additions and 1612 deletions

View File

@@ -1,4 +1,6 @@
Imports DD_LIB_Standards
Imports DevExpress.DataAccess.Native
Imports DevExpress.XtraGrid.Views.Base.ViewInfo
Public Class frmWM_CreateVersion
Private Sub btncancel_Click(sender As Object, e As EventArgs) Handles btncancel.Click
@@ -7,26 +9,23 @@ Public Class frmWM_CreateVersion
Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click
clsDatabase.GUI = 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 = MYDB_ECM.GetScalarValue(sql)
If Not IsNothing(VERSION) Then
VERSION = VERSION + 1
Dim upd = String.Format("UPDATE TBPMO_DOCRESULT_LIST SET Version = {0},Change_DateTime = GETDATE() WHERE DocID = {1}", VERSION, row.Item("DOC_ID"))
MYDB_ECM.ExecuteNonQuery(upd)
If LICENSE_PROXY = True And clsDatabase.DB_PROXY_INITIALIZED Then
MYDB_ECM.ExecuteNonQuery(upd, True)
End If
End If
Else
MsgBox("Could not create a version for file '" & row.Item("FILEPATH") & "'! Check log", MsgBoxStyle.Exclamation)
If clsWD_SET.Create_Version(ClassFileResult.DocumentPath, txtComment.Text) Then
MsgBox("Version has been created successfully!", MsgBoxStyle.Information)
'Dim oSql = $"SELECT dwVersionID FROM VWPMO_DOC_SEARCH WHERE DocID = {BW_DocID}"
'Dim odwVersionId = MYDB_ECM.GetScalarValue(oSql)
'Dim oInsert = $"INSERT INTO TBPMO_DOC_ID_CHANGED (USER_ID,PROCESS_ID,VERSION_ID,OLD_DOC_ID,DOC_PATH) VALUES ({USER_GUID},'{ProcID.ToString}',{odwVersionId},{BW_DocID},'{BW_DocPath}')"
'MYDB_ECM.ExecuteNonQuery(oInsert)
Dim sql = $"SELECT DocID from VWPMO_DOC_SYNC Where FULL_FILENAME = '{ClassFileResult.DocumentPath}'"
Dim VERSION = MYDB_ECM.GetScalarValue(sql)
If Not IsNothing(VERSION) Then
VERSION = VERSION + 1
Dim upd = String.Format("UPDATE TBPMO_DOCRESULT_LIST SET Version = {0},Change_DateTime = GETDATE() WHERE DocID = {1}", VERSION, ClassFileResult.DocID)
MYDB_ECM.ExecuteNonQuery(upd)
End If
Me.Close()
Next
Else
MsgBox("Could not create a version for file '" & ClassFileResult.DocumentPath & "'! Check log", MsgBoxStyle.Exclamation)
End If
Me.Close()
End Sub
End Class