|
|
Public Class frmApplikationsuebersicht
|
|
|
|
|
|
#Region "Deklarationen"
|
|
|
Dim Applikation As New TKB.VV.Applikation.clsApplikation
|
|
|
Dim Uebersicht As New TKB.VV.Applikation.clsApplikationsuebersicht
|
|
|
Dim Treeviewdata As New TKB.VV.Applikation.clsApplikationTree
|
|
|
Dim TreeParent As New TKB.VV.Applikation.clsApplikationTree
|
|
|
Dim SpaltenTitel As New TKB.VV.Utils.Tabellenspalte
|
|
|
Dim c1data As New DataTable
|
|
|
Friend selectPoint As New System.Drawing.Point()
|
|
|
Dim NurAktive As Boolean = False
|
|
|
''' <summary>
|
|
|
''' Security-Klasse
|
|
|
''' </summary>
|
|
|
''' <remarks></remarks>
|
|
|
Dim sec As New TKB.VV.Utils.MySecurity
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
#Region "Formular"
|
|
|
Private Sub frmApplikationsuebersicht_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
|
|
Treeviewdata.Load_Tree(Me.TreeApplikationen, False, "", Me.NurAktive)
|
|
|
Me.TreeApplikationen.SelectedNode = Me.TreeApplikationen.Nodes(0)
|
|
|
sec.Set_Form_Security(Me)
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
Private Sub TSBtnQuit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSBtnQuit.Click
|
|
|
Me.Close()
|
|
|
End Sub
|
|
|
|
|
|
Private Sub BeendenToolStipMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BeendenToolStipMenuItem.Click
|
|
|
Me.Close()
|
|
|
End Sub
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
Private Sub Refresh_Details()
|
|
|
c1data = Uebersicht.Get_Applikationsdetails(Me.TreeApplikationen.SelectedNode.Tag, Me.tstxtSuche.Text)
|
|
|
'Me.tstxtSuche.Text)
|
|
|
'If Me.Profil.sV_Sort.ToString <> "" Then
|
|
|
' c1data.DefaultView.Sort = Me.Profil.sV_Sort.ToString
|
|
|
'End If
|
|
|
|
|
|
'Dim gv As C1.Win.C1TrueDBGrid.DataViewEnum
|
|
|
'Dim s As New Collection
|
|
|
'Dim i As Integer = -1
|
|
|
'For Each g As C1.Win.C1TrueDBGrid.C1DataColumn In Me.C1Vertragselemente.GroupedColumns
|
|
|
' s.Add(g.Caption)
|
|
|
' i = i + 1
|
|
|
' ' xxx(i) = g.Caption
|
|
|
'Next
|
|
|
'i = Me.C1Vertragselemente.DataView
|
|
|
'Me.C1Vertragselemente.Enabled = False
|
|
|
Me.C1Applikationen.DataSource = c1data
|
|
|
Me.C1Applikationen.DataMember = c1data.TableName
|
|
|
Me.SpaltenTitel.Spaltentitel_aktualisieren_Optionaler_Aktiv_Filer(Me.C1Applikationen, "Applikationsuebersicht", Me.c1data, "")
|
|
|
' Update_Details()
|
|
|
' Docs.Get_Layout(Me.C1Vertragselemente, 1, Me.Profil.iProfilnr.Value)
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
''' <summary>
|
|
|
''' Treeview-AfterSelect
|
|
|
''' </summary>
|
|
|
''' <param name="sender"></param>
|
|
|
''' <param name="e"></param>
|
|
|
''' <remarks></remarks>
|
|
|
Private Sub TreeApplikationen_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeApplikationen.AfterSelect
|
|
|
Refresh_Details()
|
|
|
End Sub
|
|
|
|
|
|
''' <summary>
|
|
|
''' Anzeige eines Applikationselementes
|
|
|
''' </summary>
|
|
|
''' <param name="sender"></param>
|
|
|
''' <param name="e"></param>
|
|
|
''' <remarks></remarks>
|
|
|
Private Sub C1Applikationen_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles C1Applikationen.DoubleClick
|
|
|
Dim f As New frmApplikation(Me.C1Applikationen.Columns("Applikationnr").Value, False)
|
|
|
f.MdiParent = Me.MdiParent
|
|
|
f.Show()
|
|
|
End Sub
|
|
|
|
|
|
''' <summary>
|
|
|
''' Bei inaktiven Eintr<74>gen Schrift "grau" setzen und durchstreichen
|
|
|
''' </summary>
|
|
|
''' <param name="sender"></param>
|
|
|
''' <param name="e"></param>
|
|
|
''' <remarks></remarks>
|
|
|
Private Sub C1Vertragselemente_FetchRowStyle(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs) Handles C1Applikationen.FetchRowStyle
|
|
|
Try
|
|
|
If Me.C1Applikationen.Columns("aktiv").CellValue(e.Row) = False Then
|
|
|
Dim FNT As Font = e.CellStyle.Font
|
|
|
e.CellStyle.Font = New Font(FNT, FontStyle.Strikeout)
|
|
|
e.CellStyle.ForeColor = Color.Gray
|
|
|
End If
|
|
|
Catch
|
|
|
End Try
|
|
|
End Sub
|
|
|
''' <summary>
|
|
|
''' Mousedown-Ereignis auf dem Tree
|
|
|
''' </summary>
|
|
|
''' <param name="sender"></param>
|
|
|
''' <param name="e"></param>
|
|
|
''' <remarks></remarks>
|
|
|
Private Sub TreeStruktur_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TreeApplikationen.MouseDown
|
|
|
Try
|
|
|
Dim mouseEvents As MouseEventArgs
|
|
|
mouseEvents = e
|
|
|
selectPoint.Y = mouseEvents.Y
|
|
|
selectPoint.X = mouseEvents.X
|
|
|
Me.TreeApplikationen.SelectedNode = Me.TreeApplikationen.GetNodeAt(selectPoint)
|
|
|
Catch ex As Exception
|
|
|
MsgBox(ex.Message)
|
|
|
End Try
|
|
|
End Sub
|
|
|
|
|
|
''' <summary>
|
|
|
''' Alle Knoten schliessen
|
|
|
''' </summary>
|
|
|
''' <param name="sender"></param>
|
|
|
''' <param name="e"></param>
|
|
|
''' <remarks></remarks>
|
|
|
Private Sub TreeApplikationenAlleKnotenSchliessenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TreeApplikationenAlleKnotenSchliessenToolStripMenuItem.Click
|
|
|
Me.TreeApplikationen.CollapseAll()
|
|
|
End Sub
|
|
|
''' <summary>
|
|
|
''' Alle Knoten <20>ffnen
|
|
|
''' </summary>
|
|
|
''' <param name="sender"></param>
|
|
|
''' <param name="e"></param>
|
|
|
''' <remarks></remarks>
|
|
|
Private Sub TreeApplikationenAlleKnoten<EFBFBD>ffnenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TreeApplikationenAlleKnoten<EFBFBD>ffnenToolStripMenuItem.Click
|
|
|
Me.TreeApplikationen.ExpandAll()
|
|
|
End Sub
|
|
|
|
|
|
Private Sub AnzeigenBearbeitenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AnzeigenBearbeitenToolStripMenuItem.Click
|
|
|
C1Applikationen_DoubleClick(sender, e)
|
|
|
End Sub
|
|
|
''' <summary>
|
|
|
''' Detail-Contextmenu Open
|
|
|
''' </summary>
|
|
|
''' <param name="sender"></param>
|
|
|
''' <param name="e"></param>
|
|
|
''' <remarks></remarks>
|
|
|
Private Sub DetailContextMenu_Opening(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles DetailContextMenu.Opening
|
|
|
If Me.C1Applikationen.Splits(0).Rows.Count < 1 Then
|
|
|
Me.DetailContextMenu.Enabled = False
|
|
|
Else
|
|
|
Me.DetailContextMenu.Enabled = True
|
|
|
End If
|
|
|
End Sub
|
|
|
|
|
|
Private Sub C1Applikationen_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles C1Applikationen.MouseDown
|
|
|
Me.C1Applikationen.Bookmark = Me.C1Applikationen.RowContaining(e.Y)
|
|
|
Me.C1Applikationen.Bookmark = Me.C1Applikationen.RowBookmark(Me.C1Applikationen.RowContaining(e.Y))
|
|
|
|
|
|
End Sub
|
|
|
''' <summary>
|
|
|
''' Applikation suchen
|
|
|
''' </summary>
|
|
|
''' <param name="sender"></param>
|
|
|
''' <param name="e"></param>
|
|
|
''' <remarks></remarks>
|
|
|
Private Sub TSBtnSuche_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSBtnSuche.Click
|
|
|
Me.C1Applikationen.DataSource = Nothing
|
|
|
Treeviewdata.Load_Tree(Me.TreeApplikationen, False, Me.tstxtSuche.Text, Me.NurAktive)
|
|
|
Try
|
|
|
Me.TreeApplikationen.SelectedNode = Me.TreeApplikationen.Nodes(0)
|
|
|
Catch ex As Exception
|
|
|
|
|
|
End Try
|
|
|
End Sub
|
|
|
|
|
|
Private Sub tstxtSuche_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles tstxtSuche.Enter
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
Private Sub tstxtSuche_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles tstxtSuche.KeyDown
|
|
|
If e.KeyCode = Keys.Enter Then
|
|
|
TSBtnSuche_Click(sender, e)
|
|
|
End If
|
|
|
End Sub
|
|
|
|
|
|
Private Sub TSBtnFilterAufheben_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSBtnFilterAufheben.Click
|
|
|
Me.tstxtSuche.Text = ""
|
|
|
Me.C1Applikationen.DataSource = Nothing
|
|
|
Treeviewdata.Load_Tree(Me.TreeApplikationen, False, Me.tstxtSuche.Text, Me.NurAktive)
|
|
|
Try
|
|
|
Me.TreeApplikationen.SelectedNode = Me.TreeApplikationen.Nodes(0)
|
|
|
Catch ex As Exception
|
|
|
|
|
|
End Try
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
Private Sub NeueApplikationErfassenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NeueApplikationErfassenToolStripMenuItem.Click
|
|
|
Dim f As New frmApplikation(True)
|
|
|
f.MdiParent = Me.MdiParent
|
|
|
f.Show()
|
|
|
End Sub
|
|
|
|
|
|
Private Sub NurAktiveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NurAktiveToolStripMenuItem.Click
|
|
|
If Me.NurAktiveToolStripMenuItem.Text = "Nur Aktive" Then
|
|
|
Me.NurAktiveToolStripMenuItem.Text = "Aktive und Inaktive"
|
|
|
Me.NurAktive = True
|
|
|
Else
|
|
|
Me.NurAktive = False
|
|
|
Me.NurAktiveToolStripMenuItem.Text = "Nur Aktive"
|
|
|
End If
|
|
|
Treeviewdata.Load_Tree(Me.TreeApplikationen, False, Me.tstxtSuche.Text, Me.NurAktive)
|
|
|
Me.TreeApplikationen.SelectedNode = Me.TreeApplikationen.Nodes(0)
|
|
|
End Sub
|
|
|
|
|
|
End Class |