JJ_17_11_Layout_fixed_JumpToRecord

This commit is contained in:
JenneJ 2015-11-17 11:54:54 +01:00
parent 0a5ce24511
commit 2ccba19ad9
3 changed files with 60 additions and 23 deletions

View File

@ -46,9 +46,11 @@ Partial Public Class frmCustomAppointment
Public Overrides Sub LoadFormData(ByVal appointment As DevExpress.XtraScheduler.Appointment)
If appointment.CustomFields("RecordID") Is Nothing Then
txtRecordID.Text = ""
btnJumpToRecord.Enabled = False
Else
_recordid = appointment.CustomFields("RecordID").ToString()
txtRecordID.Text = _recordid
btnJumpToRecord.Enabled = True
End If
If appointment.CustomFields("ControlID") Is Nothing Then
@ -94,8 +96,11 @@ Partial Public Class frmCustomAppointment
Dim RecordId = Integer.Parse(txtRecordID.Text)
JUMP_RECORD_ID = RecordId
' TODO: Jetzt Constructor aufrufen
OpenFormConstructorDemo(CURRENT_CONSTRUCTOR_ID)
Dim constructId As Integer = ClassDatabase.Execute_Scalar("SELECT T.CONSTRUCT_ID FROM VWPMO_CONSTRUCTOR_FORMS T, TBPMO_RECORD T1 WHERE T.FORM_ID = T1.FORM_ID AND T1.GUID = " & JUMP_RECORD_ID)
' TODO: FormId und ConstructId herausfinden
OpenFormConstructorDemo(constructId)
Me.Close()
End If
End Sub

View File

