You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
EDOKA_DMS/EDOKA/Profile/frmMitarbeitereinstellungen.vb

1421 lines
66 KiB

Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Imports System.ComponentModel
Imports System.Drawing
Imports System.Drawing.Color
Public Class frmMitarbeitereinstellungen
Inherits System.Windows.Forms.Form
#Region " Vom Windows Form Designer generierter Code "
Public Sub New()
MyBase.New()
' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
InitializeComponent()
' Initialisierungen nach dem Aufruf InitializeComponent() hinzufügen
End Sub
' Die Form überschreibt den Löschvorgang der Basisklasse, um Komponenten zu bereinigen.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
' Für Windows Form-Designer erforderlich
Private components As System.ComponentModel.IContainer
'HINWEIS: Die folgende Prozedur ist für den Windows Form-Designer erforderlich
'Sie kann mit dem Windows Form-Designer modifiziert werden.
'Verwenden Sie nicht den Code-Editor zur Bearbeitung.
Friend WithEvents GroupBox8 As System.Windows.Forms.GroupBox
Friend WithEvents GroupBox7 As System.Windows.Forms.GroupBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents txtRang As System.Windows.Forms.TextBox
Friend WithEvents Label35 As System.Windows.Forms.Label
Friend WithEvents txtFunktion As System.Windows.Forms.TextBox
Friend WithEvents Label34 As System.Windows.Forms.Label
Friend WithEvents txtTelefax As System.Windows.Forms.TextBox
Friend WithEvents Label33 As System.Windows.Forms.Label
Friend WithEvents txtTelefon As System.Windows.Forms.TextBox
Friend WithEvents GroupBox6 As System.Windows.Forms.GroupBox
Friend WithEvents cmaileingang As System.Windows.Forms.CheckBox
Friend WithEvents cEdokaMessage As System.Windows.Forms.CheckBox
Friend WithEvents cMailDirekt As System.Windows.Forms.CheckBox
Friend WithEvents Label32 As System.Windows.Forms.Label
Friend WithEvents txtMailadresse As System.Windows.Forms.TextBox
Friend WithEvents cmailempfang As System.Windows.Forms.CheckBox
Friend WithEvents ToolBar1 As System.Windows.Forms.ToolBar
Friend WithEvents ToolBarButton1 As System.Windows.Forms.ToolBarButton
Friend WithEvents ToolBarButton2 As System.Windows.Forms.ToolBarButton
Friend WithEvents cedoka_mail As System.Windows.Forms.CheckBox
Friend WithEvents C1TrueDBGrid1 As C1.Win.C1TrueDBGrid.C1TrueDBGrid
Friend WithEvents C1TrueDBGrid2 As C1.Win.C1TrueDBGrid.C1TrueDBGrid
Friend WithEvents ContextMenu1 As System.Windows.Forms.ContextMenu
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents TabControl1 As System.Windows.Forms.TabControl
Friend WithEvents TabPage1 As System.Windows.Forms.TabPage
Friend WithEvents TabPage2 As System.Windows.Forms.TabPage
Friend WithEvents TreeView1 As System.Windows.Forms.TreeView
Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
Friend WithEvents ImageList3 As System.Windows.Forms.ImageList
Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip
Friend WithEvents ToolBar2 As System.Windows.Forms.ToolBar
Friend WithEvents btnSearch As System.Windows.Forms.ToolBarButton
Friend WithEvents txtSearch As System.Windows.Forms.TextBox
Friend WithEvents TabPage3 As System.Windows.Forms.TabPage
Friend WithEvents ToolBar3 As System.Windows.Forms.ToolBar
Friend WithEvents btnSucheNotBerechtigt As System.Windows.Forms.ToolBarButton
Friend WithEvents txtSearchNotBerechtigt As System.Windows.Forms.TextBox
Friend WithEvents TV2 As System.Windows.Forms.TreeView
Friend WithEvents BtnHelp As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmMitarbeitereinstellungen))
Dim GridLines1 As C1.Win.C1TrueDBGrid.Util.GridLines = New C1.Win.C1TrueDBGrid.Util.GridLines()
Dim GridLines2 As C1.Win.C1TrueDBGrid.Util.GridLines = New C1.Win.C1TrueDBGrid.Util.GridLines()
Me.GroupBox8 = New System.Windows.Forms.GroupBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.C1TrueDBGrid2 = New C1.Win.C1TrueDBGrid.C1TrueDBGrid()
Me.C1TrueDBGrid1 = New C1.Win.C1TrueDBGrid.C1TrueDBGrid()
Me.ContextMenu1 = New System.Windows.Forms.ContextMenu()
Me.MenuItem1 = New System.Windows.Forms.MenuItem()
Me.MenuItem2 = New System.Windows.Forms.MenuItem()
Me.Label1 = New System.Windows.Forms.Label()
Me.GroupBox7 = New System.Windows.Forms.GroupBox()
Me.Label4 = New System.Windows.Forms.Label()
Me.txtRang = New System.Windows.Forms.TextBox()
Me.Label35 = New System.Windows.Forms.Label()
Me.txtFunktion = New System.Windows.Forms.TextBox()
Me.Label34 = New System.Windows.Forms.Label()
Me.txtTelefax = New System.Windows.Forms.TextBox()
Me.Label33 = New System.Windows.Forms.Label()
Me.txtTelefon = New System.Windows.Forms.TextBox()
Me.GroupBox6 = New System.Windows.Forms.GroupBox()
Me.cedoka_mail = New System.Windows.Forms.CheckBox()
Me.cmaileingang = New System.Windows.Forms.CheckBox()
Me.cEdokaMessage = New System.Windows.Forms.CheckBox()
Me.cMailDirekt = New System.Windows.Forms.CheckBox()
Me.Label32 = New System.Windows.Forms.Label()
Me.txtMailadresse = New System.Windows.Forms.TextBox()
Me.cmailempfang = New System.Windows.Forms.CheckBox()
Me.ToolBar1 = New System.Windows.Forms.ToolBar()
Me.ToolBarButton1 = New System.Windows.Forms.ToolBarButton()
Me.ToolBarButton2 = New System.Windows.Forms.ToolBarButton()
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
Me.TabControl1 = New System.Windows.Forms.TabControl()
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.TabPage2 = New System.Windows.Forms.TabPage()
Me.txtSearch = New System.Windows.Forms.TextBox()
Me.ToolBar2 = New System.Windows.Forms.ToolBar()
Me.btnSearch = New System.Windows.Forms.ToolBarButton()
Me.TreeView1 = New System.Windows.Forms.TreeView()
Me.ImageList3 = New System.Windows.Forms.ImageList(Me.components)
Me.TabPage3 = New System.Windows.Forms.TabPage()
Me.TV2 = New System.Windows.Forms.TreeView()
Me.txtSearchNotBerechtigt = New System.Windows.Forms.TextBox()
Me.ToolBar3 = New System.Windows.Forms.ToolBar()
Me.btnSucheNotBerechtigt = New System.Windows.Forms.ToolBarButton()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.BtnHelp = New System.Windows.Forms.Button()
Me.GroupBox8.SuspendLayout()
CType(Me.C1TrueDBGrid2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.C1TrueDBGrid1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.GroupBox7.SuspendLayout()
Me.GroupBox6.SuspendLayout()
Me.TabControl1.SuspendLayout()
Me.TabPage1.SuspendLayout()
Me.TabPage2.SuspendLayout()
Me.TabPage3.SuspendLayout()
Me.SuspendLayout()
'
'GroupBox8
'
Me.GroupBox8.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label2, Me.C1TrueDBGrid2, Me.C1TrueDBGrid1, Me.Label1})
Me.GroupBox8.Location = New System.Drawing.Point(16, 176)
Me.GroupBox8.Name = "GroupBox8"
Me.GroupBox8.Size = New System.Drawing.Size(616, 240)
Me.GroupBox8.TabIndex = 32
Me.GroupBox8.TabStop = False
Me.GroupBox8.Text = "Stellvertretungen"
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(8, 136)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(104, 48)
Me.Label2.TabIndex = 35
Me.Label2.Text = "Stellvertreter von"
'
'C1TrueDBGrid2
'
Me.C1TrueDBGrid2.AllowFilter = True
Me.C1TrueDBGrid2.AllowRowSizing = C1.Win.C1TrueDBGrid.RowSizingEnum.AllRows
Me.C1TrueDBGrid2.AllowSort = True
Me.C1TrueDBGrid2.AlternatingRows = True
Me.C1TrueDBGrid2.CaptionHeight = 17
Me.C1TrueDBGrid2.CollapseColor = System.Drawing.Color.Black
Me.C1TrueDBGrid2.DataChanged = False
Me.C1TrueDBGrid2.DeadAreaBackColor = System.Drawing.Color.Empty
Me.C1TrueDBGrid2.ExpandColor = System.Drawing.Color.Black
Me.C1TrueDBGrid2.GroupByCaption = "Drag a column header here to group by that column"
Me.C1TrueDBGrid2.Images.Add(CType(resources.GetObject("resource.Images"), System.Drawing.Bitmap))
Me.C1TrueDBGrid2.Location = New System.Drawing.Point(112, 128)
Me.C1TrueDBGrid2.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder
Me.C1TrueDBGrid2.Name = "C1TrueDBGrid2"
Me.C1TrueDBGrid2.PreviewInfo.Location = New System.Drawing.Point(0, 0)
Me.C1TrueDBGrid2.PreviewInfo.Size = New System.Drawing.Size(0, 0)
Me.C1TrueDBGrid2.PreviewInfo.ZoomFactor = 75
Me.C1TrueDBGrid2.PrintInfo.ShowOptionsDialog = False
Me.C1TrueDBGrid2.RecordSelectorWidth = 16
GridLines1.Color = System.Drawing.Color.DarkGray
GridLines1.Style = C1.Win.C1TrueDBGrid.LineStyleEnum.Single
Me.C1TrueDBGrid2.RowDivider = GridLines1
Me.C1TrueDBGrid2.RowHeight = 15
Me.C1TrueDBGrid2.RowSubDividerColor = System.Drawing.Color.DarkGray
Me.C1TrueDBGrid2.ScrollTips = False
Me.C1TrueDBGrid2.Size = New System.Drawing.Size(496, 104)
Me.C1TrueDBGrid2.TabIndex = 4
Me.C1TrueDBGrid2.Text = "C1TrueDBGrid2"
Me.C1TrueDBGrid2.PropBag = "<?xml version=""1.0""?><Blob><Styles type=""C1.Win.C1TrueDBGrid.Design.ContextWrappe" & _
"r""><Data>Group{BackColor:ControlDark;Border:None,,0, 0, 0, 0;AlignVert:Center;}E" & _
"ditor{}Style2{}Style5{}Style4{}Style7{}Style6{}EvenRow{BackColor:White;}Selected" & _
"{ForeColor:HighlightText;BackColor:Highlight;}Style3{}Inactive{ForeColor:Inactiv" & _
"eCaptionText;BackColor:InactiveCaption;}FilterBar{}Footer{}Caption{AlignHorz:Cen" & _
"ter;}Normal{}HighlightRow{ForeColor:HighlightText;BackColor:Highlight;}Style9{}O" & _
"ddRow{BackColor:224, 224, 224;}RecordSelector{AlignImage:Center;}Heading{Wrap:Tr" & _
"ue;AlignVert:Center;Border:Raised,,1, 1, 1, 1;ForeColor:ControlText;BackColor:Co" & _
"ntrol;}Style8{}Style10{AlignHorz:Near;}Style11{}Style12{}Style13{}Style1{}</Data" & _
"></Styles><Splits><C1.Win.C1TrueDBGrid.MergeView Name="""" AlternatingRowStyle=""Tr" & _
"ue"" CaptionHeight=""17"" ColumnCaptionHeight=""17"" ColumnFooterHeight=""17"" MarqueeS" & _
"tyle=""DottedCellBorder"" RecordSelectorWidth=""16"" DefRecSelWidth=""16"" VerticalScr" & _
"ollGroup=""1"" HorizontalScrollGroup=""1""><ClientRect>0, 0, 492, 100</ClientRect><B" & _
"orderSide>0</BorderSide><CaptionStyle parent=""Style2"" me=""Style10"" /><EditorStyl" & _
"e parent=""Editor"" me=""Style5"" /><EvenRowStyle parent=""EvenRow"" me=""Style8"" /><Fi" & _
"lterBarStyle parent=""FilterBar"" me=""Style13"" /><FooterStyle parent=""Footer"" me=""" & _
"Style3"" /><GroupStyle parent=""Group"" me=""Style12"" /><HeadingStyle parent=""Headin" & _
"g"" me=""Style2"" /><HighLightRowStyle parent=""HighlightRow"" me=""Style7"" /><Inactiv" & _
"eStyle parent=""Inactive"" me=""Style4"" /><OddRowStyle parent=""OddRow"" me=""Style9"" " & _
"/><RecordSelectorStyle parent=""RecordSelector"" me=""Style11"" /><SelectedStyle par" & _
"ent=""Selected"" me=""Style6"" /><Style parent=""Normal"" me=""Style1"" /></C1.Win.C1Tru" & _
"eDBGrid.MergeView></Splits><NamedStyles><Style parent="""" me=""Normal"" /><Style pa" & _
"rent=""Normal"" me=""Heading"" /><Style parent=""Heading"" me=""Footer"" /><Style parent" & _
"=""Heading"" me=""Caption"" /><Style parent=""Heading"" me=""Inactive"" /><Style parent=" & _
"""Normal"" me=""Selected"" /><Style parent=""Normal"" me=""Editor"" /><Style parent=""Nor" & _
"mal"" me=""HighlightRow"" /><Style parent=""Normal"" me=""EvenRow"" /><Style parent=""No" & _
"rmal"" me=""OddRow"" /><Style parent=""Heading"" me=""RecordSelector"" /><Style parent=" & _
"""Normal"" me=""FilterBar"" /><Style parent=""Caption"" me=""Group"" /></NamedStyles><ve" & _
"rtSplits>1</vertSplits><horzSplits>1</horzSplits><Layout>None</Layout><DefaultRe" & _
"cSelWidth>16</DefaultRecSelWidth><ClientArea>0, 0, 492, 100</ClientArea></Blob>"
'
'C1TrueDBGrid1
'
Me.C1TrueDBGrid1.AllowFilter = True
Me.C1TrueDBGrid1.AllowRowSizing = C1.Win.C1TrueDBGrid.RowSizingEnum.AllRows
Me.C1TrueDBGrid1.AllowSort = True
Me.C1TrueDBGrid1.AlternatingRows = True
Me.C1TrueDBGrid1.CaptionHeight = 17
Me.C1TrueDBGrid1.CollapseColor = System.Drawing.Color.Black
Me.C1TrueDBGrid1.ContextMenu = Me.ContextMenu1
Me.C1TrueDBGrid1.DataChanged = False
Me.C1TrueDBGrid1.DeadAreaBackColor = System.Drawing.Color.Empty
Me.C1TrueDBGrid1.ExpandColor = System.Drawing.Color.Black
Me.C1TrueDBGrid1.GroupByCaption = "Drag a column header here to group by that column"
Me.C1TrueDBGrid1.Images.Add(CType(resources.GetObject("resource.Images1"), System.Drawing.Bitmap))
Me.C1TrueDBGrid1.Location = New System.Drawing.Point(112, 24)
Me.C1TrueDBGrid1.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder
Me.C1TrueDBGrid1.Name = "C1TrueDBGrid1"
Me.C1TrueDBGrid1.PreviewInfo.Location = New System.Drawing.Point(0, 0)
Me.C1TrueDBGrid1.PreviewInfo.Size = New System.Drawing.Size(0, 0)
Me.C1TrueDBGrid1.PreviewInfo.ZoomFactor = 75
Me.C1TrueDBGrid1.PrintInfo.ShowOptionsDialog = False
Me.C1TrueDBGrid1.RecordSelectorWidth = 16
GridLines2.Color = System.Drawing.Color.DarkGray
GridLines2.Style = C1.Win.C1TrueDBGrid.LineStyleEnum.Single
Me.C1TrueDBGrid1.RowDivider = GridLines2
Me.C1TrueDBGrid1.RowHeight = 15
Me.C1TrueDBGrid1.RowSubDividerColor = System.Drawing.Color.DarkGray
Me.C1TrueDBGrid1.ScrollTips = False
Me.C1TrueDBGrid1.Size = New System.Drawing.Size(496, 96)
Me.C1TrueDBGrid1.TabIndex = 3
Me.C1TrueDBGrid1.Text = "C1TrueDBGrid1"
Me.C1TrueDBGrid1.PropBag = "<?xml version=""1.0""?><Blob><Styles type=""C1.Win.C1TrueDBGrid.Design.ContextWrappe" & _
"r""><Data>Group{AlignVert:Center;Border:None,,0, 0, 0, 0;BackColor:ControlDark;}E" & _
"ditor{}Style2{}Style5{}Style4{}Style7{}Style6{}EvenRow{BackColor:White;}Selected" & _
"{ForeColor:HighlightText;BackColor:Highlight;}Style3{}Inactive{ForeColor:Inactiv" & _
"eCaptionText;BackColor:InactiveCaption;}FilterBar{}Footer{}Caption{AlignHorz:Cen" & _
"ter;}Normal{}HighlightRow{ForeColor:HighlightText;BackColor:Highlight;}Style1{}O" & _
"ddRow{BackColor:224, 224, 224;}RecordSelector{AlignImage:Center;}Heading{Wrap:Tr" & _
"ue;BackColor:Control;Border:Raised,,1, 1, 1, 1;ForeColor:ControlText;AlignVert:C" & _
"enter;}Style8{}Style10{AlignHorz:Near;}Style11{}Style12{}Style13{}Style9{}</Data" & _
"></Styles><Splits><C1.Win.C1TrueDBGrid.MergeView Name="""" AlternatingRowStyle=""Tr" & _
"ue"" CaptionHeight=""17"" ColumnCaptionHeight=""17"" ColumnFooterHeight=""17"" MarqueeS" & _
"tyle=""DottedCellBorder"" RecordSelectorWidth=""16"" DefRecSelWidth=""16"" VerticalScr" & _
"ollGroup=""1"" HorizontalScrollGroup=""1""><ClientRect>0, 0, 492, 92</ClientRect><Bo" & _
"rderSide>0</BorderSide><CaptionStyle parent=""Style2"" me=""Style10"" /><EditorStyle" & _
" parent=""Editor"" me=""Style5"" /><EvenRowStyle parent=""EvenRow"" me=""Style8"" /><Fil" & _
"terBarStyle parent=""FilterBar"" me=""Style13"" /><FooterStyle parent=""Footer"" me=""S" & _
"tyle3"" /><GroupStyle parent=""Group"" me=""Style12"" /><HeadingStyle parent=""Heading" & _
""" me=""Style2"" /><HighLightRowStyle parent=""HighlightRow"" me=""Style7"" /><Inactive" & _
"Style parent=""Inactive"" me=""Style4"" /><OddRowStyle parent=""OddRow"" me=""Style9"" /" & _
"><RecordSelectorStyle parent=""RecordSelector"" me=""Style11"" /><SelectedStyle pare" & _
"nt=""Selected"" me=""Style6"" /><Style parent=""Normal"" me=""Style1"" /></C1.Win.C1True" & _
"DBGrid.MergeView></Splits><NamedStyles><Style parent="""" me=""Normal"" /><Style par" & _
"ent=""Normal"" me=""Heading"" /><Style parent=""Heading"" me=""Footer"" /><Style parent=" & _
"""Heading"" me=""Caption"" /><Style parent=""Heading"" me=""Inactive"" /><Style parent=""" & _
"Normal"" me=""Selected"" /><Style parent=""Normal"" me=""Editor"" /><Style parent=""Norm" & _
"al"" me=""HighlightRow"" /><Style parent=""Normal"" me=""EvenRow"" /><Style parent=""Nor" & _
"mal"" me=""OddRow"" /><Style parent=""Heading"" me=""RecordSelector"" /><Style parent=""" & _
"Normal"" me=""FilterBar"" /><Style parent=""Caption"" me=""Group"" /></NamedStyles><ver" & _
"tSplits>1</vertSplits><horzSplits>1</horzSplits><Layout>None</Layout><DefaultRec" & _
"SelWidth>16</DefaultRecSelWidth><ClientArea>0, 0, 492, 92</ClientArea></Blob>"
'
'ContextMenu1
'
Me.ContextMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem2})
'
'MenuItem1
'
Me.MenuItem1.Index = 0
Me.MenuItem1.Text = "&Hinzufügen"
'
'MenuItem2
'
Me.MenuItem2.Index = 1
Me.MenuItem2.Text = "&Löschen"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(8, 24)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(104, 48)
Me.Label1.TabIndex = 34
Me.Label1.Text = "Gesetzte Stellvertretungen"
'
'GroupBox7
'
Me.GroupBox7.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label4, Me.txtRang, Me.Label35, Me.txtFunktion, Me.Label34, Me.txtTelefax, Me.Label33, Me.txtTelefon})
Me.GroupBox7.Location = New System.Drawing.Point(376, 16)
Me.GroupBox7.Name = "GroupBox7"
Me.GroupBox7.Size = New System.Drawing.Size(256, 152)
Me.GroupBox7.TabIndex = 31
Me.GroupBox7.TabStop = False
Me.GroupBox7.Text = "Persönliche Daten"
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(16, 120)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(48, 16)
Me.Label4.TabIndex = 12
Me.Label4.Text = "Rang"
'
'txtRang
'
Me.txtRang.Location = New System.Drawing.Point(72, 120)
Me.txtRang.Name = "txtRang"
Me.txtRang.Size = New System.Drawing.Size(168, 20)
Me.txtRang.TabIndex = 9
Me.txtRang.Text = "TextBox4"
'
'Label35
'
Me.Label35.Location = New System.Drawing.Point(16, 88)
Me.Label35.Name = "Label35"
Me.Label35.Size = New System.Drawing.Size(48, 16)
Me.Label35.TabIndex = 10
Me.Label35.Text = "Funktion"
'
'txtFunktion
'
Me.txtFunktion.Location = New System.Drawing.Point(72, 88)
Me.txtFunktion.Name = "txtFunktion"
Me.txtFunktion.Size = New System.Drawing.Size(168, 20)
Me.txtFunktion.TabIndex = 8
Me.txtFunktion.Text = "TextBox4"
'
'Label34
'
Me.Label34.Location = New System.Drawing.Point(16, 56)
Me.Label34.Name = "Label34"
Me.Label34.Size = New System.Drawing.Size(48, 16)
Me.Label34.TabIndex = 8
Me.Label34.Text = "Telefax"
'
'txtTelefax
'
Me.txtTelefax.Location = New System.Drawing.Point(72, 56)
Me.txtTelefax.Name = "txtTelefax"
Me.txtTelefax.Size = New System.Drawing.Size(168, 20)
Me.txtTelefax.TabIndex = 7
Me.txtTelefax.Text = "TextBox3"
'
'Label33
'
Me.Label33.Location = New System.Drawing.Point(16, 24)
Me.Label33.Name = "Label33"
Me.Label33.Size = New System.Drawing.Size(48, 16)
Me.Label33.TabIndex = 6
Me.Label33.Text = "Telefon"
'
'txtTelefon
'
Me.txtTelefon.Location = New System.Drawing.Point(72, 24)
Me.txtTelefon.Name = "txtTelefon"
Me.txtTelefon.Size = New System.Drawing.Size(168, 20)
Me.txtTelefon.TabIndex = 6
Me.txtTelefon.Text = "TextBox2"
'
'GroupBox6
'
Me.GroupBox6.Controls.AddRange(New System.Windows.Forms.Control() {Me.cedoka_mail, Me.cmaileingang, Me.cEdokaMessage, Me.cMailDirekt, Me.Label32, Me.txtMailadresse, Me.cmailempfang})
Me.GroupBox6.Location = New System.Drawing.Point(16, 16)
Me.GroupBox6.Name = "GroupBox6"
Me.GroupBox6.Size = New System.Drawing.Size(352, 152)
Me.GroupBox6.TabIndex = 30
Me.GroupBox6.TabStop = False
Me.GroupBox6.Text = "Maileinstellungen"
'
'cedoka_mail
'
Me.cedoka_mail.Location = New System.Drawing.Point(16, 72)
Me.cedoka_mail.Name = "cedoka_mail"
Me.cedoka_mail.Size = New System.Drawing.Size(216, 24)
Me.cedoka_mail.TabIndex = 6
Me.cedoka_mail.Text = "Meldungen via EDOKA empfangen"
'
'cmaileingang
'
Me.cmaileingang.Location = New System.Drawing.Point(16, 128)
Me.cmaileingang.Name = "cmaileingang"
Me.cmaileingang.Size = New System.Drawing.Size(248, 16)
Me.cmaileingang.TabIndex = 5
Me.cmaileingang.Text = "Meldung bei Dokumenteingang empfangen"
'
'cEdokaMessage
'
Me.cEdokaMessage.Location = New System.Drawing.Point(16, 96)
Me.cEdokaMessage.Name = "cEdokaMessage"
Me.cEdokaMessage.Size = New System.Drawing.Size(328, 32)
Me.cEdokaMessage.TabIndex = 5
Me.cEdokaMessage.Text = "Informationsmeldung bei Dokumentzuweisung empfangen"
'
'cMailDirekt
'
Me.cMailDirekt.Location = New System.Drawing.Point(16, 128)
Me.cMailDirekt.Name = "cMailDirekt"
Me.cMailDirekt.Size = New System.Drawing.Size(208, 16)
Me.cMailDirekt.TabIndex = 4
Me.cMailDirekt.Text = "Direkt versenden"
Me.cMailDirekt.Visible = False
'
'Label32
'
Me.Label32.Location = New System.Drawing.Point(32, 48)
Me.Label32.Name = "Label32"
Me.Label32.Size = New System.Drawing.Size(48, 16)
Me.Label32.TabIndex = 2
Me.Label32.Text = "Adresse"
'
'txtMailadresse
'
Me.txtMailadresse.Location = New System.Drawing.Point(80, 48)
Me.txtMailadresse.Name = "txtMailadresse"
Me.txtMailadresse.ReadOnly = True
Me.txtMailadresse.Size = New System.Drawing.Size(168, 20)
Me.txtMailadresse.TabIndex = 1
Me.txtMailadresse.Text = "TextBox1"
'
'cmailempfang
'
Me.cmailempfang.Location = New System.Drawing.Point(16, 24)
Me.cmailempfang.Name = "cmailempfang"
Me.cmailempfang.Size = New System.Drawing.Size(216, 24)
Me.cmailempfang.TabIndex = 0
Me.cmailempfang.Text = "Meldungen via E-Mail empfangen"
'
'ToolBar1
'
Me.ToolBar1.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.ToolBarButton1, Me.ToolBarButton2})
Me.ToolBar1.DropDownArrows = True
Me.ToolBar1.ImageList = Me.ImageList1
Me.ToolBar1.Name = "ToolBar1"
Me.ToolBar1.ShowToolTips = True
Me.ToolBar1.Size = New System.Drawing.Size(672, 25)
Me.ToolBar1.TabIndex = 33
'
'ToolBarButton1
'
Me.ToolBarButton1.ImageIndex = 0
Me.ToolBarButton1.ToolTipText = "Schliessen"
'
'ToolBarButton2
'
Me.ToolBarButton2.ImageIndex = 1
Me.ToolBarButton2.ToolTipText = "Einstellungen sichern"
'
'ImageList1
'
Me.ImageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit
Me.ImageList1.ImageSize = New System.Drawing.Size(16, 16)
Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
'
'TabControl1
'
Me.TabControl1.Controls.AddRange(New System.Windows.Forms.Control() {Me.TabPage1, Me.TabPage2, Me.TabPage3})
Me.TabControl1.ImageList = Me.ImageList3
Me.TabControl1.Location = New System.Drawing.Point(8, 32)
Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 0
Me.TabControl1.Size = New System.Drawing.Size(656, 464)
Me.TabControl1.TabIndex = 34
'
'TabPage1
'
Me.TabPage1.Controls.AddRange(New System.Windows.Forms.Control() {Me.GroupBox6, Me.GroupBox7, Me.GroupBox8})
Me.TabPage1.Location = New System.Drawing.Point(4, 23)
Me.TabPage1.Name = "TabPage1"
Me.TabPage1.Size = New System.Drawing.Size(648, 437)
Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = "Mitarbeitereinstellungen"
'
'TabPage2
'
Me.TabPage2.Controls.AddRange(New System.Windows.Forms.Control() {Me.txtSearch, Me.ToolBar2, Me.TreeView1})
Me.TabPage2.Location = New System.Drawing.Point(4, 23)
Me.TabPage2.Name = "TabPage2"
Me.TabPage2.Size = New System.Drawing.Size(648, 437)
Me.TabPage2.TabIndex = 1
Me.TabPage2.Text = "Leseberechtigte Dokumente"
'
'txtSearch
'
Me.txtSearch.Location = New System.Drawing.Point(24, 5)
Me.txtSearch.Name = "txtSearch"
Me.txtSearch.Size = New System.Drawing.Size(130, 20)
Me.txtSearch.TabIndex = 36
Me.txtSearch.Text = ""
'
'ToolBar2
'
Me.ToolBar2.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.btnSearch})
Me.ToolBar2.DropDownArrows = True
Me.ToolBar2.ImageList = Me.ImageList1
Me.ToolBar2.Name = "ToolBar2"
Me.ToolBar2.ShowToolTips = True
Me.ToolBar2.Size = New System.Drawing.Size(648, 39)
Me.ToolBar2.TabIndex = 1
'
'btnSearch
'
Me.btnSearch.ImageIndex = 2
Me.btnSearch.ToolTipText = "Suchen"
'
'TreeView1
'
Me.TreeView1.Dock = System.Windows.Forms.DockStyle.Bottom
Me.TreeView1.FullRowSelect = True
Me.TreeView1.HideSelection = False
Me.TreeView1.ImageList = Me.ImageList3
Me.TreeView1.Location = New System.Drawing.Point(0, 29)
Me.TreeView1.Name = "TreeView1"
Me.TreeView1.Size = New System.Drawing.Size(648, 408)
Me.TreeView1.TabIndex = 0
Me.ToolTip1.SetToolTip(Me.TreeView1, "1")
'
'ImageList3
'
Me.ImageList3.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit
Me.ImageList3.ImageSize = New System.Drawing.Size(16, 16)
Me.ImageList3.ImageStream = CType(resources.GetObject("ImageList3.ImageStream"), System.Windows.Forms.ImageListStreamer)
Me.ImageList3.TransparentColor = System.Drawing.Color.Transparent
'
'TabPage3
'
Me.TabPage3.Controls.AddRange(New System.Windows.Forms.Control() {Me.TV2, Me.txtSearchNotBerechtigt, Me.ToolBar3})
Me.TabPage3.Location = New System.Drawing.Point(4, 23)
Me.TabPage3.Name = "TabPage3"
Me.TabPage3.Size = New System.Drawing.Size(648, 437)
Me.TabPage3.TabIndex = 2
Me.TabPage3.Text = "Nicht leseberechtigte Dokumente"
'
'TV2
'
Me.TV2.Dock = System.Windows.Forms.DockStyle.Bottom
Me.TV2.FullRowSelect = True
Me.TV2.HideSelection = False
Me.TV2.ImageList = Me.ImageList3
Me.TV2.Location = New System.Drawing.Point(0, 29)
Me.TV2.Name = "TV2"
Me.TV2.Size = New System.Drawing.Size(648, 408)
Me.TV2.TabIndex = 2
'
'txtSearchNotBerechtigt
'
Me.txtSearchNotBerechtigt.Location = New System.Drawing.Point(24, 5)
Me.txtSearchNotBerechtigt.Name = "txtSearchNotBerechtigt"
Me.txtSearchNotBerechtigt.Size = New System.Drawing.Size(130, 20)
Me.txtSearchNotBerechtigt.TabIndex = 1
Me.txtSearchNotBerechtigt.Text = ""
'
'ToolBar3
'
Me.ToolBar3.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.btnSucheNotBerechtigt})
Me.ToolBar3.DropDownArrows = True
Me.ToolBar3.ImageList = Me.ImageList1
Me.ToolBar3.Name = "ToolBar3"
Me.ToolBar3.ShowToolTips = True
Me.ToolBar3.Size = New System.Drawing.Size(648, 39)
Me.ToolBar3.TabIndex = 0
'
'btnSucheNotBerechtigt
'
Me.btnSucheNotBerechtigt.ImageIndex = 2
Me.btnSucheNotBerechtigt.ToolTipText = "Suchen"
'
'BtnHelp
'
Me.BtnHelp.Image = CType(resources.GetObject("BtnHelp.Image"), System.Drawing.Bitmap)
Me.BtnHelp.Location = New System.Drawing.Point(643, 3)
Me.BtnHelp.Name = "BtnHelp"
Me.BtnHelp.Size = New System.Drawing.Size(24, 23)
Me.BtnHelp.TabIndex = 68
'
'frmMitarbeitereinstellungen
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(672, 502)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.BtnHelp, Me.TabControl1, Me.ToolBar1})
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "frmMitarbeitereinstellungen"
Me.Text = "Mitarbeitereinstellungen"
Me.GroupBox8.ResumeLayout(False)
CType(Me.C1TrueDBGrid2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.C1TrueDBGrid1, System.ComponentModel.ISupportInitialize).EndInit()
Me.GroupBox7.ResumeLayout(False)
Me.GroupBox6.ResumeLayout(False)
Me.TabControl1.ResumeLayout(False)
Me.TabPage1.ResumeLayout(False)
Me.TabPage2.ResumeLayout(False)
Me.TabPage3.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
#Region " Deklarationen "
Dim von As DateTime
Dim bis As DateTime
Dim Stellvertretungtyp As Integer = 0
Dim vertreter As Integer
Dim changed As Boolean = False
'Berechtigte Dokumente
Dim m_bLoadTreeDokBerecht As Boolean
Dim dtToReturn As DataTable = New DataTable()
Dim DokBerecht As New DataTable()
'Nicht Berechtigte Dokumente
Dim m_bLoadTreeDokNichtBerecht As Boolean
Dim DokNotBerecht As New DataTable()
Dim DokNotBerechtOrg As New DataTable()
Public Enum EnumDatumformat
Standart = 0 '= dd.mm.yyyy hh:nn:ss
Mittel = 1 '=dd.mm.yyyy
End Enum
#End Region
#Region " Funktionen "
Private Function Generic_Select(ByVal typ As Integer) As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
Select Case typ
Case 1
scmCmdToExecute.CommandText = "dbo.SP_stellvertretungen_select"
Case 2
scmCmdToExecute.CommandText = "dbo.SP_stellvertretungen_insert"
Case 3
scmCmdToExecute.CommandText = "dbo.SP_stellvertretungen_delete"
Case 4
scmCmdToExecute.CommandText = "dbo.SP_stellvertretungen1_select"
Case Else
End Select
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable()
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
scmCmdToExecute.Connection = conn.scoDBConnection
Try
Select Case typ
Case 1
scmCmdToExecute.Parameters.Add(New SqlParameter("@mitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.MitarbeiterNr))
Case 2
Dim dbkey As New edokadb.clsMyKey_Tabelle()
Dim key As Long
dbkey.cpMainConnectionProvider = conn
key = dbkey.get_dbkey("StellvertretungDomain")
scmCmdToExecute.Parameters.Add(New SqlParameter("@nreintrag", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, key))
scmCmdToExecute.Parameters.Add(New SqlParameter("@mitarbeiter", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.MitarbeiterNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@vertreter", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, vertreter))
scmCmdToExecute.Parameters.Add(New SqlParameter("@von", SqlDbType.DateTime, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, von))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bis", SqlDbType.DateTime, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, bis))
scmCmdToExecute.Parameters.Add(New SqlParameter("@typ", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.Stellvertretungtyp))
Case 3
scmCmdToExecute.Parameters.Add(New SqlParameter("@nreintrag", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.C1TrueDBGrid1.Columns("nreintrag").Text))
Case 4
scmCmdToExecute.Parameters.Add(New SqlParameter("@mitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.MitarbeiterNr))
Case Else
End Select
If typ = 1 Then
End If
sdaAdapter.Fill(dtToReturn)
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("Dokumenterstellung::Generic_Select::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
Finally
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
Private Sub GrdDatumformat(ByRef grd As C1.Win.C1TrueDBGrid.C1TrueDBGrid, ByVal SpaltenDatafield As String, ByVal DatumFormat As EnumDatumformat)
Dim iCount As Integer
Try
For iCount = 0 To grd.Columns.Count - 1
If SpaltenDatafield = CStr(grd.Columns(iCount).DataField) Then
Select Case DatumFormat
Case EnumDatumformat.Mittel '=dd.mm.yyyy
grd.Columns(iCount).NumberFormat = "dd.MM.yyyy"
Case EnumDatumformat.Standart '= dd.mm.yyyy hh:nn:ss
grd.Columns(iCount).NumberFormat = "dd.MM.yyyy HH:mm:nn"
End Select
Exit For
End If
Next
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Public Function save_data() As Boolean
'Rel 3.3
'06.12.2004 / BUD
'Prüfen ob eine Versandart gewählt wurde.
If cmailempfang.Checked = False And cedoka_mail.Checked = False Then
MsgBox(MyMsg.Get_Meldungstext(265), MsgBoxStyle.Exclamation)
save_data = False
Else
save_data = True
End If
Dim ma As New edokadb.clsMitarbeiter()
conn.OpenConnection()
ma.cpMainConnectionProvider = conn
ma.iMitarbeiternr = New SqlInt32(CType(Globals.MitarbeiterNr, Int32))
ma.SelectOne()
ma.bEdokaMesasge = New SqlBoolean(CType(Me.cEdokaMessage.Checked, Boolean))
ma.bMailempfang = New SqlBoolean(CType(Me.cmailempfang.Checked, Boolean))
ma.bMailDirektVersenden = New SqlBoolean(CType(Me.cMailDirekt.Checked, Boolean))
ma.sEmail = New SqlString(CType(Me.txtMailadresse.Text, String))
ma.sTelefon = New SqlString(CType(Me.txtTelefon.Text, String))
ma.sFax = New SqlString(CType(Me.txtTelefax.Text, String))
ma.sFunktion = New SqlString(CType(Me.txtFunktion.Text, String))
ma.sRang = New SqlString(CType(Me.txtRang.Text, String))
ma.bMailDokumentrueckgang = New SqlBoolean(CType(Me.cmaileingang.Checked, Boolean))
ma.bEdoka_mail = New SqlBoolean(CType(Me.cedoka_mail.Checked, Boolean))
ma.Update()
conn.CloseConnection(True)
ma.Dispose()
changed = False
End Function
Private Sub check_changes(ByVal sender As Object, ByVal e As System.EventArgs) Handles cMailDirekt.CheckedChanged, cedoka_mail.CheckStateChanged, _
cEdokaMessage.CheckedChanged, cmaileingang.CheckedChanged, txtFunktion.TextChanged, txtMailadresse.TextChanged, _
txtRang.TextChanged, txtTelefax.TextChanged, txtTelefon.TextChanged, cedoka_mail.CheckStateChanged, _
cEdokaMessage.CheckStateChanged, cmaileingang.CheckStateChanged, cmailempfang.CheckStateChanged
changed = True
End Sub
Private Sub fill_c1()
Try
Me.C1TrueDBGrid1.DataSource = Generic_Select(1)
DivFnkt.SpaltenTitel_Aktualisieren(Me.C1TrueDBGrid1, Generic_Select(1), "stellvertretungen")
GrdDatumformat(C1TrueDBGrid1, "datumvon", EnumDatumformat.Mittel)
GrdDatumformat(C1TrueDBGrid1, "datumbis", EnumDatumformat.Mittel)
Me.C1TrueDBGrid2.DataSource = Generic_Select(4)
DivFnkt.SpaltenTitel_Aktualisieren(Me.C1TrueDBGrid2, Generic_Select(4), "stellvertretungen")
GrdDatumformat(C1TrueDBGrid2, "datumvon", EnumDatumformat.Mittel)
GrdDatumformat(C1TrueDBGrid2, "datumbis", EnumDatumformat.Mittel)
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
#End Region
#Region " Tree View Generierung"
Private Sub GenerateTreeView(ByVal SearchText As String, ByVal Filter As Boolean, ByVal TreeNr As Integer)
Try
Me.Cursor = Cursors.WaitCursor
Select Case TreeNr
Case 1 'Berechtigte Dokumente
If m_bLoadTreeDokBerecht = False Then
TreeView1.BeginUpdate()
GenerateDokBerechtTable(Globals.MitarbeiterNr, Globals.MitarbeiterNr)
GenerateTree(TreeView1, Globals.MitarbeiterNr, SearchText, Filter, dtToReturn, DokBerecht, TreeNr)
TreeView1.ExpandAll()
TreeView1.EndUpdate()
m_bLoadTreeDokBerecht = True
If dtToReturn.Rows.Count <> 0 Then
TreeView1.SelectedNode = Me.TreeView1.Nodes(0)
TreeView1.Refresh()
TreeView1.SelectedNode.Checked = True
Else
TreeView1.Refresh()
End If
Else
TreeView1.BeginUpdate()
GenerateTree(TreeView1, Globals.MitarbeiterNr, SearchText, Filter, dtToReturn, DokBerecht, TreeNr)
TreeView1.ExpandAll()
TreeView1.EndUpdate()
If dtToReturn.Rows.Count <> 0 Then
TreeView1.SelectedNode = Me.TreeView1.Nodes(0)
TreeView1.Refresh()
TreeView1.SelectedNode.Checked = True
Else
TreeView1.Refresh()
End If
End If
Case 2 ' Nicht Berechtigte Dokumente
If m_bLoadTreeDokNichtBerecht = False Then
TV2.BeginUpdate()
GenerateDokNichtBerechtTable(Globals.MitarbeiterNr, Globals.MitarbeiterNr)
GenerateTree(TV2, Globals.MitarbeiterNr, SearchText, Filter, DokNotBerecht, DokNotBerechtOrg, TreeNr)
TV2.ExpandAll()
TV2.EndUpdate()
m_bLoadTreeDokNichtBerecht = True
If DokNotBerecht.Rows.Count <> 0 Then
TV2.SelectedNode = Me.TV2.Nodes(0)
TV2.Refresh()
TV2.SelectedNode.Checked = True
Else
TV2.Refresh()
End If
Else
TV2.BeginUpdate()
GenerateTree(TV2, Globals.MitarbeiterNr, SearchText, Filter, DokNotBerecht, DokNotBerechtOrg, TreeNr)
TV2.ExpandAll()
TV2.EndUpdate()
If DokNotBerecht.Rows.Count <> 0 Then
TV2.SelectedNode = Me.TV2.Nodes(0)
TV2.Refresh()
TV2.SelectedNode.Checked = True
Else
TV2.Refresh()
End If
End If
End Select
Me.Cursor = Cursors.Default
Catch
MsgBox(Err.Description)
End Try
End Sub
Private Sub GenerateTree(ByVal otv As TreeView, ByVal iUserID As Integer, ByVal searchString As String, ByVal filter As Boolean, ByRef DataTableSearch As DataTable, ByRef DataTableOriginal As DataTable, ByVal TreeNr As Integer)
'===============================================================================
'Description : Baut den Baum auf mit den Daten im DataTable
'Input : BenutzerID und das Treeview Objekt sowie 2 DataTables
'Criteria :
'Output :
'Date : bud 18.08.2004
'Modified : bud 26.08.2004
'===============================================================================
'
'===============================================================================
Dim i As Integer
Dim m_collDeletedNodes As Collection
Dim collNodeKeys As New Collection()
Dim tnNew As TreeNode
Dim tnParent As TreeNode
Dim lastid As Long
Dim pid As Long
Select Case TreeNr
Case 1
DataTableSearch = FilDokBerechtDataSet(iUserID)
Case 2
DataTableSearch = FilDokNichtBerechtDataSet(iUserID)
End Select
lastid = 1
m_collDeletedNodes = Nothing
m_collDeletedNodes = New Collection()
otv.Nodes.Clear()
'Wenn keine Daten angezeigt
If DataTableOriginal.Rows.Count = 0 Then
Select Case TreeNr
Case 1
DataTableOriginal = FilDokBerechtDataSet(iUserID)
Case 2
DataTableOriginal = FilDokNichtBerechtDataSet(iUserID)
End Select
End If
'Wenn ein Suchstring gesetzt wurde, dann den String suchen
If filter = True Then
If searchString = "" Then
DataTableSearch = DataTableOriginal
Else
Dim splitter
Dim sstring As String = ""
If InStr(searchString, " ", CompareMethod.Text) > 0 Then
splitter = Microsoft.VisualBasic.Split(searchString, " ")
Try
i = 0
While i < 100
If sstring.Length > 0 Then sstring = sstring + " AND "
sstring = sstring + "DokTypBez like '%" + splitter(i) + "%'"
i = i + 1
End While
Catch
sstring = Microsoft.VisualBasic.Left(sstring, sstring.Length - 5)
End Try
Else
sstring = "DokTypBez like '%" + searchString + "%'"
End If
Dim dview As New DataView(DataTableOriginal, sstring, "Parentid, sort", DataViewRowState.CurrentRows)
Dim tbltemp As New DataTable()
Dim tbltemp1 As New DataTable()
tbltemp = dview.Table.Clone
Dim drv As DataRowView
For Each drv In dview
tbltemp.ImportRow(drv.Row)
Try
read_to_root(drv, tbltemp, DataTableOriginal)
Catch ex As Exception
MsgBox(ex.Message)
End Try
Next
dview.Dispose()
tbltemp1 = dview.Table.Clone
Try
Dim dview2 As New DataView(tbltemp, "", "ParentID, Sort", DataViewRowState.CurrentRows)
Dim drv2 As DataRowView
For Each drv2 In dview2
tbltemp1.ImportRow(drv2.Row)
Next
DataTableSearch = tbltemp1
Catch ex As Exception
End Try
End If
End If
'Tree zusammenbauen
For i = 0 To DataTableSearch.Rows.Count - 1
If DataTableSearch.Rows(i).Item("ParentID") = 0 Then
tnNew = otv.Nodes.Add(DataTableSearch.Rows(i).Item("bezeichnung"))
With tnNew
.Tag() = DataTableSearch.Rows(i).Item("dokumentartnr")
.ImageIndex() = DataTableSearch.Rows(i).Item("ImageIndex")
.SelectedImageIndex() = DataTableSearch.Rows(i).Item("ImageIndexOpen")
End With
Try
collNodeKeys.Add(tnNew, CType(DataTableSearch.Rows(i).Item("dokumentartnr"), String))
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical)
End Try
Else
Try
If DataTableSearch.Rows(i).Item("DokTypBez") Is System.DBNull.Value Then
tnParent = CType(collNodeKeys.Item(CType(DataTableSearch.Rows(i).Item("ParentID"), String)), TreeNode)
tnNew = tnParent.Nodes.Add(CType(DataTableSearch.Rows(i).Item("bezeichnung"), String))
With tnNew
.Tag() = CType(DataTableSearch.Rows(i).Item("dokumentartnr"), String)
.ImageIndex() = DataTableSearch.Rows(i).Item("ImageIndex")
.SelectedImageIndex() = DataTableSearch.Rows(i).Item("ImageIndexOpen")
End With
collNodeKeys.Add(tnNew, CType(DataTableSearch.Rows(i).Item("dokumentartnr"), String))
Else
If lastid <> DataTableSearch.Rows(i).Item("dokumentartnr") Then
tnParent = CType(collNodeKeys.Item(CType(DataTableSearch.Rows(i).Item("ParentID"), String)), TreeNode)
tnNew = tnParent.Nodes.Add(CType(DataTableSearch.Rows(i).Item("bezeichnung"), String))
With tnNew
.Tag() = CType(DataTableSearch.Rows(i).Item("dokumentartnr"), String)
.ImageIndex() = DataTableSearch.Rows(i).Item("ImageIndex")
.SelectedImageIndex() = DataTableSearch.Rows(i).Item("ImageIndexOpen")
End With
collNodeKeys.Add(tnNew, CType(DataTableSearch.Rows(i).Item("dokumentartnr"), String))
lastid = DataTableSearch.Rows(i).Item("dokumentartnr")
pid = lastid
End If
tnParent = CType(collNodeKeys.Item(CType(pid, String)), TreeNode)
tnNew = tnParent.Nodes.Add(CType(DataTableSearch.Rows(i).Item("DokTypBez"), String))
With tnNew
.Tag() = CType(DataTableSearch.Rows(i).Item("dokumenttypnr"), String)
.ImageIndex() = DataTableSearch.Rows(i).Item("dokimage")
.SelectedImageIndex() = DataTableSearch.Rows(i).Item("dokimage")
End With
collNodeKeys.Add(tnNew, CType(DataTableSearch.Rows(i).Item("dokumenttypnr"), String))
End If
Catch ex As Exception
MsgBox("Dokart:" & DataTableSearch.Rows(i).Item("dokumentartnr") & " - " & DataTableSearch.Rows(i).Item("dokumenttypnr") & ex.Message, MsgBoxStyle.Critical)
End Try
End If
Next
End Sub
Function read_to_root(ByVal drv As DataRowView, ByVal dt As DataTable, ByRef DataTableOriginal As DataTable)
Dim parent As Integer
parent = drv.Item(5)
While parent <> 0
Dim dview As New DataView(DataTableOriginal, "dokumentartnr= " + Trim(Str(parent)), "Parentid, sort", DataViewRowState.CurrentRows)
Dim drv1 As DataRowView
For Each drv1 In dview
Dim dview1 As New DataView(dt, "dokumentartnr=" + Trim(drv1.Item(0)), "", DataViewRowState.CurrentRows)
Dim drv2 As DataRowView
Dim i As Integer
i = 0
For Each drv2 In dview1
i = i + 1
Next
dview1.Dispose()
If i = 0 Then dt.ImportRow(drv1.Row)
parent = drv1.Item(5)
dview.Dispose()
Next
End While
End Function
Private Sub TreeView1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TreeView1.MouseMove
Try
Static old_node As TreeNode
Dim node_here As TreeNode = TreeView1.GetNodeAt(e.X, e.Y)
If node_here Is old_node Then Exit Sub
old_node = node_here
ToolTip1.AutoPopDelay = 1000000
ToolTip1.InitialDelay = 1
ToolTip1.RemoveAll()
If old_node Is Nothing Then
ToolTip1.SetToolTip(TreeView1, "")
Else
If node_here.Nodes.Count = 0 Then
TreeView1.SelectedNode = TreeView1.GetNodeAt(e.X, e.Y)
ToolTip1.SetToolTip(TreeView1, GetTreeInfo(old_node.Tag))
End If
End If
Catch
MsgBox(Err.Description)
End Try
End Sub
Private Function GetTreeInfo(ByVal sText As String) As String
'===============================================================================
'Description : Daten in der DataTable suchen.
'Input : Suchtext
'Criteria : Resultat als Text
'Output : DataTable
'Date : bud 18.08.2004
'Modified :
'===============================================================================
'
'===============================================================================
Dim Pview As New DataView()
Dim iFind As Integer
Dim vals(0) As Object
Dim sTag As String
Dim sToolVert As String
Dim sToolMA As String
Dim sToolVip As String
Dim sText1 As String
Dim sText2 As String
Pview = New DataView(dtToReturn)
Pview.Sort = "dokumenttypnr"
vals(0) = sText
iFind = Pview.Find(vals)
'Debug.Write(Pview(iFind))
sText1 = "berechtigt"
sText2 = "nicht berechtigt"
If Pview.Item(iFind)("Vertraulich") = 1 Then
sToolVert = sText1
Else
sToolVert = sText2
End If
If Pview.Item(iFind)("Mitarbeiter") = 1 Then
sToolMA = sText1
Else
sToolMA = sText2
End If
If Pview.Item(iFind)("VIP") = 1 Then
sToolVip = sText1
Else
sToolVip = sText2
End If
sTag = vbCrLf + " Vertraulich = " + sToolVert + vbCrLf
sTag = sTag + " Mitarbeiter = " + sToolMA + " " + vbCrLf
sTag = sTag + " VIP = " + sToolVip + " " + vbCrLf
GetTreeInfo = sTag
End Function
#Region " Daten - Berechtigte Dokumente"
Private Sub GenerateDokBerechtTable(ByVal UserID As Integer, ByVal iMANR As Integer)
'===============================================================================
'Description : Führ die gepseicherte Prozedur aus, welche eine UserTabelle mit
' den Dokumenten für die er berechtigt ist generiert, aus.
'Input : BenutzerID
'Criteria :
'Output :
'Date : bud 16.08.2004
'Modified :
'===============================================================================
'
'===============================================================================
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.SP_GetBerechtigtDok0_select"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
scmCmdToExecute.Connection = conn.scoDBConnection
conn.OpenConnection()
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iMANR", SqlDbType.Int, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, iMANR))
scmCmdToExecute.Parameters.Add(New SqlParameter("@intuser", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, UserID))
scmCmdToExecute.ExecuteNonQuery()
Catch ex As Exception
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
Finally
scmCmdToExecute.Dispose()
conn.CloseConnection(True)
End Try
End Sub
Private Function FilDokBerechtDataSet(ByVal iUserID As Integer) As DataTable
'===============================================================================
'Description : Füllt eine DataTable mit den Dokumentinfos.
'Input : BenutzerID
'Criteria :
'Output : DataTable
'Date : bud 18.08.2004
'Modified :
'===============================================================================
'
'===============================================================================
FilDokBerechtDataSet = New DataTable()
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
scmCmdToExecute.CommandText = "dbo.SP_GetBerechtigtDok2_select"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
scmCmdToExecute.Connection = conn.scoDBConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@intuser", SqlDbType.Int, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, iUserID))
sdaAdapter.Fill(FilDokBerechtDataSet)
DokBerecht = FilDokBerechtDataSet
Catch ex As Exception
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
Finally
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
#End Region
#Region " Daten - Nicht Berechtigte Dokumente"
Private Sub GenerateDokNichtBerechtTable(ByVal UserID As Integer, ByVal iMANR As Integer)
'===============================================================================
'Description : Führ die gepseicherte Prozedur aus, welche eine UserTabelle mit
' den Dokumenten für die er berechtigt ist generiert, aus.
'Input : BenutzerID
'Criteria :
'Output :
'Date : bud 26.08.2004
'Modified :
'===============================================================================
'
'===============================================================================
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.SP_GetNichtBerechtigtDok0_select"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
scmCmdToExecute.Connection = conn.scoDBConnection
conn.OpenConnection()
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iMANR", SqlDbType.Int, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, iMANR))
scmCmdToExecute.Parameters.Add(New SqlParameter("@intuser", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, UserID))
scmCmdToExecute.ExecuteNonQuery()
Catch ex As Exception
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
Finally
scmCmdToExecute.Dispose()
conn.CloseConnection(True)
End Try
End Sub
Private Function FilDokNichtBerechtDataSet(ByVal iUserID As Integer) As DataTable
'===============================================================================
'Description : Füllt eine DataTable mit den Dokumentinfos.
'Input : BenutzerID
'Criteria :
'Output : DataTable
'Date : bud 26.08.2004
'Modified :
'===============================================================================
'
'===============================================================================
FilDokNichtBerechtDataSet = New DataTable()
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
scmCmdToExecute.CommandText = "dbo.SP_GetNichtBerechtigtDok2_select"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
scmCmdToExecute.Connection = conn.scoDBConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@intuser", SqlDbType.Int, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, iUserID))
sdaAdapter.Fill(FilDokNichtBerechtDataSet)
DokNotBerechtOrg = FilDokNichtBerechtDataSet
Catch ex As Exception
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
Finally
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
#End Region
#End Region
#Region " Extra Funktionen "
#End Region
#Region " Formular Funktionen "
Private Sub frmMitarbeitereinstellungen_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ma As New edokadb.clsMitarbeiter()
ma.cpMainConnectionProvider = conn
ma.iMitarbeiternr = New SqlInt32(CType(Globals.MitarbeiterNr, Int32))
ma.SelectOne()
Me.cEdokaMessage.Checked = ma.bEdokaMesasge.Value
Me.cedoka_mail.Checked = ma.bEdoka_mail.Value
Me.cmailempfang.Checked = ma.bMailempfang.Value
Try
Me.cMailDirekt.Checked = ma.bMailDirektVersenden.Value
Catch
Me.cMailDirekt.Checked = False
End Try
Me.txtMailadresse.Text = ma.sEmail.Value
Me.txtTelefax.Text = ma.sFax.Value
Me.txtTelefon.Text = ma.sTelefon.Value
Try
Me.txtFunktion.Text = ma.sFunktion.Value
Catch
Me.txtFunktion.Text = ""
End Try
Try
Me.txtRang.Text = ma.sRang.Value
Catch
Me.txtRang.Text = ""
End Try
Try
Me.cmaileingang.Checked = ma.bMailDokumentrueckgang.Value = True
Catch
Me.cmaileingang.Checked = True
End Try
ma.Dispose()
fill_c1()
changed = False
m_bLoadTreeDokBerecht = False
'BUD Ausblenden von Tab2 da dies evtl noch nicht fetig ist.
If 1 <> 1 Then
Dim m_tab As TabPage
Dim m_idx As Integer
m_tab = Me.TabControl1.TabPages(1)
Me.TabControl1.TabPages.RemoveAt(1)
m_idx = 1
End If
Me.BringToFront()
End Sub
Private Sub frmMitarbeitereinstellungen_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
'Rel 3.3
'06.12.2004 / BUD
'Prüfen ob eine Versandart gewählt wurde.
If changed Then
If MyMsg.Show_MessageYesNo(2) = MsgBoxResult.Yes Then
If save_data() = False Then
e.Cancel = True
Exit Sub
End If
End If
End If
If CheckIsBenachrichtigung() = False Then
MsgBox(MyMsg.Get_Meldungstext(265), MsgBoxStyle.Exclamation)
e.Cancel = True
Exit Sub
End If
End Sub
Private Function CheckIsBenachrichtigung() As Boolean
'Prüfen ob die Einstellungen auf der DB korrekt sind
Dim ma As New edokadb.clsMitarbeiter()
ma.cpMainConnectionProvider = conn
ma.iMitarbeiternr = New SqlInt32(CType(Globals.MitarbeiterNr, Int32))
ma.SelectOne()
If ma.bMailempfang.Value = False And ma.bEdoka_mail.Value = False Then
CheckIsBenachrichtigung = False
Else
CheckIsBenachrichtigung = True
End If
ma.Dispose()
End Function
#End Region
#Region " Kontrol Funktionen "
Private Sub TabControl1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TabControl1.MouseDown
Try
Me.BringToFront()
Me.txtSearch.Text = ""
Me.txtSearchNotBerechtigt.Text = ""
Select Case Me.TabControl1.SelectedIndex
Case 0
Exit Sub
Case 1
Me.txtSearch.Select()
GenerateTreeView("", False, 1)
Case 2
Me.txtSearchNotBerechtigt.Select()
GenerateTreeView("", False, 2)
End Select
Catch ex As Exception
Throw New Exception("Dokument_Information_Wert::Error occured." & ex.Message, ex)
End Try
End Sub
Private Sub C1TrueDBGrid1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles C1TrueDBGrid1.MouseDown
Me.C1TrueDBGrid1.Bookmark = Me.C1TrueDBGrid1.RowContaining(e.Y)
End Sub
#End Region
#Region " Menu Funktionen "
Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
Select Case ToolBar1.Buttons.IndexOf(e.Button)
Case 0
Me.Close()
Case 1
save_data()
End Select
End Sub
Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
Dim f As New frmStellvertreterAdd()
f.ShowDialog()
If f.DialogResult = DialogResult.OK Then
Me.von = f.DateTimePicker1.Value
Me.bis = f.DateTimePicker2.Value
Me.vertreter = f.vertreter
Me.stellvertretungtyp = f.Stellvertretungtyp
Generic_Select(2)
fill_c1()
End If
End Sub
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
If Me.C1TrueDBGrid1.Splits(0).Rows.Count = 0 Then Exit Sub
If MyMsg.Show_MessageYesNo(16) = MsgBoxResult.Yes Then
Generic_Select(3)
fill_c1()
End If
End Sub
Private Sub ToolBar2_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar2.ButtonClick
Select Case ToolBar2.Buttons.IndexOf(e.Button)
Case 0 'Suchen Start
'Tree Aufbauen und nach SuchText suchen
GenerateTreeView(Me.txtSearch.Text, True, 1)
End Select
End Sub
Private Sub txtSearch_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtSearch.KeyDown
If e.KeyCode = Keys.Return Then
'Tree Aufbauen und nach SuchText suchen
GenerateTreeView(Me.txtSearch.Text, True, 1)
End If
End Sub
Private Sub ToolBar3_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar3.ButtonClick
Select Case ToolBar2.Buttons.IndexOf(e.Button)
Case 0 'Suchen Start nicht berechtigte Dokumente
'Tree Aufbauen und nach SuchText suchen
GenerateTreeView(Me.txtSearchNotBerechtigt.Text, True, 2)
End Select
End Sub
Private Sub txtSearchNotBerechtigt_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtSearchNotBerechtigt.KeyDown
If e.KeyCode = Keys.Return Then
'Tree Aufbauen und nach SuchText suchen
GenerateTreeView(Me.txtSearchNotBerechtigt.Text, True, 2)
End If
End Sub
#End Region
Private Sub BtnHelp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnHelp.Click
Globals.HTMLHelp.ShowHelpToc("mitarbeitereinstellungen")
End Sub
End Class