MS_04.01
This commit is contained in:
@@ -54,15 +54,15 @@ Public Class frmRecordView
|
||||
'Titel updaten
|
||||
Me.Text &= " " + JUMP_RECORD_ID.ToString()
|
||||
Dim sql = "SELECT FORM_ID FROM TBPMO_RECORD WHERE GUID = " & JUMP_RECORD_ID
|
||||
ENTITY_ID = ClassDatabase.Execute_Scalar(sql)
|
||||
ENTITY_ID = ClassDatabase.Execute_Scalar(sql, True)
|
||||
sql = String.Format("select * from TBPMO_DOCSEARCH_VARIABLE_CONTROLS WHERE ENTITY_ID = {0}", ENTITY_ID) 'TBPMO_WINDREAM_RESULTLIST_CONFIG"
|
||||
DT_RESULTLIST_OPTIONS = ClassDatabase.Return_Datatable(sql, "GETVARIABLE CONTROLS")
|
||||
DT_RESULTLIST_OPTIONS = ClassDatabase.Return_Datatable(sql, True)
|
||||
sql = String.Format("select * from TBPMO_DOCSEARCH_RESULTLIST_CONFIG WHERE VISIBLE = 1 AND ENTITY_ID = {0} AND LANGUAGE = '{1}' AND COLUMN_VIEW LIKE 'VALUE%'", ENTITY_ID, USER_LANGUAGE)
|
||||
DT_RESULTLIST_VARIABLE_VALUE = ClassDatabase.Return_Datatable(sql, "GETVARIABLE VALUES")
|
||||
DT_RESULTLIST_VARIABLE_VALUE = ClassDatabase.Return_Datatable(sql, True)
|
||||
Dim sql_ResultList = String.Format("select * from TBPMO_DOCSEARCH_RESULTLIST_CONFIG WHERE ENTITY_ID = {0} AND LANGUAGE = '{1}'", ENTITY_ID, USER_LANGUAGE) 'TBPMO_WINDREAM_RESULTLIST_CONFIG"
|
||||
DT_WINDREAM_RESULTLIST = ClassDatabase.Return_Datatable(sql_ResultList, "GETRESULTLIST KONFIG")
|
||||
DT_WINDREAM_RESULTLIST = ClassDatabase.Return_Datatable(sql_ResultList, True)
|
||||
sql_ResultList = String.Format("select * from TBPMO_DOCRESULT_DROPDOWN_ITEMS WHERE CONFIG_ID IN (SELECT GUID FROM TBPMO_DOCSEARCH_RESULTLIST_CONFIG WHERE ENTITY_ID = {0} AND TYPE_ID = 4 AND LANGUAGE = '{1}')", ENTITY_ID, USER_LANGUAGE)
|
||||
DT_DOCRESULT_DROPDOWN_ITEMS = ClassDatabase.Return_Datatable(sql_ResultList, "GETRESULT_DROPDOWN_ITEMS")
|
||||
DT_DOCRESULT_DROPDOWN_ITEMS = ClassDatabase.Return_Datatable(sql_ResultList, True)
|
||||
TBPMO_WORKFLOW_TASK_HISTORYTableAdapter.Connection.ConnectionString = MyConnectionString
|
||||
ClassWindowLocation.LoadFormLocationSize(Me, 0, CURRENT_SCREEN_ID, "frmRecordView")
|
||||
|
||||
@@ -86,7 +86,7 @@ Public Class frmRecordView
|
||||
Dim user As String = USER_USERNAME
|
||||
|
||||
Dim Sql As String = String.Format("EXEC PRPMO_DOC_VALUE {0}, {1}, '{2}', '{3}'", docId, configId, value, USER_USERNAME)
|
||||
ClassDatabase.Execute_non_Query(Sql)
|
||||
ClassDatabase.Execute_non_Query(Sql, False)
|
||||
Catch ex As Exception
|
||||
MsgBox("Error:" & vbNewLine & ex.Message)
|
||||
End Try
|
||||
@@ -104,7 +104,7 @@ Public Class frmRecordView
|
||||
Dim dateString = value.ToString("yyyy-MM-dd") 'hh:mm:ss.fff
|
||||
|
||||
Dim Sql As String = String.Format("EXEC PRPMO_DOC_VALUE {0}, {1}, '{2}', '{3}'", docId, configId, dateString, user)
|
||||
ClassDatabase.Execute_non_Query(Sql)
|
||||
ClassDatabase.Execute_non_Query(Sql, False)
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in OnDateSelectedValueChanged:" & vbNewLine & ex.Message)
|
||||
End Try
|
||||
@@ -120,7 +120,7 @@ Public Class frmRecordView
|
||||
Dim user As String = USER_USERNAME
|
||||
|
||||
Dim Sql As String = String.Format("EXEC PRPMO_DOC_VALUE {0}, {1}, '{2}', '{3}'", docId, configId, value, user)
|
||||
ClassDatabase.Execute_non_Query(Sql)
|
||||
ClassDatabase.Execute_non_Query(Sql, False)
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in OnTextSelectedValueChanged:" & vbNewLine & ex.Message)
|
||||
End Try
|
||||
@@ -136,7 +136,7 @@ Public Class frmRecordView
|
||||
Dim sw As New Stopwatch
|
||||
sw.Start()
|
||||
Dim elapsed As Double
|
||||
Dim DT_RESULT As DataTable = ClassDOC_SEARCH.Get_DOC_RESULTTABLE(DT_RESULTLIST_OPTIONS, DT_RESULTLIST_VARIABLE_VALUE, DT_WINDREAM_RESULTLIST, ENTITY_ID, JUMP_RECORD_ID, "RECORD")
|
||||
Dim DT_RESULT As DataTable = ClassDOC_SEARCH.Get_DOC_RESULTTABLE(DT_RESULTLIST_OPTIONS, DT_RESULTLIST_VARIABLE_VALUE, DT_WINDREAM_RESULTLIST, ENTITY_ID, JUMP_RECORD_ID)
|
||||
If IsNothing(DT_RESULT) Then
|
||||
Dim msg = "wrong DocSearch-Configuration - Check logfile and contact Digital Data"
|
||||
tslblWindreamView.Text = msg
|
||||
@@ -195,9 +195,9 @@ Public Class frmRecordView
|
||||
End If
|
||||
|
||||
Dim Sql = "SELECT GUID FROM TBPMO_FORM_VIEW WHERE SCREEN_ID = 1 AND FORM_ID = " & ENTITY_ID
|
||||
FORMVIEW_ID = ClassDatabase.Execute_Scalar(Sql)
|
||||
FORMVIEW_ID = ClassDatabase.Execute_Scalar(Sql, True)
|
||||
Sql = "SELECT PARENT_ID FROM TBPMO_FORM WHERE GUID = " & ENTITY_ID
|
||||
PARENT_ENTITY_ID = ClassDatabase.Execute_Scalar(Sql)
|
||||
PARENT_ENTITY_ID = ClassDatabase.Execute_Scalar(Sql, True)
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Load_Tasks:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
@@ -220,7 +220,7 @@ Public Class frmRecordView
|
||||
Try
|
||||
If WF_IDTextBox.Text <> "" Then
|
||||
' Me.TBPMO_WORKFLOW_TASK_STATETableAdapter.FillBy(Me.DD_DMSDataSet.TBPMO_WORKFLOW_TASK_STATE, USER_LANGUAGE, WF_IDTextBox.Text, ENTITY_ID)
|
||||
Dim sel = ClassDatabase.Execute_Scalar("SELECT USER_SELECT FROM TBPMO_WORKFLOW_TASK WHERE GUID = " & WF_TASK_ID)
|
||||
Dim sel = ClassDatabase.Execute_Scalar("SELECT USER_SELECT FROM TBPMO_WORKFLOW_TASK WHERE GUID = " & WF_TASK_ID, True)
|
||||
If Not IsNothing(sel) Then
|
||||
Load_Selectable_Users(sel)
|
||||
End If
|
||||
@@ -252,7 +252,7 @@ Public Class frmRecordView
|
||||
Sub Check_end()
|
||||
Try
|
||||
Dim sql As String = String.Format("SELECT FINISHED FROM TBPMO_WORKFLOW_TASK WHERE GUID = {0}", WF_TASK_ID)
|
||||
Dim finished = ClassDatabase.Execute_Scalar(sql)
|
||||
Dim finished = ClassDatabase.Execute_Scalar(sql, True)
|
||||
If Not IsNothing(finished) Then
|
||||
If CBool(finished) = True Then
|
||||
lblTaskState.Text = "Workflow-Ende erreicht!"
|
||||
@@ -280,7 +280,7 @@ Public Class frmRecordView
|
||||
Dim sql As String = String.Format("SELECT STATE_ID, dbo.FNPMO_GETOBJECTCAPTION('{0}', 'WF_STATE_TITLE' + CONVERT(VARCHAR(5), STATE_ID), 1) AS STATE_DESC FROM TBPMO_WORKFLOW_ENTITY_STATE WHERE " &
|
||||
"INACTIVE = 0 AND ENTITY_ID = {1} AND STATE_ID NOT IN (" & _
|
||||
"SELECT STATE_ID FROM TBPMO_WORKFLOW_TASK_HISTORY WHERE WF_TASK_ID = {2})", USER_LANGUAGE, ENTITY_ID, WF_TASK_ID)
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable(sql, "States WF")
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable(sql, True)
|
||||
If DT.Rows.Count > 0 Then
|
||||
STATE_IDComboBox.Enabled = True
|
||||
STATE_IDComboBox.DataSource = DT
|
||||
@@ -304,7 +304,7 @@ Public Class frmRecordView
|
||||
Sub Load_Selectable_Users(sel As String)
|
||||
Try
|
||||
DD_ECMAdmin.TBAD_Users.Clear()
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable(sel)
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable(sel, True)
|
||||
For Each userrow As DataRow In DT.Rows
|
||||
Dim newUserRow As DD_ECMAdmin.TBAD_UsersRow
|
||||
newUserRow = DD_ECMAdmin.TBAD_Users.NewTBAD_UsersRow
|
||||
@@ -341,6 +341,7 @@ Public Class frmRecordView
|
||||
STATE_IDComboBox.SelectedIndex = -1
|
||||
End If
|
||||
If ClassDatabase.Execute_non_Query(upd, True) Then
|
||||
ClassProxy.Refresh_Workflow_Data()
|
||||
Load_Tasks()
|
||||
Load_States()
|
||||
Check_end()
|
||||
@@ -406,66 +407,6 @@ Public Class frmRecordView
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CopyToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CopyToolStripMenuItem.Click
|
||||
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
|
||||
MsgBox("Could not read File Parameters(DoubleClick)!", MsgBoxStyle.Exclamation)
|
||||
Exit Sub
|
||||
End If
|
||||
For Each row As DataRow In ClassWindreamDocGrid.DT_RESULTFILES.Rows
|
||||
If row.Item("DOC_PATH") <> "" Then
|
||||
Try
|
||||
Dim selectedfile(0) As String
|
||||
|
||||
selectedfile(0) = row.Item("DOC_PATH")
|
||||
|
||||
Dim dataobj As New DataObject
|
||||
|
||||
dataobj.SetData(DataFormats.FileDrop, True, selectedfile)
|
||||
|
||||
Clipboard.Clear()
|
||||
Clipboard.SetDataObject(dataobj, True)
|
||||
Exit For
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Copy file:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
Cursor = Cursors.Default
|
||||
End If
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DeleteToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DeleteToolStripMenuItem.Click
|
||||
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
|
||||
MsgBox("Could not read File Parameters(DoubleClick)!", MsgBoxStyle.Exclamation)
|
||||
Exit Sub
|
||||
End If
|
||||
For Each row As DataRow In ClassWindreamDocGrid.DT_RESULTFILES.Rows
|
||||
If row.Item("DOC_PATH") <> "" Then
|
||||
Dim msg = "Sind Sie sicher, dass Sie die Datei löschen wollen?"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "Are You sure You want to delete this file?"
|
||||
End If
|
||||
Dim result As MsgBoxResult
|
||||
result = MessageBox.Show(msg, "Confirmation:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If result = MsgBoxResult.Yes Then
|
||||
Try
|
||||
Dim FileToDelete As String
|
||||
FileToDelete = row.Item("DOC_PATH")
|
||||
|
||||
If System.IO.File.Exists(FileToDelete) = True Then
|
||||
System.IO.File.Delete(FileToDelete)
|
||||
RUN_WDSEARCH_GRID()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Delete file:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub PropertiesToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PropertiesToolStripMenuItem.Click
|
||||
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
|
||||
MsgBox("Could not read File Parameters(Properties RecordView)!", MsgBoxStyle.Exclamation)
|
||||
@@ -563,7 +504,7 @@ Public Class frmRecordView
|
||||
ClassLogger.Add(">> Check_Dropped_Files:" & Str.ToString, False)
|
||||
Dim CURRENT_WORKFILE = Str.Substring(Str.LastIndexOf("@") + 1)
|
||||
Dim insert = String.Format("INSERT INTO TBPMO_FILES_USER(FILENAME2WORK, USER_WORK, HANDLE_TYPE) VALUES('{0}','{1}','{2}')", CURRENT_WORKFILE, USER_USERNAME, DropType)
|
||||
If ClassDatabase.Execute_non_Query(insert) = False Then
|
||||
If ClassDatabase.Execute_non_Query(insert, True) = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
@@ -572,18 +513,18 @@ Public Class frmRecordView
|
||||
Next
|
||||
Dim sql = "select count(*) from VWPMO_DOKUMENTTYPES where FORMVIEW_ID = " & FORMVIEW_ID
|
||||
If ClassDatabase.Execute_Scalar(sql, True) >= 1 Then
|
||||
Dim sql1 = String.Format("SELECT GUID, FILENAME2WORK, USER_WORK, HANDLE_TYPE, WORKED, ADDED_WHEN FROM TBPMO_FILES_USER WHERE (UPPER(USER_WORK) = UPPER('{0}')) AND WORKED = 0", USER_USERNAME)
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable(sql1)
|
||||
If Not IsNothing(DT) Then
|
||||
If DT.Rows.Count > 0 Then
|
||||
For Each Filerow As DataRow In DT.Rows
|
||||
sql = String.Format("SELECT * FROM TBPMO_FILES_USER WHERE (UPPER(USER_WORK) = UPPER('{0}')) AND WORKED = 0", USER_USERNAME)
|
||||
CURRENT_TBPMO_FILES_USER = ClassDatabase.Return_Datatable(sql, True)
|
||||
If Not IsNothing(CURRENT_TBPMO_FILES_USER) Then
|
||||
If CURRENT_TBPMO_FILES_USER.Rows.Count > 0 Then
|
||||
For Each Filerow As DataRow In CURRENT_TBPMO_FILES_USER.Rows
|
||||
'Dim datei = Str.ToString.Replace("@DROPFROMFSYSTEM@", "")
|
||||
CURRENT_FILEID = Filerow.Item(0)
|
||||
CURRENT_FILEID = Filerow.Item("GUID")
|
||||
CURRENT_PARENT_ENTITY_ID = PARENT_ENTITY_ID
|
||||
CURRENT_RECORD_ID = JUMP_RECORD_ID
|
||||
CURRENT_ENTITY_ID = ENTITY_ID
|
||||
CURRENT_FORMVIEW_ID = FORMVIEW_ID
|
||||
If ClassDatabase.Execute_Scalar("SELECT COUNT(*) FROM TBPMO_FILES_USER WHERE GUID = " & CURRENT_FILEID & " AND WORKED = 0") = 1 Then
|
||||
If CURRENT_TBPMO_FILES_USER.Rows.Count = 1 Then
|
||||
frmWD_IndexFile.ShowDialog()
|
||||
Else
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> File was deleted or worked meanwhile!")
|
||||
@@ -606,12 +547,13 @@ Public Class frmRecordView
|
||||
For Each row As DataRow In DD_ECMAdmin.TBAD_Users.Rows
|
||||
If row.Item(0) = CBool(True) Then
|
||||
Dim sql = "select count(*) from TBPMO_WORKFLOW_TASK_USER Where USER_ID = " & row.Item(5) & " AND WF_TASK_ID = " & WF_TASK_ID
|
||||
If ClassDatabase.Execute_Scalar(sql) = 0 Then
|
||||
If ClassDatabase.Execute_Scalar(sql, True) = 0 Then
|
||||
'##
|
||||
Dim Ins = "Insert INTO TBPMO_WORKFLOW_TASK_USER (WF_TASK_ID,[USER_ID],ADDED_WHO) VALUES (" & WF_TASK_ID & ", " & row.Item(5) & ",'" & USER_USERNAME & "')"
|
||||
If ClassDatabase.Execute_non_Query(Ins) = False Then
|
||||
If ClassDatabase.Execute_non_Query(Ins, False) = False Then
|
||||
MsgBox(String.Format("Error in Adding User {0} to Task", row.Item(1)), MsgBoxStyle.Critical)
|
||||
Else
|
||||
ClassProxy.Refresh_Workflow_Data()
|
||||
Load_TASK_USER()
|
||||
End If
|
||||
|
||||
@@ -626,7 +568,7 @@ Public Class frmRecordView
|
||||
Try
|
||||
'Dim sql = "SELECT * FROM VWPMO_WF_USER WHERE LOWER(USERNAME) = '" & USER_USERNAME & "' AND WF_TASK_ID = " & Me.GUIDTextBox.Text
|
||||
Dim sql = "SELECT * FROM VWPMO_WF_USER WHERE WF_TASK_ID = " & WF_TASK_ID
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable(sql)
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable(sql, True)
|
||||
Dim count As Integer = 0
|
||||
If DT Is Nothing = False Then
|
||||
ListViewExclusiveUser.Items.Clear()
|
||||
@@ -666,7 +608,7 @@ Public Class frmRecordView
|
||||
Sub Get_Description()
|
||||
Try
|
||||
Dim sql = String.Format("SELECT COMMENT FROM TBPMO_WORKFLOW_ENTITY_STATE WHERE WF_ID = {0} AND STATE_ID = {1} AND ENTITY_ID = {2}", WF_IDTextBox.Text, STATE_IDComboBox.SelectedValue, ENTITY_ID)
|
||||
Dim result = ClassDatabase.Execute_Scalar(sql)
|
||||
Dim result = ClassDatabase.Execute_Scalar(sql, True)
|
||||
txtDescriptionStep.Text = result
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -717,7 +659,8 @@ Public Class frmRecordView
|
||||
Try
|
||||
If (Me.ListViewExclusiveUser.SelectedItems.Count > 0) Then
|
||||
Dim sql = "DELETE FROM TBPMO_WORKFLOW_TASK_USER WHERE GUID = " & Me.ListViewExclusiveUser.SelectedItems.Item(0).Text
|
||||
ClassDatabase.Execute_non_Query(sql)
|
||||
ClassDatabase.Execute_non_Query(sql, False)
|
||||
ClassProxy.Refresh_Workflow_Data()
|
||||
Load_TASK_USER()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
@@ -751,4 +694,22 @@ Public Class frmRecordView
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ContextMenuStripResultFiles_Opening(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles ContextMenuStripResultFiles.Opening
|
||||
ClassWindreamDocGrid.GetDocItems(GridViewDoc_Search)
|
||||
Dim Result = ClassWindream.Get_File_Rights(ClassWindreamDocGrid.SELECTED_DOC_PATH)
|
||||
If Not IsNothing(Result) Then
|
||||
|
||||
Select Case Result.ToString
|
||||
Case "R"
|
||||
PropertiesToolStripMenuItem.Enabled = False
|
||||
Case "RW"
|
||||
PropertiesToolStripMenuItem.Enabled = True
|
||||
Case "RWA"
|
||||
PropertiesToolStripMenuItem.Enabled = True
|
||||
End Select
|
||||
Else
|
||||
PropertiesToolStripMenuItem.Enabled = True
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user