@ -173,7 +173,7 @@ Partial Class frmForm_Constructor_Main
Me.GridControlMain.Location = New System.Drawing.Point(0, 0)
Me.GridControlMain.MainView = Me.grvwTiles
Me.GridControlMain.Name = "GridControlMain"
Me.GridControlMain.Size = New System.Drawing.Size(786, 270)
Me.GridControlMain.Size = New System.Drawing.Size(779, 270)
Me.GridControlMain.TabIndex = 0
Me.GridControlMain.UseEmbeddedNavigator = True
Me.GridControlMain.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.grvwCarousel, Me.grvwTiles, Me.grvwGrid})
@ -427,7 +427,7 @@ Partial Class frmForm_Constructor_Main
Me.SplitContainerBottom.Panel1.Controls.Add(Me.ToolStripEdit)
Me.SplitContainerBottom.Panel1.Text = "Panel1"
Me.SplitContainerBottom.Panel2.Text = "Panel2"
Me.SplitContainerBottom.Size = New System.Drawing.Size(1074, 372)
Me.SplitContainerBottom.Size = New System.Drawing.Size(1074, 365)
Me.SplitContainerBottom.SplitterPosition = 448
Me.SplitContainerBottom.TabIndex = 0
Me.SplitContainerBottom.Text = "SplitContainerControl1"
@ -443,7 +443,7 @@ Partial Class frmForm_Constructor_Main
Me.TCDetails.Location = New System.Drawing.Point(0, 25)
Me.TCDetails.Name = "TCDetails"
Me.TCDetails.SelectedTabPage = Me.TabDetails
Me.TCDetails.Size = New System.Drawing.Size(1069, 347)
Me.TCDetails.Size = New System.Drawing.Size(1062, 340)
Me.TCDetails.TabIndex = 1
Me.TCDetails.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.TabDetails, Me.TabWindream, Me.TabFollowUp})
'
@ -452,7 +452,7 @@ Partial Class frmForm_Constructor_Main
Me.TabDetails.Controls.Add(Me.pnlDetails)
Me.TabDetails.Image = Global.DD_Record_Organiser.My.Resources.Resources.grid_Data_16xMD
Me.TabDetails.Name = "TabDetails"
Me.TabDetails.Size = New System.Drawing.Size(1063, 316)
Me.TabDetails.Size = New System.Drawing.Size(1060, 312)
Me.TabDetails.Text = "Detailansicht"
'
'pnlDetails
@ -460,7 +460,7 @@ Partial Class frmForm_Constructor_Main
Me.pnlDetails.Dock = System.Windows.Forms.DockStyle.Fill
Me.pnlDetails.Location = New System.Drawing.Point(0, 0)
Me.pnlDetails.Name = "pnlDetails"
Me.pnlDetails.Size = New System.Drawing.Size(1063, 316)
Me.pnlDetails.Size = New System.Drawing.Size(1060, 312)
Me.pnlDetails.TabIndex = 0
'
'TabWindream
@ -469,7 +469,7 @@ Partial Class frmForm_Constructor_Main
Me.TabWindream.Controls.Add(Me.ToolStripDokumente)
Me.TabWindream.Image = Global.DD_Record_Organiser.My.Resources.Resources.Files_7954
Me.TabWindream.Name = "TabWindream"
Me.TabWindream.Size = New System.Drawing.Size(1063, 316)
Me.TabWindream.Size = New System.Drawing.Size(1060, 312)
Me.TabWindream.Text = "windream-Dateien"
'
'AxObjectListControl
@ -480,7 +480,7 @@ Partial Class frmForm_Constructor_Main
Me.AxObjectListControl.Location = New System.Drawing.Point(0, 25)
Me.AxObjectListControl.Name = "AxObjectListControl"
Me.AxObjectListControl.OcxState = CType(resources.GetObject("AxObjectListControl.OcxState"), System.Windows.Forms.AxHost.State)
Me.AxObjectListControl.Size = New System.Drawing.Size(1063, 291)
Me.AxObjectListControl.Size = New System.Drawing.Size(1060, 287)
Me.AxObjectListControl.TabIndex = 6
Me.AxObjectListControl.TabStop = False
'
@ -489,7 +489,7 @@ Partial Class frmForm_Constructor_Main
Me.ToolStripDokumente.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tslblWindreamView, Me.ToolStripDropDownButton2})
Me.ToolStripDokumente.Location = New System.Drawing.Point(0, 0)
Me.ToolStripDokumente.Name = "ToolStripDokumente"
Me.ToolStripDokumente.Size = New System.Drawing.Size(1063, 25)
Me.ToolStripDokumente.Size = New System.Drawing.Size(1060, 25)
Me.ToolStripDokumente.TabIndex = 2
Me.ToolStripDokumente.Text = "ToolStrip2"
'
@ -523,7 +523,7 @@ Partial Class frmForm_Constructor_Main
Me.TabFollowUp.Controls.Add(Me.ListViewFollowUp)
Me.TabFollowUp.Image = Global.DD_Record_Organiser.My.Resources.Resources.Task_16xMD
Me.TabFollowUp.Name = "TabFollowUp"
Me.TabFollowUp.Size = New System.Drawing.Size(1063, 316)
Me.TabFollowUp.Size = New System.Drawing.Size(1060, 312)
Me.TabFollowUp.Text = "Wiedervorlage"
'
'grpbxFU_Profile
@ -693,7 +693,7 @@ Partial Class frmForm_Constructor_Main
Me.ToolStripEdit.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsButtonAdd, Me.tsButtonSave, Me.tsButtonDelete, Me.tsButtonEditMode, Me.ToolStripDropDownButton1, Me.tsButtonShowTaskOverview, Me.tsButtonShowWorkflowTasks})
Me.ToolStripEdit.Location = New System.Drawing.Point(0, 0)
Me.ToolStripEdit.Name = "ToolStripEdit"
Me.ToolStripEdit.Size = New System.Drawing.Size(1069, 25)
Me.ToolStripEdit.Size = New System.Drawing.Size(1062, 25)
Me.ToolStripEdit.TabIndex = 0
Me.ToolStripEdit.Text = "ToolStrip1"
'

View File

