jj: GridViewProfile
This commit is contained in:
1
app/DD_PM_WINDREAM/frmMain.Designer.vb
generated
1
app/DD_PM_WINDREAM/frmMain.Designer.vb
generated
@@ -274,7 +274,6 @@ Partial Class frmMain
|
|||||||
Me.GridViewProfile.GroupPanelText = "Ziehen Sie Spaltenüberschriften in diesen Bereich um nach diesen gruppieren zu la" &
|
Me.GridViewProfile.GroupPanelText = "Ziehen Sie Spaltenüberschriften in diesen Bereich um nach diesen gruppieren zu la" &
|
||||||
"ssen"
|
"ssen"
|
||||||
Me.GridViewProfile.Name = "GridViewProfile"
|
Me.GridViewProfile.Name = "GridViewProfile"
|
||||||
Me.GridViewProfile.OptionsBehavior.AlignGroupSummaryInGroupRow = DevExpress.Utils.DefaultBoolean.[True]
|
|
||||||
Me.GridViewProfile.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.[False]
|
Me.GridViewProfile.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.[False]
|
||||||
Me.GridViewProfile.OptionsBehavior.AllowDeleteRows = DevExpress.Utils.DefaultBoolean.[False]
|
Me.GridViewProfile.OptionsBehavior.AllowDeleteRows = DevExpress.Utils.DefaultBoolean.[False]
|
||||||
Me.GridViewProfile.OptionsBehavior.Editable = False
|
Me.GridViewProfile.OptionsBehavior.Editable = False
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADw
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADw
|
||||||
CAAAAk1TRnQBSQFMAgEBAgEAAUABAgFAAQIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
CAAAAk1TRnQBSQFMAgEBAgEAAVABAgFQAQIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ Public Class frmMain
|
|||||||
Private UserLoggedin As Integer = 0
|
Private UserLoggedin As Integer = 0
|
||||||
Private PROFILE_COUNT As Integer = 0
|
Private PROFILE_COUNT As Integer = 0
|
||||||
Private DTPROFIL As DataTable
|
Private DTPROFIL As DataTable
|
||||||
|
Private DT_VWPM_PROFILE_ACTIVE As DataTable
|
||||||
|
|
||||||
Private RedDocuments As Integer = 0
|
Private RedDocuments As Integer = 0
|
||||||
Private YellowDocuments As Integer = 0
|
Private YellowDocuments As Integer = 0
|
||||||
@@ -161,6 +162,7 @@ Public Class frmMain
|
|||||||
Try
|
Try
|
||||||
If Me.Visible = True And frmProfileDesigner.Visible = False Then
|
If Me.Visible = True And frmProfileDesigner.Visible = False Then
|
||||||
DTPROFIL = ClassDatabase.Return_Datatable("SELECT * FROM TBPM_PROFILE WHERE GUID = " & CURRENT_ProfilGUID)
|
DTPROFIL = ClassDatabase.Return_Datatable("SELECT * FROM TBPM_PROFILE WHERE GUID = " & CURRENT_ProfilGUID)
|
||||||
|
DT_VWPM_PROFILE_ACTIVE = ClassDatabase.Return_Datatable("SELECT * FROM VWPM_PROFILE_ACTIVE")
|
||||||
PROFILE_COUNT = 0
|
PROFILE_COUNT = 0
|
||||||
Dim sql = CURRENT_DT_CONFIG.Rows(0).Item("SQL_PROFILE_MAIN_VIEW")
|
Dim sql = CURRENT_DT_CONFIG.Rows(0).Item("SQL_PROFILE_MAIN_VIEW")
|
||||||
sql = sql.replace("@USER", Environment.UserName)
|
sql = sql.replace("@USER", Environment.UserName)
|
||||||
@@ -170,8 +172,8 @@ Public Class frmMain
|
|||||||
' "WHERE T.PROFIL_ID = T1.PROFIL_ID " &
|
' "WHERE T.PROFIL_ID = T1.PROFIL_ID " &
|
||||||
' "AND T1.ACTIVE = 1 And (UPPER(T1.USERNAME) = UPPER('{0}')) Order By T1.PRIORITY", Environment.UserName)
|
' "AND T1.ACTIVE = 1 And (UPPER(T1.USERNAME) = UPPER('{0}')) Order By T1.PRIORITY", Environment.UserName)
|
||||||
Dim DTGRID As DataTable = ClassDatabase.Return_Datatable(sql, True)
|
Dim DTGRID As DataTable = ClassDatabase.Return_Datatable(sql, True)
|
||||||
If Not IsNothing(DTGRID) Then
|
|
||||||
|
|
||||||
|
If Not IsNothing(DTGRID) Then
|
||||||
' Spalte für Status Icon erstellen
|
' Spalte für Status Icon erstellen
|
||||||
Dim columnStateIcon As New DataColumn()
|
Dim columnStateIcon As New DataColumn()
|
||||||
columnStateIcon.DataType = GetType(Image)
|
columnStateIcon.DataType = GetType(Image)
|
||||||
@@ -218,20 +220,17 @@ Public Class frmMain
|
|||||||
GridViewProfile.Columns.Item("ICON").MinWidth = 24
|
GridViewProfile.Columns.Item("ICON").MinWidth = 24
|
||||||
GridViewProfile.Columns.Item("ICON").AppearanceCell.BackColor = Color.White
|
GridViewProfile.Columns.Item("ICON").AppearanceCell.BackColor = Color.White
|
||||||
|
|
||||||
GridViewProfile.Columns.Item("TL_STATE").SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Max
|
|
||||||
GridViewProfile.Columns.Item("TL_STATE").SummaryItem.DisplayFormat = "Max: {0}"
|
|
||||||
GridViewProfile.Columns.Item("TL_STATE").SummaryItem.FieldName = "TL_STATE"
|
|
||||||
|
|
||||||
GridViewProfile.Columns("Last edited").DisplayFormat.FormatType = FormatType.DateTime
|
GridViewProfile.Columns("Last edited").DisplayFormat.FormatType = FormatType.DateTime
|
||||||
GridViewProfile.Columns("Last edited").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
|
GridViewProfile.Columns("Last edited").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
|
||||||
|
|
||||||
'GridViewProfile.OptionsBehavior.AlignGroupSummaryInGroupRow = True
|
|
||||||
GridViewProfile.OptionsView.ShowGroupPanel = False
|
|
||||||
GridViewProfile.OptionsBehavior.AutoExpandAllGroups = True
|
GridViewProfile.OptionsBehavior.AutoExpandAllGroups = True
|
||||||
|
GridViewProfile.OptionsView.ShowGroupedColumns = False
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ClassLogger.Add("Unexpected Error in Formatting Grid: " & ex.Message)
|
ClassLogger.Add("Unexpected Error in Formatting Grid: " & ex.Message)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
GridViewProfile.SaveLayoutToXml(GetXML_LayoutName())
|
||||||
|
|
||||||
Else
|
Else
|
||||||
GridControlProfile.DataSource = Nothing
|
GridControlProfile.DataSource = Nothing
|
||||||
Try
|
Try
|
||||||
@@ -361,6 +360,8 @@ Public Class frmMain
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub GridViewProfile_DoubleClick(sender As Object, e As EventArgs) Handles GridViewProfile.DoubleClick
|
Private Sub GridViewProfile_DoubleClick(sender As Object, e As EventArgs) Handles GridViewProfile.DoubleClick
|
||||||
Try
|
Try
|
||||||
Dim PROFIL_ID = GridViewProfile.GetFocusedRowCellValue(GridViewProfile.Columns("PROFIL_ID"))
|
Dim PROFIL_ID = GridViewProfile.GetFocusedRowCellValue(GridViewProfile.Columns("PROFIL_ID"))
|
||||||
@@ -390,9 +391,29 @@ Public Class frmMain
|
|||||||
Dim info As GridGroupRowInfo = TryCast(e.Info, GridGroupRowInfo)
|
Dim info As GridGroupRowInfo = TryCast(e.Info, GridGroupRowInfo)
|
||||||
Dim view As GridView = sender
|
Dim view As GridView = sender
|
||||||
|
|
||||||
|
|
||||||
If info.Column.FieldName = "PROFILE_GROUP_TEXT" Then
|
If info.Column.FieldName = "PROFILE_GROUP_TEXT" Then
|
||||||
info.GroupText = info.GroupValueText
|
info.GroupText = info.GroupValueText
|
||||||
|
|
||||||
|
Dim _color As String
|
||||||
|
|
||||||
|
For Each row As DataRow In DT_VWPM_PROFILE_ACTIVE.Rows
|
||||||
|
If row.Item("PROFILE_GROUP_TEXT") = info.GroupValueText Then
|
||||||
|
_color = row.Item("PROFILE_GROUP_COLOR")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Select Case _color
|
||||||
|
Case "Red"
|
||||||
|
info.Appearance.BackColor = Color.LightSalmon
|
||||||
|
Case "Green"
|
||||||
|
info.Appearance.BackColor = Color.LightGreen
|
||||||
|
Case "Yellow"
|
||||||
|
info.Appearance.BackColor = Color.LightGoldenrodYellow
|
||||||
|
Case Else
|
||||||
info.Appearance.BackColor = Color.LightGray
|
info.Appearance.BackColor = Color.LightGray
|
||||||
|
End Select
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -427,4 +448,21 @@ Public Class frmMain
|
|||||||
|
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GridViewProfile_MouseDown(sender As Object, e As MouseEventArgs) Handles GridViewProfile.MouseDown
|
||||||
|
' Wir brauchen nur einen Doppelklick
|
||||||
|
If e.Button <> MouseButtons.Left Or e.Clicks < 2 Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim view As GridView = sender
|
||||||
|
Dim hi As GridHitInfo = view.CalcHitInfo(e.Location)
|
||||||
|
|
||||||
|
' wenn in eine Group Row Doppelt geklickt wurde..
|
||||||
|
If hi.InGroupRow Then
|
||||||
|
|
||||||
|
' Ein/Ausklappen verhindern
|
||||||
|
DXMouseEventArgs.GetMouseArgs(e).Handled = True
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
Reference in New Issue
Block a user