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 Button16 As System.Windows.Forms.Button Friend WithEvents Button17 As System.Windows.Forms.Button Friend WithEvents ListView1 As System.Windows.Forms.ListView Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader Friend WithEvents ColumnHeader2 As System.Windows.Forms.ColumnHeader Friend WithEvents ColumnHeader3 As System.Windows.Forms.ColumnHeader 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 ImageList1 As System.Windows.Forms.ImageList Friend WithEvents cedoka_mail As System.Windows.Forms.CheckBox Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Dim ListViewItem1 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New System.Windows.Forms.ListViewItem.ListViewSubItem() {New System.Windows.Forms.ListViewItem.ListViewSubItem(Nothing, "Max Muster", System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))), New System.Windows.Forms.ListViewItem.ListViewSubItem(Nothing, "1.1.02"), New System.Windows.Forms.ListViewItem.ListViewSubItem(Nothing, "1.4.02")}, -1) Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmMitarbeitereinstellungen)) Me.GroupBox8 = New System.Windows.Forms.GroupBox() Me.Button16 = New System.Windows.Forms.Button() Me.Button17 = New System.Windows.Forms.Button() Me.ListView1 = New System.Windows.Forms.ListView() Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader() Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader() Me.ColumnHeader3 = New System.Windows.Forms.ColumnHeader() 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.GroupBox8.SuspendLayout() Me.GroupBox7.SuspendLayout() Me.GroupBox6.SuspendLayout() Me.SuspendLayout() ' 'GroupBox8 ' Me.GroupBox8.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button16, Me.Button17, Me.ListView1}) Me.GroupBox8.Location = New System.Drawing.Point(112, 208) Me.GroupBox8.Name = "GroupBox8" Me.GroupBox8.Size = New System.Drawing.Size(424, 240) Me.GroupBox8.TabIndex = 32 Me.GroupBox8.TabStop = False Me.GroupBox8.Text = "Stellvertretungen" ' 'Button16 ' Me.Button16.Location = New System.Drawing.Point(216, 208) Me.Button16.Name = "Button16" Me.Button16.Size = New System.Drawing.Size(96, 24) Me.Button16.TabIndex = 2 Me.Button16.Text = "Löschen" ' 'Button17 ' Me.Button17.Location = New System.Drawing.Point(112, 208) Me.Button17.Name = "Button17" Me.Button17.Size = New System.Drawing.Size(96, 24) Me.Button17.TabIndex = 1 Me.Button17.Text = "Hinzufügen" ' 'ListView1 ' Me.ListView1.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1, Me.ColumnHeader2, Me.ColumnHeader3}) ListViewItem1.Tag = "Max Muster" Me.ListView1.Items.AddRange(New System.Windows.Forms.ListViewItem() {ListViewItem1}) Me.ListView1.Location = New System.Drawing.Point(8, 16) Me.ListView1.Name = "ListView1" Me.ListView1.Size = New System.Drawing.Size(408, 184) Me.ListView1.TabIndex = 0 Me.ListView1.View = System.Windows.Forms.View.Details ' 'ColumnHeader1 ' Me.ColumnHeader1.Text = "Stellvertreter" ' 'ColumnHeader2 ' Me.ColumnHeader2.Text = "Von" ' 'ColumnHeader3 ' Me.ColumnHeader3.Text = "Bis" ' '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, 40) 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, 40) 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.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(648, 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 ' 'frmMitarbeitereinstellungen ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.ClientSize = New System.Drawing.Size(648, 461) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.ToolBar1, Me.GroupBox8, Me.GroupBox7, Me.GroupBox6}) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Name = "frmMitarbeitereinstellungen" Me.Text = "Mitarbeitereinstellungen" Me.GroupBox8.ResumeLayout(False) Me.GroupBox7.ResumeLayout(False) Me.GroupBox6.ResumeLayout(False) Me.ResumeLayout(False) End Sub #End Region 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 Public Sub save_data() 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() End Sub 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 Me.cMailDirekt.Checked = ma.bMailDirektVersenden.Value Me.txtMailadresse.Text = ma.sEmail.Value Me.txtTelefax.Text = ma.sFax.Value Me.txtTelefon.Text = ma.sTelefon.Value Me.txtFunktion.Text = ma.sFunktion.Value Me.txtRang.Text = ma.sRang.Value Me.cmaileingang.Checked = ma.bMailDokumentrueckgang.Value = True ma.Dispose() End Sub End Class