@ -93,6 +93,7 @@ Public Class frmForm_Constructor_Main
_FormClosing = True
' Check_Record_Changed()
CloseWDDocview()
Save_Grid_Layout()
ClassWindowLocation.SaveFormLocationSize(Me, CONSTRUCTORID, CURRENT_SCREEN_ID, "CONSTRUCTOR_MAIN")
End Sub
@ -137,13 +138,12 @@ Public Class frmForm_Constructor_Main
End Sub
#Region "Layout"
Private Sub grvwGrid_Layout(sender As Object, e As EventArgs) Handles grvwGrid.Layout
If dataloaded And grvwGrid.Columns.Count <> 0 Then
Save_Grid_Layout()
End If
End Sub
Sub Save_Grid_Layout()
If ACT_EBENE_STRING Is Nothing Then
Exit Sub
End If
Dim XMLPath = Get_Grid_Layout_Filename()
grvwGrid.SaveLayoutToXml(XMLPath)
Update_Status_Label(True, "Grid Layout Loaded")
@ -151,7 +151,7 @@ Public Class frmForm_Constructor_Main
Sub Load_Grid_Layout()
Dim XMLPath = Get_Grid_Layout_Filename()
If File.Exists(XMLPath) Then
If File.Exists(XMLPath) And GRID_TYPE = GridType.Grid Then
grvwGrid.RestoreLayoutFromXml(XMLPath)
grvwGrid.ClearColumnsFilter()
'grvwGrid.ClearGrouping()
@ -193,6 +193,8 @@ Public Class frmForm_Constructor_Main
Dim element = hitInfo.ButtonInfo.Element
NavPane.HideDropDownWindow()
Save_Grid_Layout()
If TypeOf element Is NavButton Then
Dim btn As NavButton = TryCast(element, NavButton)
@ -423,6 +425,12 @@ Public Class frmForm_Constructor_Main
Load_Tree_View_Data()
End Sub
Private Sub TreeViewMain_BeforeSelect(sender As Object, e As TreeViewCancelEventArgs) Handles TreeViewMain.BeforeSelect
If grvwGrid.Columns.Count > 0 Then
Save_Grid_Layout()
End If
End Sub
Sub Load_Tree_View(ConstructorId As Integer)
Dim LEVEL1_NODE As TreeNode
@ -1163,7 +1171,11 @@ Public Class frmForm_Constructor_Main
RECORDID_Column = New TileViewItemElement()
With RECORDID_Column
.Column = grvwTiles.Columns(0)
.Column.OptionsFilter.AllowFilter = True
.TextAlignment = TileItemContentAlignment.TopLeft
.Column.Caption = "Record-ID"
End With
grvwTiles.TileTemplate.Add(RECORDID_Column)
Case 1
' Index 1 ist das Bild
If Column.DataType.ToString.Contains("Byte") Then
@ -1292,7 +1304,6 @@ Public Class frmForm_Constructor_Main
' End If
'Next
'grvwGrid.Columns("Record-ID").OptionsColumn.AllowShowHide = False
Load_Grid_Layout()
HideColumns()
@ -1929,7 +1940,6 @@ Public Class frmForm_Constructor_Main
Private Sub ButtonSetViewAsDefault_Click(sender As Object, e As EventArgs) Handles ButtonSetViewAsDefault.Click
Dim VIEWTYPE_ID As Integer
Select Case GRID_TYPE
Case GridType.Tiles
VIEWTYPE_ID = 1
@ -1945,8 +1955,6 @@ Public Class frmForm_Constructor_Main
VIEW_ID_RUNTIME = -1
MsgBox("Stanard-View was saved successfully!", MsgBoxStyle.Information)
End If
' TODO: Standard View in Datenbank setzen
End Sub
Private Sub ButtonResetView_Click(sender As Object, e As EventArgs) Handles ButtonResetView.Click
@ -2313,17 +2321,41 @@ Public Class frmForm_Constructor_Main
End Sub
Private Sub CheckNode(ByVal n As TreeNode, FormID As Integer)
Dim aNode As TreeNode
For Each aNode In n.Nodes
If aNode.Tag = FormID Then
'Gefunden also selektieren
TreeViewMain.SelectedNode = aNode
TreeViewMain.SelectedNode.EnsureVisible()
TreeViewMain.Select()
'Für Grid filtern wir die Aktuelle Ansicht nach der Record-ID,
'für Carousel und Tiles markieren wir den Record
LocateRecordById(JUMP_RECORD_ID)
' Jump Record-ID wieder zurücksetzen
JUMP_RECORD_ID = 0
Exit For
Exit Sub
End If
CheckNode(aNode, FormID)
Next
End Sub
Public Sub LocateRecordById(RecordId As Integer)
If GRID_TYPE = GridType.Grid Then
Dim FilterString As String = String.Format("[Record-ID] = {0}", JUMP_RECORD_ID)
grvwGrid.ActiveFilterString = FilterString
ElseIf GRID_TYPE = GridType.Carousel Then
Dim rowHandle = grvwCarousel.LocateByValue(0, grvwCarousel.Columns("Record-ID"), JUMP_RECORD_ID)
grvwCarousel.FocusedRowHandle = rowHandle
ElseIf GRID_TYPE = GridType.Tiles Then
Dim rowHandle = grvwTiles.LocateByValue(0, grvwTiles.Columns("Record-ID"), JUMP_RECORD_ID)
grvwTiles.FocusedRowHandle = rowHandle
End If
End Sub
Sub Load_Level1()
Try
Dim sql As String = "SELECT * from VWPMO_CONSTRUCTOR_FORMS WHERE PARENT_ID = 0 AND CONSTRUCT_ID = " & CONSTRUCTORID & " ORDER BY SEQUENCE"