jj für MS 25.01.17
This commit is contained in:
@@ -3548,7 +3548,7 @@ Public Class frmConstructor_Main
|
||||
AddressOf OnDateSelectedValueChanged,
|
||||
AddressOf OnTextSelectedValueChanged,
|
||||
AddressOf OnCheckboxValueChanged,
|
||||
CURRENT_SEARCH_TYPE)
|
||||
CURRENT_SEARCH_TYPE, RECORD_ID)
|
||||
End If
|
||||
Else
|
||||
Dim selnode As TreeNode = TreeViewMain.SelectedNode
|
||||
@@ -3641,23 +3641,26 @@ Public Class frmConstructor_Main
|
||||
|
||||
If oldValue = DatePicker.EditValue Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
'Dim colTitle = DirectCast(GridControlDocSearch.MainView, DevExpress.XtraGrid.Views.Grid.GridView).FocusedColumn.FieldName
|
||||
'Dim configId As Integer = ClassWindreamDocGrid.RESULT_CONFIG_IDS.Item(colTitle)
|
||||
' Config id über mainView -> detailView herausfinden
|
||||
Dim mainView As GridView = GridControlDocSearch.MainView
|
||||
Dim detailView As GridView = mainView.GetDetailView(mainView.FocusedRowHandle, mainView.GetRelationIndex(mainView.FocusedRowHandle, "docIdDetails"))
|
||||
Dim detailRow As DataRowView = detailView.GetRow(detailView.FocusedRowHandle)
|
||||
Dim configid = detailRow.Item("CONFIG_ID")
|
||||
|
||||
Dim docId As Integer = ClassWindreamDocGrid.SELECTED_DOC_ID
|
||||
Dim user As String = USER_USERNAME
|
||||
'Dim colTitle = DirectCast(GridControlDocSearch.MainView, DevExpress.XtraGrid.Views.Grid.GridView).FocusedColumn.FieldName
|
||||
'Dim configId As Integer = ClassWindreamDocGrid.RESULT_CONFIG_IDS.Item(colTitle)
|
||||
' Config id über mainView -> detailView herausfinden
|
||||
Dim mainView As GridView = GridControlDocSearch.MainView
|
||||
Dim detailView As GridView = mainView.GetDetailView(mainView.FocusedRowHandle, mainView.GetRelationIndex(mainView.FocusedRowHandle, "docIdDetails"))
|
||||
Dim detailRow As DataRowView = detailView.GetRow(detailView.FocusedRowHandle)
|
||||
Dim configid = detailRow.Item("CONFIG_ID")
|
||||
|
||||
Dim dateString = value.ToString("yyyy-MM-dd") 'hh:mm:ss.fff
|
||||
Dim docId As Integer = ClassWindreamDocGrid.SELECTED_DOC_ID
|
||||
Dim user As String = USER_USERNAME
|
||||
|
||||
Dim Sql As String = String.Format("EXEC PRPMO_DOC_VALUE {0}, {1}, '{2}', '{3}'", docId, configid, dateString, user)
|
||||
ClassDatabase.Execute_non_Query(Sql)
|
||||
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)
|
||||
If ClassDatabase.Execute_non_Query(Sql) = False Then
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "UnexpectedError:", "Error updating doc-metadata (date): " & vbNewLine & "Check the log for further information!")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in OnDateSelectedValueChanged: ", ex.Message)
|
||||
End Try
|
||||
@@ -3683,7 +3686,9 @@ Public Class frmConstructor_Main
|
||||
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)
|
||||
If ClassDatabase.Execute_non_Query(Sql) = False Then
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "UnexpectedError:", "Error updating doc-metadata (textbox): " & vbNewLine & "Check the log for further information!")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in OnTextSelectedValueChanged: ", ex.Message)
|
||||
End Try
|
||||
@@ -3705,7 +3710,9 @@ Public Class frmConstructor_Main
|
||||
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)
|
||||
If ClassDatabase.Execute_non_Query(Sql) = False Then
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "UnexpectedError:", "Error updating doc-metadata (checkbox): " & vbNewLine & "Check the log for further information!")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in OnCheckboxValueChanged: ", ex.Message)
|
||||
End Try
|
||||
@@ -5042,14 +5049,7 @@ Public Class frmConstructor_Main
|
||||
Next
|
||||
End Sub
|
||||
Private Sub DateiÖffnenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles docCM_Open.Click
|
||||
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
|
||||
MsgBox("Could not read File Parameters(4)!", MsgBoxStyle.Exclamation)
|
||||
Exit Sub
|
||||
End If
|
||||
For Each row As DataRow In ClassWindreamDocGrid.DT_RESULTFILES.Rows
|
||||
ClassHelper.File_open(row.Item("DOC_PATH"), row.Item("DOC_ID"))
|
||||
Next
|
||||
|
||||
Open_File()
|
||||
End Sub
|
||||
Private Sub GridControlDocSearch_DoubleClick(sender As Object, e As EventArgs) Handles GridControlDocSearch.DoubleClick
|
||||
Open_File()
|
||||
@@ -5431,6 +5431,9 @@ Public Class frmConstructor_Main
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
GridViewDoc_Search.EndSelection()
|
||||
ClassWindreamDocGrid.GetDocItems(GridViewDoc_Search)
|
||||
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
|
||||
e.Cancel = True
|
||||
End If
|
||||
Refresh_DocID()
|
||||
If ClassWindreamDocGrid.DT_RESULTFILES.Rows.Count = 1 Then
|
||||
If ClassWindreamDocGrid.DT_RESULTFILES.Rows(0).Item("DOC_ID") = 0 Then
|
||||
@@ -5438,7 +5441,7 @@ Public Class frmConstructor_Main
|
||||
End If
|
||||
End If
|
||||
File_in_Work()
|
||||
Dim Result = ClassWindream.Get_File_Rights(ClassWindreamDocGrid.SELECTED_DOC_PATH)
|
||||
Dim Result = clsWD_GET.Get_File_Rights(ClassWindreamDocGrid.SELECTED_DOC_PATH, USER_USERNAME)
|
||||
If Not IsNothing(Result) Then
|
||||
ROW_READ_ONLY = False
|
||||
Select Case Result.ToString
|
||||
@@ -5449,34 +5452,36 @@ Public Class frmConstructor_Main
|
||||
ContextMenu_Write()
|
||||
Case "RWA"
|
||||
ContextMenu_Write()
|
||||
Case ""
|
||||
ContextMenu_Read()
|
||||
ROW_READ_ONLY = True
|
||||
End Select
|
||||
Else
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Getting rights - check the log")
|
||||
e.Cancel = True
|
||||
End If
|
||||
If ROW_READ_ONLY = False Then
|
||||
If RIGHT_READ_ONLY_DOC = True Then
|
||||
ContextMenu_Read()
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
|
||||
If ClassWindreamDocGrid.DT_RESULTFILES.Rows.Count = 1 Then
|
||||
If ClassWindreamDocGrid.DT_RESULTFILES.Rows(0).Item("DISPLAYNAME") <> "" Then
|
||||
docCM_RenameMain.Visible = True
|
||||
Set_Displayname()
|
||||
Else
|
||||
docCM_RenameMain.Visible = False
|
||||
End If
|
||||
If ClassWindreamDocGrid.DT_RESULTFILES.Rows.Count = 1 Then
|
||||
If ClassWindreamDocGrid.DT_RESULTFILES.Rows(0).Item("DISPLAYNAME") <> "" Then
|
||||
docCM_RenameMain.Visible = True
|
||||
Set_Displayname()
|
||||
Else
|
||||
docCM_RenameMain.Visible = False
|
||||
End If
|
||||
Else
|
||||
e.Cancel = True
|
||||
docCM_RenameMain.Visible = False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Opening DocContextMenu: ", ex.Message)
|
||||
Finally
|
||||
Me.Cursor = Cursors.Default
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Sub File_in_Work()
|
||||
@@ -5820,14 +5825,13 @@ Public Class frmConstructor_Main
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Private Sub DateirechteFürUserToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles docCM_GetRights.Click
|
||||
Dim result = ClassWindream.Get_File_Rights(ClassWindreamDocGrid.SELECTED_DOC_PATH)
|
||||
Dim result = clsWD_GET.Get_File_Rights(ClassWindreamDocGrid.SELECTED_DOC_PATH, USER_USERNAME)
|
||||
If Not IsNothing(result) Then
|
||||
Dim msg = "Das aktuelle Recht für Sie ist: "
|
||||
Dim msg = "Das aktuelle Recht für Sie (" & USER_USERNAME & ") ist: "
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "Your current right is: "
|
||||
msg = "Your (" & USER_USERNAME & ") current right is: "
|
||||
End If
|
||||
msg = msg & result.ToString
|
||||
msg = msg & vbNewLine & vbNewLine & "R:" & vbTab & "Read" & vbNewLine & "W:" & vbTab & "Write" & vbNewLine & "A:" & vbTab & "Admin"
|
||||
@@ -5907,7 +5911,7 @@ Public Class frmConstructor_Main
|
||||
End If
|
||||
MessageBox.Show(msg, "Warning:", MessageBoxButtons.OK, MessageBoxIcon.Information)
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub showRecordLogtsbtn_Click(sender As Object, e As EventArgs) Handles showRecordLogtsmi.Click
|
||||
@@ -5963,7 +5967,7 @@ Public Class frmConstructor_Main
|
||||
End If
|
||||
MessageBox.Show(msg, "Warning:", MessageBoxButtons.OK, MessageBoxIcon.Information)
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub tsbtnRefresh_Entity_Click(sender As Object, e As EventArgs) Handles tsbtnRefresh_Entity.Click
|
||||
@@ -6329,9 +6333,8 @@ Public Class frmConstructor_Main
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Dim allow_Open As Boolean = False
|
||||
ClassWindreamDocGrid.GetDocItems(GridViewDoc_Search)
|
||||
Dim Result = ClassWindream.Get_File_Rights(ClassWindreamDocGrid.SELECTED_DOC_PATH)
|
||||
Dim Result = clsWD_GET.Get_File_Rights(ClassWindreamDocGrid.SELECTED_DOC_PATH, USER_USERNAME)
|
||||
If Not IsNothing(Result) Then
|
||||
|
||||
Select Case Result.ToString
|
||||
Case "R"
|
||||
ContextMenu_Read()
|
||||
@@ -6350,6 +6353,12 @@ Public Class frmConstructor_Main
|
||||
For Each row As DataRow In ClassWindreamDocGrid.DT_RESULTFILES.Rows
|
||||
ClassHelper.File_open(row.Item("DOC_PATH"), row.Item("DOC_ID"))
|
||||
Next
|
||||
Else
|
||||
If clsWD_GET.WDFile_exists(ClassWindreamDocGrid.SELECTED_DOC_PATH, True) = True Then
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Right-Management", "File is existing, but you do not have the rights to open this file! " & vbNewLine & "Please contact your admin!" & vbNewLine & "DOC-ID: " & ClassWindreamDocGrid.SELECTED_DOC_ID.ToString)
|
||||
Else
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "", "File does not exist! Please contact your admin!")
|
||||
End If
|
||||
End If
|
||||
Me.Cursor = Cursors.Default
|
||||
End Sub
|
||||
@@ -6406,7 +6415,7 @@ Public Class frmConstructor_Main
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
@@ -6443,8 +6452,7 @@ Public Class frmConstructor_Main
|
||||
Private Sub cmsResultFilesBasic_Opening(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles cmsResultFilesBasic.Opening
|
||||
Try
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
ClassWindreamDocGrid.GetDocItems(GridViewDoc_Search)
|
||||
Dim Result = ClassWindream.Get_File_Rights(ClassWindreamDocGrid.SELECTED_DOC_PATH)
|
||||
Dim Result = clsWD_GET.Get_File_Rights(ClassWindreamDocGrid.SELECTED_DOC_PATH, USER_USERNAME)
|
||||
If Not IsNothing(Result) Then
|
||||
Select Case Result.ToString
|
||||
Case "R"
|
||||
@@ -6459,7 +6467,7 @@ Public Class frmConstructor_Main
|
||||
Finally
|
||||
Me.Cursor = Cursors.Default
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub OrdnerÖffnenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles OrdnerÖffnenToolStripMenuItem.Click
|
||||
@@ -6497,7 +6505,7 @@ Public Class frmConstructor_Main
|
||||
Finally
|
||||
Me.Cursor = Cursors.Default
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub GridViewDoc_Search_MasterRowExpanded(sender As Object, e As CustomMasterRowEventArgs) Handles GridViewDoc_Search.MasterRowExpanded
|
||||
|
||||
Reference in New Issue
Block a user