This commit is contained in:
SchreiberM
2016-11-23 17:04:30 +01:00
parent fc9f391307
commit 8f457040bb
18 changed files with 2020 additions and 659 deletions

View File

@@ -1131,6 +1131,7 @@ Public Class frmConstructor_Main
If RIGHT_WINDREAM_FORBIDDEN = True Then
' Hinzufügen sollte auch bei RIGHT_ONLY_READ verfügbar sein
tslblFileslocked.Visible = True
Doc_Controls_EditMode(False)
'TabWindream.PageEnabled = False
tsbtnDoc_Refresh.Enabled = False
EntitätssucheStartenToolStripMenuItem.Enabled = False
@@ -1226,10 +1227,12 @@ Public Class frmConstructor_Main
If SelectedNode.Tag.ToString.Contains("RECORD-ID") Then
Dim Record = Return_RECORD_forTag(SelectedNode.Tag)
If Record <> 0 Then
Doc_Controls_EditMode(True)
If RIGHT_WINDREAM_FORBIDDEN = False Then
Doc_Controls_EditMode(True)
End If
Column_Row_Handler(Record, True)
LocateRecordById(RECORD_ID)
If DOC_SEARCH_TAB1 = True Then
If DOC_SEARCH_TAB1 = True And RIGHT_WINDREAM_FORBIDDEN = False Then
Doc_Controls_EditMode(True)
End If
End If
@@ -2095,7 +2098,7 @@ Public Class frmConstructor_Main
RECORD_ENABLED = True
CURRENT_RECORD_ENABLED = True
If DOC_SEARCH_TAB1 = True Then
If DOC_SEARCH_TAB1 = True And RIGHT_WINDREAM_FORBIDDEN = False Then
Doc_Controls_EditMode(True)
End If
pnlDetails.Focus()
@@ -2655,7 +2658,10 @@ Public Class frmConstructor_Main
If ACTIVATE_DOC_SEARCH_ON_EDIT = False Then
Doc_Controls_EditMode(False)
Else
Doc_Controls_EditMode(True)
If RIGHT_WINDREAM_FORBIDDEN = False Then
Doc_Controls_EditMode(True)
End If
End If
Load_DocGrid_Layout()
@@ -2669,7 +2675,10 @@ Public Class frmConstructor_Main
TabWindream.Controls.Add(GridControlDocSearch)
'GridControlDocSearch.Dock = DockStyle.Top
TabWindream.PageVisible = True
Doc_Controls_EditMode(True)
If RIGHT_WINDREAM_FORBIDDEN = False Then
Doc_Controls_EditMode(True)
End If
End If
End If
@@ -3285,14 +3294,15 @@ Public Class frmConstructor_Main
Dim sel = String.Format("SELECT * FROM TBPMO_RECORD WHERE RECORD_ENTITY_ID = (SELECT RECORD_ENTITY_ID FROM TBPMO_RECORD WHERE GUID = {0}) AND FORM_ID = {1} AND GUID <> {2}", SELECTED_RECORD_ID, ENTITY_ID, SELECTED_RECORD_ID)
Dim DT_VARIANT As DataTable = ClassDatabase.Return_Datatable(sel)
If DT_VARIANT.Rows.Count > 0 Then
XtraTabPageVariant.PageVisible = True
TabPageVariant.PageVisible = True
Dim msg = "Vorgängervarianten"
If USER_LANGUAGE <> "de-DE" Then
msg = "Pre variants"
End If
XtraTabPageVariant.Text = String.Format(msg & " ({0})", DT_VARIANT.Rows.Count)
TabPageVariant.Text = String.Format(msg & " ({0})", DT_VARIANT.Rows.Count)
Else
XtraTabPageVariant.PageVisible = False
TabPageVariant.PageVisible = False
End If
If DOC_SEARCH_TAB1 = True Then
DocSearch_Decision()
@@ -4211,6 +4221,8 @@ Public Class frmConstructor_Main
BACKGROUND_HELPER.PictureAlignment = ContentAlignment.BottomRight
Case "TabFollowUp"
'Refresh_FollowUps()
Case "TabPageVariant"
Load_Variants
End Select
End Sub
Sub XtraTabPageVariant_Open()
@@ -4939,23 +4951,23 @@ Public Class frmConstructor_Main
Else
If GRID_TYPE = GridType.Grid Then
'Try
' Dim rowCellValue = grvwGrid.GetRowCellValue(e.RowHandle, "ROW_COLOR")
' If rowCellValue <> "" Then
' Dim ColorRow As Color
' Try
' ColorRow = Color.FromName(rowCellValue)
' Catch ex As Exception
' ClassLogger.Add(">> RowBackColor '" & rowCellValue & "'could not be converted from name!", False)
' Exit Sub
' End Try
' 'Dim c As Color = DirectCast(rowCellValue, Color)
' e.Appearance.BackColor = ColorRow
' e.HighPriority = True
' End If
'Catch ex As Exception
' ClassLogger.Add(">> Unexpected Error in RowStyle: " & ex.Message, False)
'End Try
Try
Dim rowCellValue = grvwGrid.GetRowCellValue(e.RowHandle, "ROW_COLOR")
If rowCellValue <> "" Then
Dim ColorRow As Color
Try
ColorRow = Color.FromName(rowCellValue)
Catch ex As Exception
ClassLogger.Add(">> RowBackColor '" & rowCellValue & "'could not be converted from name!", False)
Exit Sub
End Try
'Dim c As Color = DirectCast(rowCellValue, Color)
e.Appearance.BackColor = ColorRow
e.HighPriority = True
End If
Catch ex As Exception
ClassLogger.Add(">> Unexpected Error in RowStyle: " & ex.Message, False)
End Try
End If
End If
End Sub
@@ -6248,4 +6260,31 @@ Public Class frmConstructor_Main
Private Sub tsbtnDoc_Refresh_Click(sender As Object, e As EventArgs) Handles tsbtnDoc_Refresh.Click
RUN_WDSEARCH_GRID("RECORD")
End Sub
Private Sub Load_Variants()
Try
Me.TBPMO_RECORD_VARIANTTableAdapter.Connection.ConnectionString = MyConnectionString
Me.TBPMO_RECORD_VARIANTTableAdapter.Fill(Me.DD_DMSDataSet.TBPMO_RECORD_VARIANT, ENTITY_ID, RECORD_ID)
Catch ex As System.Exception
MsgBox("Error while loading variants: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click
Load_Variants()
End Sub
Private Sub tsbtnVariantDetailView_Click(sender As Object, e As EventArgs) Handles tsbtnVariantDetailView.Click
Try
Dim RECORD_ID = GridViewVariants.GetFocusedRowCellValue(GridViewVariants.Columns("RECORD_ID"))
If Not IsNothing(RECORD_ID) Then
ClassJumpRecord.JumpToRecord(0, RECORD_ID)
End If
Catch ex As Exception
MsgBox("Unexpected Error in Show_Detail_Record:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
JUMP_RECORD_ID = 0
End Sub
End Class