From de00def84d07fdc1990030e9fad73a3847a170b7 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 21 Jun 2018 10:26:12 +0200 Subject: [PATCH 1/4] jj: remove porxy controls in connections and check for input before selecting db --- .../DDUserManager/DDUserManager.vbproj | 1 + .../My Project/Resources.Designer.vb | 10 ++ .../DDUserManager/My Project/Resources.resx | 41 +++---- .../Resources/database_connect.png | Bin 0 -> 763 bytes .../frmConfigDatabase.Designer.vb | 102 +++--------------- .../DDUserManager/frmConfigDatabase.resx | 17 --- .../DDUserManager/frmConfigDatabase.vb | 24 ++--- .../DDUserManager/frmMain.Designer.vb | 17 ++- DDUserManager/DDUserManager/frmMain.vb | 4 + 9 files changed, 78 insertions(+), 138 deletions(-) create mode 100644 DDUserManager/DDUserManager/Resources/database_connect.png diff --git a/DDUserManager/DDUserManager/DDUserManager.vbproj b/DDUserManager/DDUserManager/DDUserManager.vbproj index ae0d26a..84fc584 100644 --- a/DDUserManager/DDUserManager/DDUserManager.vbproj +++ b/DDUserManager/DDUserManager/DDUserManager.vbproj @@ -247,6 +247,7 @@ + diff --git a/DDUserManager/DDUserManager/My Project/Resources.Designer.vb b/DDUserManager/DDUserManager/My Project/Resources.Designer.vb index 6a57924..79033de 100644 --- a/DDUserManager/DDUserManager/My Project/Resources.Designer.vb +++ b/DDUserManager/DDUserManager/My Project/Resources.Designer.vb @@ -110,6 +110,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property database_connect() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("database_connect", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. ''' diff --git a/DDUserManager/DDUserManager/My Project/Resources.resx b/DDUserManager/DDUserManager/My Project/Resources.resx index 1b1e87d..cbdd2b7 100644 --- a/DDUserManager/DDUserManager/My Project/Resources.resx +++ b/DDUserManager/DDUserManager/My Project/Resources.resx @@ -121,40 +121,43 @@ ..\Resources\arrow_right.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\plugin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\book.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\key.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\group_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\user_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\user.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\user_add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\arrow_left_red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\key.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\group.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\disk.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\group_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\arrow_left_red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\user_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\plugin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\cog.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\group.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\book.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\user.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\arrow_refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\database_connect.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/DDUserManager/DDUserManager/Resources/database_connect.png b/DDUserManager/DDUserManager/Resources/database_connect.png new file mode 100644 index 0000000000000000000000000000000000000000..3a111977cd9dcd631ce1de85d5ce82b9ed477c27 GIT binary patch literal 763 zcmV-F$IpKw}ImgOJ; z7f9UkeLqXqGzqfxt7QF3)<-1d`T2Q|JMMspFO%GpXf%2y9*-j&4kHu_f!^zMI#5*= zjYb2lR%?Ug7ES=x*VkWXGMU+li3xBVcdBjIby2NWQLEKf0>=*tFc*u({#ko6nFJ|g z?nDoqo*3BN+=QlS$mjD227?eqk(Hq9I@;|vn$0FssT2kLZQ|-id%$+QRo569<9qv% zBnjnm8M$1JiK%TxQD9jX1VLcAK49g|FTrt~4?&Sj3z0ZJ?)<=HM1kjdtcg@W0W=PK zM#c1;^}sOgal>-cAqn6)AN*Jv@9IG$QdhCIwua^9WsnCLfUZ<{=zsybx}CIan}V?0 z(jf9aq{ui*&$pQ6>FH?{i$&Pv&LM~b`VLgXi0VYFk?86scD^Y%BLayFDZKrnV|#lW zi9~`4jsobO0XnL2(RM88rUON{plT*+du<%376#5=!^`(R3b$_eU!?$QpE}}O=L(Xl zTXHla@d^=2JO_a%GalgJ`5qcOEzISoaA`8ae&guqD6-iso5p&*t_ugM(H#y2M2}E4 z!@_QpjO%X=M%RSdwJ?@atIWY8Xx%dePiIz*;vQsHA#%EP6lrG0Mp{)++EaGtq_b;C96!L6rv t?W2=fDwT$aV2XrKn)Z2danU+@{s+9Sw^uGDfpq`?002ovPDHLkV1o6HVQ&Bc literal 0 HcmV?d00001 diff --git a/DDUserManager/DDUserManager/frmConfigDatabase.Designer.vb b/DDUserManager/DDUserManager/frmConfigDatabase.Designer.vb index 45b462c..d6b89a8 100644 --- a/DDUserManager/DDUserManager/frmConfigDatabase.Designer.vb +++ b/DDUserManager/DDUserManager/frmConfigDatabase.Designer.vb @@ -22,11 +22,6 @@ Partial Class frmConfigDatabase 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. _ Private Sub InitializeComponent() - Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConfigDatabase)) - Me.lblLinkedServer = New System.Windows.Forms.Label() - Me.txtLinkedServer = New System.Windows.Forms.TextBox() - Me.rbConn_Proxy = New System.Windows.Forms.RadioButton() - Me.rbConnDefault = New System.Windows.Forms.RadioButton() Me.chkbxUserAut = New System.Windows.Forms.CheckBox() Me.Label5 = New System.Windows.Forms.Label() Me.cmbDatenbank = New System.Windows.Forms.ComboBox() @@ -39,57 +34,13 @@ Partial Class frmConfigDatabase Me.txtUser = New System.Windows.Forms.TextBox() Me.txtPasswort = New System.Windows.Forms.TextBox() Me.BtnConnect = New System.Windows.Forms.Button() - Me.btndeleteProxy = New System.Windows.Forms.Button() Me.SuspendLayout() ' - 'lblLinkedServer - ' - Me.lblLinkedServer.AutoSize = True - Me.lblLinkedServer.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.lblLinkedServer.Location = New System.Drawing.Point(9, 180) - Me.lblLinkedServer.Name = "lblLinkedServer" - Me.lblLinkedServer.Size = New System.Drawing.Size(116, 13) - Me.lblLinkedServer.TabIndex = 69 - Me.lblLinkedServer.Text = "Name/IP Proxy-Server:" - Me.lblLinkedServer.Visible = False - ' - 'txtLinkedServer - ' - Me.txtLinkedServer.Location = New System.Drawing.Point(12, 196) - Me.txtLinkedServer.Name = "txtLinkedServer" - Me.txtLinkedServer.Size = New System.Drawing.Size(288, 20) - Me.txtLinkedServer.TabIndex = 68 - Me.txtLinkedServer.Visible = False - ' - 'rbConn_Proxy - ' - Me.rbConn_Proxy.AutoSize = True - Me.rbConn_Proxy.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rbConn_Proxy.Location = New System.Drawing.Point(144, 18) - Me.rbConn_Proxy.Name = "rbConn_Proxy" - Me.rbConn_Proxy.Size = New System.Drawing.Size(108, 17) - Me.rbConn_Proxy.TabIndex = 66 - Me.rbConn_Proxy.Text = "Proxy Connection" - Me.rbConn_Proxy.UseVisualStyleBackColor = True - ' - 'rbConnDefault - ' - Me.rbConnDefault.AutoSize = True - Me.rbConnDefault.Checked = True - Me.rbConnDefault.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rbConnDefault.Location = New System.Drawing.Point(12, 18) - Me.rbConnDefault.Name = "rbConnDefault" - Me.rbConnDefault.Size = New System.Drawing.Size(116, 17) - Me.rbConnDefault.TabIndex = 65 - Me.rbConnDefault.TabStop = True - Me.rbConnDefault.Text = "Default Connection" - Me.rbConnDefault.UseVisualStyleBackColor = True - ' 'chkbxUserAut ' Me.chkbxUserAut.AutoSize = True Me.chkbxUserAut.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.chkbxUserAut.Location = New System.Drawing.Point(514, 60) + Me.chkbxUserAut.Location = New System.Drawing.Point(514, 33) Me.chkbxUserAut.Name = "chkbxUserAut" Me.chkbxUserAut.Size = New System.Drawing.Size(151, 17) Me.chkbxUserAut.TabIndex = 64 @@ -100,7 +51,7 @@ Partial Class frmConfigDatabase ' Me.Label5.AutoSize = True Me.Label5.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.Label5.Location = New System.Drawing.Point(9, 139) + Me.Label5.Location = New System.Drawing.Point(9, 112) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(135, 13) Me.Label5.TabIndex = 63 @@ -109,7 +60,7 @@ Partial Class frmConfigDatabase 'cmbDatenbank ' Me.cmbDatenbank.FormattingEnabled = True - Me.cmbDatenbank.Location = New System.Drawing.Point(12, 106) + Me.cmbDatenbank.Location = New System.Drawing.Point(12, 79) Me.cmbDatenbank.Name = "cmbDatenbank" Me.cmbDatenbank.Size = New System.Drawing.Size(288, 21) Me.cmbDatenbank.TabIndex = 56 @@ -118,7 +69,7 @@ Partial Class frmConfigDatabase ' Me.Label4.AutoSize = True Me.Label4.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.Label4.Location = New System.Drawing.Point(9, 86) + Me.Label4.Location = New System.Drawing.Point(9, 59) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(63, 13) Me.Label4.TabIndex = 61 @@ -128,7 +79,7 @@ Partial Class frmConfigDatabase ' Me.Label1.AutoSize = True Me.Label1.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.Label1.Location = New System.Drawing.Point(9, 38) + Me.Label1.Location = New System.Drawing.Point(9, 11) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(72, 13) Me.Label1.TabIndex = 58 @@ -138,7 +89,7 @@ Partial Class frmConfigDatabase ' Me.Label2.AutoSize = True Me.Label2.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.Label2.Location = New System.Drawing.Point(303, 38) + Me.Label2.Location = New System.Drawing.Point(303, 11) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(78, 13) Me.Label2.TabIndex = 59 @@ -148,7 +99,7 @@ Partial Class frmConfigDatabase ' Me.Label3.AutoSize = True Me.Label3.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.Label3.Location = New System.Drawing.Point(427, 38) + Me.Label3.Location = New System.Drawing.Point(427, 11) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(53, 13) Me.Label3.TabIndex = 60 @@ -159,7 +110,7 @@ Partial Class frmConfigDatabase Me.txtActualConnection.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.txtActualConnection.BackColor = System.Drawing.Color.WhiteSmoke - Me.txtActualConnection.Location = New System.Drawing.Point(12, 155) + Me.txtActualConnection.Location = New System.Drawing.Point(12, 128) Me.txtActualConnection.Name = "txtActualConnection" Me.txtActualConnection.ReadOnly = True Me.txtActualConnection.Size = New System.Drawing.Size(457, 20) @@ -168,7 +119,7 @@ Partial Class frmConfigDatabase 'txtServer ' Me.txtServer.ForeColor = System.Drawing.SystemColors.WindowText - Me.txtServer.Location = New System.Drawing.Point(12, 58) + Me.txtServer.Location = New System.Drawing.Point(12, 31) Me.txtServer.Name = "txtServer" Me.txtServer.Size = New System.Drawing.Size(288, 20) Me.txtServer.TabIndex = 53 @@ -176,7 +127,7 @@ Partial Class frmConfigDatabase 'txtUser ' Me.txtUser.ForeColor = System.Drawing.SystemColors.WindowText - Me.txtUser.Location = New System.Drawing.Point(306, 58) + Me.txtUser.Location = New System.Drawing.Point(306, 31) Me.txtUser.Name = "txtUser" Me.txtUser.Size = New System.Drawing.Size(118, 20) Me.txtUser.TabIndex = 54 @@ -184,7 +135,7 @@ Partial Class frmConfigDatabase 'txtPasswort ' Me.txtPasswort.ForeColor = System.Drawing.SystemColors.WindowText - Me.txtPasswort.Location = New System.Drawing.Point(430, 58) + Me.txtPasswort.Location = New System.Drawing.Point(430, 31) Me.txtPasswort.Name = "txtPasswort" Me.txtPasswort.Size = New System.Drawing.Size(64, 20) Me.txtPasswort.TabIndex = 55 @@ -194,7 +145,7 @@ Partial Class frmConfigDatabase ' Me.BtnConnect.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft Me.BtnConnect.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.BtnConnect.Location = New System.Drawing.Point(306, 102) + Me.BtnConnect.Location = New System.Drawing.Point(306, 75) Me.BtnConnect.Name = "BtnConnect" Me.BtnConnect.Size = New System.Drawing.Size(253, 25) Me.BtnConnect.TabIndex = 57 @@ -202,30 +153,11 @@ Partial Class frmConfigDatabase Me.BtnConnect.TextAlign = System.Drawing.ContentAlignment.MiddleRight Me.BtnConnect.UseVisualStyleBackColor = True ' - 'btndeleteProxy - ' - Me.btndeleteProxy.Image = CType(resources.GetObject("btndeleteProxy.Image"), System.Drawing.Image) - Me.btndeleteProxy.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.btndeleteProxy.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.btndeleteProxy.Location = New System.Drawing.Point(562, 153) - Me.btndeleteProxy.Name = "btndeleteProxy" - Me.btndeleteProxy.Size = New System.Drawing.Size(97, 23) - Me.btndeleteProxy.TabIndex = 67 - Me.btndeleteProxy.Text = "Lösche Proxy" - Me.btndeleteProxy.TextAlign = System.Drawing.ContentAlignment.MiddleRight - Me.btndeleteProxy.UseVisualStyleBackColor = True - Me.btndeleteProxy.Visible = False - ' 'frmConfigDatabase ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(710, 235) - Me.Controls.Add(Me.lblLinkedServer) - Me.Controls.Add(Me.txtLinkedServer) - Me.Controls.Add(Me.btndeleteProxy) - Me.Controls.Add(Me.rbConn_Proxy) - Me.Controls.Add(Me.rbConnDefault) + Me.ClientSize = New System.Drawing.Size(710, 205) Me.Controls.Add(Me.chkbxUserAut) Me.Controls.Add(Me.Label5) Me.Controls.Add(Me.cmbDatenbank) @@ -239,17 +171,11 @@ Partial Class frmConfigDatabase Me.Controls.Add(Me.txtPasswort) Me.Controls.Add(Me.BtnConnect) Me.Name = "frmConfigDatabase" - Me.Text = "ConfigDatabase" + Me.Text = "Datenbank Verbindung" Me.ResumeLayout(False) Me.PerformLayout() End Sub - - Friend WithEvents lblLinkedServer As Label - Friend WithEvents txtLinkedServer As TextBox - Friend WithEvents btndeleteProxy As Button - Friend WithEvents rbConn_Proxy As RadioButton - Friend WithEvents rbConnDefault As RadioButton Friend WithEvents chkbxUserAut As CheckBox Friend WithEvents Label5 As Label Friend WithEvents cmbDatenbank As ComboBox diff --git a/DDUserManager/DDUserManager/frmConfigDatabase.resx b/DDUserManager/DDUserManager/frmConfigDatabase.resx index 4cc4549..1af7de1 100644 --- a/DDUserManager/DDUserManager/frmConfigDatabase.resx +++ b/DDUserManager/DDUserManager/frmConfigDatabase.resx @@ -117,21 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6 - JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsTAAALEwEAmpwYAAACLUlE - QVQ4T52TvY/ScBjHuVIRKHA9JAgnL+VoC7TX0kLLS6EvFBTa0uj5J7gYF+PsfpOTMrg4ORgHY+LCYJwc - TYyJiYuDLu7GxHgxd/Hnr5fA8TZcrsmnzfN9nufTNPnVBwDw2ZYljGzr3ciyTNu2EC87L75eb+DvD67f - hU9g9vt/HNs5cMaOf9Owohro7YNbe8PhjfuzzBOgkDuabk6bbRXoxuBkNLIeus6yhKyIwY5umo5tHxmG - +Wwu8G5QkIa0jN5gqnR1oOkGuOk6b1x3jHl9uaWGhpb1UtXNY1luPmJ4KbIkmAElAcgD3egfa5oJxq77 - oq3ovKJoE7XbBbwoTWhG2F7cWRJ4dFR1S9fNCvykT41mB9TqjSOxXvtJM9zrYokLrc4vFYtUBcngq9Lf - tqICvlr7RhQr8U1za4FHXZIIurT/mePFf1AEJLkFGJb7uml2LRBrcp4us1+g4KRcYV8lkmkplyenglgH - VIm9tzq/VJRZLpUlih9yBQrAt79Pp3bjkVgM244nsPwe/VQQ6r8pRsgu7pwtC61grkA/T10r/NrnxB8s - V2VmvQiOB0MhLMZVxY/pDPEkU6DnZ2Qu2M0STjJFAIpmAUmXD0NY9PQMzEBRPwJzkiSp71F8J1/ipNMj - f9rE8XggkUgexq9cBXmi+DYYjtCRGL72T+D4jr/RaE+waFgu8c0zgUcmT9UuBS4/9m0hmh9Fo7N8FXih - CIKE5/Vi8yJsDM8P8P0HLGwR4Wl3ICYAAAAASUVORK5CYII= - - \ No newline at end of file diff --git a/DDUserManager/DDUserManager/frmConfigDatabase.vb b/DDUserManager/DDUserManager/frmConfigDatabase.vb index 308f6ed..68caf65 100644 --- a/DDUserManager/DDUserManager/frmConfigDatabase.vb +++ b/DDUserManager/DDUserManager/frmConfigDatabase.vb @@ -82,7 +82,6 @@ Public Class frmConfigDatabase con = "Server=" & Me.txtServer.Text & ";Database=" & Me.cmbDatenbank.Text & ";User Id=" & Me.txtUser.Text & ";Password=" & Me.txtPasswort.Text & ";Application Name=DD ADDI-Client" End If - Dim connection As New SqlClient.SqlConnection(con) 'csb.ConnectionString) 'während Verbindungsaufbau Sanduhr-Mauszeiger Cursor = Cursors.WaitCursor @@ -91,15 +90,12 @@ Public Class frmConfigDatabase 'DialogResult = Windows.Forms.DialogResult.OK Dim result As MsgBoxResult Dim msg = "Die Verbindung wurde erfolgreich aufgebaut!" & vbNewLine & "Möchten Sie diese Verbindung nun in der Anwendung speichern?" - result = MessageBox.Show(msg, "Database-Connection", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + result = MessageBox.Show(msg, "Datenbank-Verbindung", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If result = MsgBoxResult.Yes Then ConnectionChanged = True 'Set the construction string - If rbConnDefault.Checked Then - MyConnectionString = con - 'csb.ConnectionString - clsDatabase.Init(MyConnectionString) - End If + MyConnectionString = con + clsDatabase.Init(MyConnectionString) My.Settings.Save() If chkbxUserAut.Checked = False Then @@ -108,11 +104,9 @@ Public Class frmConfigDatabase Dim pw As String = cipherText con = "Server=" & Me.txtServer.Text & ";Database=" & Me.cmbDatenbank.Text & ";User Id=" & Me.txtUser.Text & ";Password=" & pw & ";" End If - If rbConnDefault.Checked Then - SaveMySettingsValue("MyConnectionString", con, "ConfigMain") - Else - SaveMySettingsValue("MyProxyConnectionString", con, "ConfigMain") - End If + + SaveMySettingsValue("MyConnectionString", con, "ConfigMain") + Dim csb As New SqlClient.SqlConnectionStringBuilder csb.ConnectionString = MyConnectionString Dim constr = connection.ConnectionString @@ -128,6 +122,10 @@ Public Class frmConfigDatabase End Sub Private Sub cmbDatenbank_MouseClick(sender As Object, e As MouseEventArgs) Handles cmbDatenbank.MouseClick - Load_Databases() + If txtServer.Text = String.Empty Or txtUser.Text = String.Empty Or txtPasswort.Text = String.Empty Then + MsgBox("Bitte füllen Sie die Felder 'Server-Name', 'Benutzername' und 'Passwort' zuerst aus!", MsgBoxStyle.Exclamation, "Datenbank-Verbindung") + Else + Load_Databases() + End If End Sub End Class \ No newline at end of file diff --git a/DDUserManager/DDUserManager/frmMain.Designer.vb b/DDUserManager/DDUserManager/frmMain.Designer.vb index 6925b39..57b1a17 100644 --- a/DDUserManager/DDUserManager/frmMain.Designer.vb +++ b/DDUserManager/DDUserManager/frmMain.Designer.vb @@ -319,6 +319,7 @@ Partial Class frmMain Me.PRODUCT_VERSIONTextBox = New System.Windows.Forms.TextBox() Me.tabPageRights = New DevExpress.XtraTab.XtraTabPage() Me.tabPageSettings = New DevExpress.XtraTab.XtraTabPage() + Me.btnConfigConnections = New System.Windows.Forms.Button() Me.TBDD_GROUPS_USERBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.TBDD_USERTableAdapter = New DDUserManager.UserDataSetTableAdapters.TBDD_USERTableAdapter() Me.TableAdapterManager = New DDUserManager.UserDataSetTableAdapters.TableAdapterManager() @@ -492,6 +493,7 @@ Partial Class frmMain CType(Me.GridView5, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TBDD_MODULESBindingNavigator, System.ComponentModel.ISupportInitialize).BeginInit() Me.TBDD_MODULESBindingNavigator.SuspendLayout() + Me.tabPageSettings.SuspendLayout() CType(Me.TBDD_GROUPS_USERBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TBDD_CLIENT_USERBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TBDD_USER_MODULESBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() @@ -3414,12 +3416,23 @@ Partial Class frmMain ' 'tabPageSettings ' + Me.tabPageSettings.Controls.Add(Me.btnConfigConnections) Me.tabPageSettings.Image = Global.DDUserManager.My.Resources.Resources.cog Me.tabPageSettings.Name = "tabPageSettings" - Me.tabPageSettings.PageEnabled = False Me.tabPageSettings.Size = New System.Drawing.Size(1193, 784) Me.tabPageSettings.Text = "Einstellungen" ' + 'btnConfigConnections + ' + Me.btnConfigConnections.Image = Global.DDUserManager.My.Resources.Resources.database_connect + Me.btnConfigConnections.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.btnConfigConnections.Location = New System.Drawing.Point(11, 17) + Me.btnConfigConnections.Name = "btnConfigConnections" + Me.btnConfigConnections.Size = New System.Drawing.Size(167, 47) + Me.btnConfigConnections.TabIndex = 0 + Me.btnConfigConnections.Text = "Datenbankverbindung konfigurieren" + Me.btnConfigConnections.UseVisualStyleBackColor = True + ' 'TBDD_GROUPS_USERBindingSource ' Me.TBDD_GROUPS_USERBindingSource.DataMember = "FK_TBDD_GROUPS_USER_USER_ID" @@ -3670,6 +3683,7 @@ Partial Class frmMain CType(Me.TBDD_MODULESBindingNavigator, System.ComponentModel.ISupportInitialize).EndInit() Me.TBDD_MODULESBindingNavigator.ResumeLayout(False) Me.TBDD_MODULESBindingNavigator.PerformLayout() + Me.tabPageSettings.ResumeLayout(False) CType(Me.TBDD_GROUPS_USERBindingSource, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TBDD_CLIENT_USERBindingSource, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TBDD_USER_MODULESBindingSource, System.ComponentModel.ISupportInitialize).EndInit() @@ -3961,4 +3975,5 @@ Partial Class frmMain Friend WithEvents TableAdapterManager1 As DS_ChangeSTableAdapters.TableAdapterManager Friend WithEvents TBDD_GROUPS_USERTableAdapter As UserDataSetTableAdapters.TBDD_GROUPS_USERTableAdapter Friend WithEvents LANGUAGEComboBox As ComboBox + Friend WithEvents btnConfigConnections As Button End Class diff --git a/DDUserManager/DDUserManager/frmMain.vb b/DDUserManager/DDUserManager/frmMain.vb index 0d8accb..6770c8b 100644 --- a/DDUserManager/DDUserManager/frmMain.vb +++ b/DDUserManager/DDUserManager/frmMain.vb @@ -1004,4 +1004,8 @@ Public Class frmMain 'UserDataSet.TBDD_GROUPS.ADDED_WHOColumn.DefaultValue = Environment.UserName DS_ChangeS.TBDD_GROUPS.ADDED_WHOColumn.DefaultValue = Environment.UserName End Sub + + Private Sub btnConfigConnections_Click(sender As Object, e As EventArgs) Handles btnConfigConnections.Click + frmConfigDatabase.ShowDialog() + End Sub End Class From d807d4ed291e7b08e44e7f3eb18a22de1a996d23 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 29 Jun 2018 16:43:15 +0200 Subject: [PATCH 2/4] jj: version 1.0.0.1 --- .../DDUserManager/ClassActiveDirectory.vb | 76 +- DDUserManager/DDUserManager/ClassNLog.vb | 27 + .../DDUserManager/DDUserManager.vbproj | 6 + DDUserManager/DDUserManager/ModuleRuntime.vb | 35 +- .../DDUserManager/My Project/AssemblyInfo.vb | 2 +- .../My Project/Resources.Designer.vb | 20 + .../DDUserManager/My Project/Resources.resx | 10 +- .../DDUserManager/Resources/folder.png | Bin 0 -> 537 bytes .../DDUserManager/Resources/help.png | Bin 0 -> 786 bytes .../DDUserManager/UserDataSet.Designer.vb | 182 +--- DDUserManager/DDUserManager/UserDataSet.xsc | 12 +- DDUserManager/DDUserManager/UserDataSet.xsd | 80 +- DDUserManager/DDUserManager/UserDataSet.xss | 2 +- .../DDUserManager/frmADImport_Groups.vb | 9 +- .../DDUserManager/frmADImport_Users.vb | 16 +- .../DDUserManager/frmMain.Designer.vb | 909 +++++++++++------- DDUserManager/DDUserManager/frmMain.resx | 30 + DDUserManager/DDUserManager/frmMain.vb | 70 +- 18 files changed, 808 insertions(+), 678 deletions(-) create mode 100644 DDUserManager/DDUserManager/ClassNLog.vb create mode 100644 DDUserManager/DDUserManager/Resources/folder.png create mode 100644 DDUserManager/DDUserManager/Resources/help.png diff --git a/DDUserManager/DDUserManager/ClassActiveDirectory.vb b/DDUserManager/DDUserManager/ClassActiveDirectory.vb index 5ef89da..f314f76 100644 --- a/DDUserManager/DDUserManager/ClassActiveDirectory.vb +++ b/DDUserManager/DDUserManager/ClassActiveDirectory.vb @@ -2,6 +2,8 @@ Imports System.DirectoryServices.AccountManagement Public Class ClassActiveDirectory + Private Shared logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger() + Private Shared excludedGroupNames As New List(Of String) From { "Abgelehnte", "DHCP", @@ -47,8 +49,24 @@ Public Class ClassActiveDirectory "Zulässige" } + Public Shared Function ConnectionTest(path As String) + Try + Dim de As New DirectoryEntry(path) + de.Username = Nothing + de.Password = Nothing + de.AuthenticationType = AuthenticationTypes.Secure + de.RefreshCache() + + Return True + Catch ex As Exception + MsgBox($"Verbindungstest fehlgeschlagen. Bitte überprüfen sie den ActiveDirectory Pfad. Der zurückgelieferte Fehler lautet:{vbCrLf}{ex.Message}", MsgBoxStyle.Exclamation) + logger.Error(ex, $"Connection Test failed for path '{path}'") + Return False + End Try + End Function + Private Shared Function GetDirectoryEntry() - Dim de As New DirectoryEntry($"LDAP://{Environment.UserDomainName}") + Dim de As New DirectoryEntry(ActiveDirectoryRootNode) de.Username = Nothing de.Password = Nothing de.AuthenticationType = AuthenticationTypes.Secure @@ -56,7 +74,7 @@ Public Class ClassActiveDirectory Return de End Function - Public Shared Function GetDirectorySearch() As DirectorySearcher + Public Shared Function GetDirectorySearch(rootNode As DirectoryEntry) As DirectorySearcher Dim dirEntry As DirectoryEntry = GetDirectoryEntry() Dim dirSearcher As DirectorySearcher = New DirectorySearcher(dirEntry) Return dirSearcher @@ -64,9 +82,7 @@ Public Class ClassActiveDirectory Public Shared Function GetActiveDirectoryGroups() As List(Of String) Dim groups As New List(Of String) - Dim de As DirectoryEntry = GetDirectoryEntry() - Dim deSearch As DirectorySearcher = New DirectorySearcher() - deSearch.SearchRoot = de + Dim deSearch = GetDirectorySearch(GetDirectoryEntry()) deSearch.Filter = "(&(objectClass=group) (samAccountName=" & "*" & "))" Dim results As SearchResultCollection = deSearch.FindAll() @@ -92,8 +108,9 @@ Public Class ClassActiveDirectory Return groups End Function - Public Shared Function GetActiveDirectoryUsersForGroup(groupName As String) As List(Of UserPrincipal) - Dim users As New List(Of UserPrincipal) + Public Shared Function GetActiveDirectoryUsersForGroup(groupName As String) As List(Of ADUser) + 'Dim users As New List(Of UserPrincipal) + Dim users As New List(Of ADUser) Using context As New PrincipalContext(ContextType.Domain) Using group As GroupPrincipal = GroupPrincipal.FindByIdentity(context, IdentityType.Name, groupName) @@ -101,7 +118,15 @@ Public Class ClassActiveDirectory For Each member As UserPrincipal In members If TypeOf member Is UserPrincipal Then - users.Add(member) + 'users.Add(member) + + users.Add(New ADUser() With { + .Username = member.SamAccountName, + .Surname = member.Surname, + .GivenName = member.GivenName, + .MiddleName = member.MiddleName, + .Email = member.EmailAddress + }) End If Next @@ -112,31 +137,12 @@ Public Class ClassActiveDirectory Return users End Function - Private Shared Function GetGroupNameFromTokenGroupEntry(rootEntry As DirectoryEntry, tokenGroup As Byte()) - Dim sID As New Security.Principal.SecurityIdentifier(tokenGroup, 0) - Dim sIDSearch = New DirectorySearcher(rootEntry, $"(objectSid={sID.Value})", New String() {"name"}) - Dim sIDResult = sIDSearch.FindOne() - - If IsNothing(sIDResult) Then - Return Nothing - Else - Return sIDResult.Properties("name").Item(0).ToString() - End If - End Function - - Private Shared Function FindUser(rootEntry As DirectoryEntry, samAccountName As String) As DirectoryEntry - Dim userSearch = New DirectorySearcher( - rootEntry, - $"(samAccountName={samAccountName})", - New String() {"displayName"} - ) - - Dim result = userSearch.FindOne() - - If IsNothing(result) Then - Return Nothing - Else - Return result.GetDirectoryEntry() - End If - End Function + Public Class ADUser + Public Username As String + Public Surname As String + Public GivenName As String + Public MiddleName As String + Public Email As String + Public Path As String + End Class End Class diff --git a/DDUserManager/DDUserManager/ClassNLog.vb b/DDUserManager/DDUserManager/ClassNLog.vb new file mode 100644 index 0000000..6e7d425 --- /dev/null +++ b/DDUserManager/DDUserManager/ClassNLog.vb @@ -0,0 +1,27 @@ +Public Class ClassNLog + Public Shared Function GetLogPathFor(moduleName As String) + Dim localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + Return IO.Path.Combine(localAppData, "Digital Data", "UserManager", "Log") + End Function + + Public Shared Function GetLoggerConfigFor(moduleName As String) + Dim loggerConfig = New NLog.Config.LoggingConfiguration() + Dim logFileName = Environment.UserName & "-${date:format=yyyy-MM-dd}.log" + Dim logPath As String = IO.Path.Combine(GetLogPathFor(moduleName), logFileName) + + Dim logFileInfo As New NLog.Targets.FileTarget("logFileInfo") With { + .FileName = logPath, + .Layout = "${longdate}|${level:uppercase=true}|${logger}|${message}" + } + + Dim logFileError As New NLog.Targets.FileTarget("logFileError") With { + .FileName = logPath, + .Layout = "${longdate}|${level:uppercase=true}|${logger}|${message}|${exception:format=message}" & vbCrLf & "${exception:format=toString}" + } + + loggerConfig.AddRule(NLog.LogLevel.Debug, NLog.LogLevel.Warn, logFileInfo) + loggerConfig.AddRule(NLog.LogLevel.Error, NLog.LogLevel.Fatal, logFileError) + + Return loggerConfig + End Function +End Class diff --git a/DDUserManager/DDUserManager/DDUserManager.vbproj b/DDUserManager/DDUserManager/DDUserManager.vbproj index 84fc584..05a21a4 100644 --- a/DDUserManager/DDUserManager/DDUserManager.vbproj +++ b/DDUserManager/DDUserManager/DDUserManager.vbproj @@ -62,6 +62,9 @@ + + P:\Visual Studio Projekte\Bibliotheken\NLog\NLog.dll + @@ -96,6 +99,7 @@ + True True @@ -248,6 +252,8 @@ + + diff --git a/DDUserManager/DDUserManager/ModuleRuntime.vb b/DDUserManager/DDUserManager/ModuleRuntime.vb index 7204f96..22e868d 100644 --- a/DDUserManager/DDUserManager/ModuleRuntime.vb +++ b/DDUserManager/DDUserManager/ModuleRuntime.vb @@ -5,9 +5,7 @@ Module ModuleRuntime Public MyConnectionString As String Public LogErrorsOnly As Boolean = True Public ConfigPath As String = Path.Combine(Application.UserAppDataPath, "UserConfig.xml") - Public rowresult - - Public USER_ID As Integer + Public ActiveDirectoryRootNode As String = $"LDAP://{Environment.UserDomainName}" Public Function SaveMySettingsValue(name As String, value As String, type As String) Try @@ -65,7 +63,6 @@ Module ModuleRuntime Return False End If For Each Row As DataRow In DT.Rows - rowresult &= Row.Item("ConfigName") Select Case Row.Item("ConfigName") Case "MyConnectionString" Dim connstring As String @@ -98,6 +95,12 @@ Module ModuleRuntime End If Case "LogErrorsOnly" LogErrorsOnly = CBool(Row.Item("Value")) + Case "ActiveDirectoryRootNode" + Dim rootNode As String = Row.Item("Value") + + If rootNode <> String.Empty Then + ActiveDirectoryRootNode = rootNode + End If End Select Next @@ -128,14 +131,24 @@ Module ModuleRuntime table.Columns.Add("Value", GetType(System.String)) 'Set the ID column as the primary key column. table.PrimaryKey = New DataColumn() {idColumn} - Dim newRow As DataRow = table.NewRow() - newRow("ConfigName") = "MyConnectionString" - newRow("Value") = "" + + Dim newRow As DataRow + + newRow = table.NewRow() + newRow.Item("ConfigName") = "MyConnectionString" + newRow.Item("Value") = "" table.Rows.Add(newRow) - Dim newRow1 As DataRow = table.NewRow() - newRow1("ConfigName") = "LogErrorsOnly" - newRow1("Value") = "True" - table.Rows.Add(newRow1) + + newRow = table.NewRow() + newRow.Item("ConfigName") = "LogErrorsOnly" + newRow.Item("Value") = "True" + table.Rows.Add(newRow) + + newRow = table.NewRow() + newRow.Item("ConfigName") = "ActiveDirectoryRootNode" + newRow.Item("Value") = "" + table.Rows.Add(newRow) + table.AcceptChanges() clsLogger.Add(">> CreateConfigTable su...", False) Return table diff --git a/DDUserManager/DDUserManager/My Project/AssemblyInfo.vb b/DDUserManager/DDUserManager/My Project/AssemblyInfo.vb index 2c30d6c..15ca17b 100644 --- a/DDUserManager/DDUserManager/My Project/AssemblyInfo.vb +++ b/DDUserManager/DDUserManager/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - + diff --git a/DDUserManager/DDUserManager/My Project/Resources.Designer.vb b/DDUserManager/DDUserManager/My Project/Resources.Designer.vb index 79033de..9b73d60 100644 --- a/DDUserManager/DDUserManager/My Project/Resources.Designer.vb +++ b/DDUserManager/DDUserManager/My Project/Resources.Designer.vb @@ -130,6 +130,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property folder() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("folder", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. ''' @@ -150,6 +160,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property help() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("help", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. ''' diff --git a/DDUserManager/DDUserManager/My Project/Resources.resx b/DDUserManager/DDUserManager/My Project/Resources.resx index cbdd2b7..35d88fa 100644 --- a/DDUserManager/DDUserManager/My Project/Resources.resx +++ b/DDUserManager/DDUserManager/My Project/Resources.resx @@ -118,6 +118,12 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\database_connect.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\folder.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\arrow_right.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -157,7 +163,7 @@ ..\Resources\arrow_refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\database_connect.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/DDUserManager/DDUserManager/Resources/folder.png b/DDUserManager/DDUserManager/Resources/folder.png new file mode 100644 index 0000000000000000000000000000000000000000..784e8fa48234f4f64b6922a6758f254ee0ca08ec GIT binary patch literal 537 zcmV+!0_OdRP)x(K@^6+>g^d@v4;gkbWsEoXE%32*i1tcpTNXd5CcIl)ECgqz|2rE6EW}s7R?kl za1q`0GCkMruC6-2LANtwVlsgzsp4?{@7$`KBv!G66>Vie3h?3OmEEkjwdLG0PgLVi z`!N((f$A@n17Ldj#`};0I3@iHJ5M{#IZz|UIYRm4(!uV7eYIYIwQf&}_2J~}>pQ^n z6o8--^T(=hkBNQ_k{-_GWE;FMW7!p}f{NG3nHZ{D5<3d8&tLh%a4AqqnjMkr3m&fkMdECD3N5}Unig5wy40;>lo4j~k+e}v)` zR6)J8Mk*u=SpB`p6o)7j?S0T@9?bz#m@l>gc*zk__|*!FMcHwP!gwLJvS~9c0px8E zW$XgYMs^AIOw1Qr{*Wn)N-{9ma}x2(<~`9Go1=*>YR!KZvrBS zCd!u}@M0og%Ev@_;Z?Kk>Wwv=%h_57zmt2<_1msz_niYE=YRNPpd%02TK9oK1z z>ooPno}v^sikz_|1XHFx_L%~;ljh7i(jiay5F0x*+(9aXXFCl?AdQj5XlQ65%sEv+ ztfe?|YcjPN*@yYtE~ImQh{l|#A6Z8iu>pf43Rj52CzU_dMQm|S2xR62YjQOn+z8WH zaK=!}ggOZi{4pB7SQ=xC0n|vXP_Bkx_a)FeNd}w8U97BNbSWxa^QW-li9BZ#M1!_xE*?wzt^GcoeoL*JGLSe_+l-JT2#2tz!z&^ z_s5anq&^nBklIMwRvcoP3%qs%%Ea?1c{_*V*Xj&~uLu-2Dp1fUN4<0zMo$EH>*U83 zm_9;Vt%-bE{_J_!If!1y=c+`QVZ>0_BPy z+%^pgnv`f8H)Z%0&Tp8&u*MCIC4igNW5MeWM_DHpDNi)Zxz|9XboOnitwFq$ETN=X zj-tkCJnz**Y4k#6_Ty^B=hWo~L!47r`HoP=x&3T1)JLr2t2+#fH _ - Public Overloads Overridable Function Delete( _ - ByVal Original_GUID As Integer, _ - ByVal Original_PRENAME As String, _ - ByVal Original_NAME As String, _ - ByVal Original_USERNAME As String, _ - ByVal Original_SHORTNAME As String, _ - ByVal Original_EMAIL As String, _ - ByVal Original_LANGUAGE As String, _ - ByVal Original_GENERAL_VIEWER As String, _ - ByVal Original_COMMENT As String, _ - ByVal Original_WAN_ENVIRONMENT As Boolean, _ - ByVal Original_LOGGED_IN As Boolean, _ - ByVal Original_LOGGED_WHERE As String, _ - ByVal Original_LOG_IN_WHEN As Global.System.Nullable(Of Date), _ - ByVal Original_LOG_OUT_WHEN As Global.System.Nullable(Of Date), _ - ByVal Original_PM_RIGHT_FILE_DELETE As Boolean, _ - ByVal Original_USERID_FK_INT_ECM As Integer, _ - ByVal Original_DATE_FORMAT As String, _ - ByVal Original_ADDED_WHO As String, _ - ByVal Original_ADDED_WHEN As Global.System.Nullable(Of Date), _ - ByVal Original_CHANGED_WHO As String, _ - ByVal Original_CHANGED_WHEN As Global.System.Nullable(Of Date)) As Integer + Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) - If (Original_PRENAME Is Nothing) Then - Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) - Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value - Else - Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) - Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_PRENAME,String) - End If - If (Original_NAME Is Nothing) Then - Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) - Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value - Else - Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) - Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_NAME,String) - End If - If (Original_USERNAME Is Nothing) Then - Throw New Global.System.ArgumentNullException("Original_USERNAME") - Else - Me.Adapter.DeleteCommand.Parameters(5).Value = CType(Original_USERNAME,String) - End If - If (Original_SHORTNAME Is Nothing) Then - Me.Adapter.DeleteCommand.Parameters(6).Value = CType(1,Object) - Me.Adapter.DeleteCommand.Parameters(7).Value = Global.System.DBNull.Value - Else - Me.Adapter.DeleteCommand.Parameters(6).Value = CType(0,Object) - Me.Adapter.DeleteCommand.Parameters(7).Value = CType(Original_SHORTNAME,String) - End If - If (Original_EMAIL Is Nothing) Then - Me.Adapter.DeleteCommand.Parameters(8).Value = CType(1,Object) - Me.Adapter.DeleteCommand.Parameters(9).Value = Global.System.DBNull.Value - Else - Me.Adapter.DeleteCommand.Parameters(8).Value = CType(0,Object) - Me.Adapter.DeleteCommand.Parameters(9).Value = CType(Original_EMAIL,String) - End If - If (Original_LANGUAGE Is Nothing) Then - Throw New Global.System.ArgumentNullException("Original_LANGUAGE") - Else - Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_LANGUAGE,String) - End If - If (Original_GENERAL_VIEWER Is Nothing) Then - Throw New Global.System.ArgumentNullException("Original_GENERAL_VIEWER") - Else - Me.Adapter.DeleteCommand.Parameters(11).Value = CType(Original_GENERAL_VIEWER,String) - End If - If (Original_COMMENT Is Nothing) Then - Me.Adapter.DeleteCommand.Parameters(12).Value = CType(1,Object) - Me.Adapter.DeleteCommand.Parameters(13).Value = Global.System.DBNull.Value - Else - Me.Adapter.DeleteCommand.Parameters(12).Value = CType(0,Object) - Me.Adapter.DeleteCommand.Parameters(13).Value = CType(Original_COMMENT,String) - End If - Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_WAN_ENVIRONMENT,Boolean) - Me.Adapter.DeleteCommand.Parameters(15).Value = CType(Original_LOGGED_IN,Boolean) - If (Original_LOGGED_WHERE Is Nothing) Then - Me.Adapter.DeleteCommand.Parameters(16).Value = CType(1,Object) - Me.Adapter.DeleteCommand.Parameters(17).Value = Global.System.DBNull.Value - Else - Me.Adapter.DeleteCommand.Parameters(16).Value = CType(0,Object) - Me.Adapter.DeleteCommand.Parameters(17).Value = CType(Original_LOGGED_WHERE,String) - End If - If (Original_LOG_IN_WHEN.HasValue = true) Then - Me.Adapter.DeleteCommand.Parameters(18).Value = CType(0,Object) - Me.Adapter.DeleteCommand.Parameters(19).Value = CType(Original_LOG_IN_WHEN.Value,Date) - Else - Me.Adapter.DeleteCommand.Parameters(18).Value = CType(1,Object) - Me.Adapter.DeleteCommand.Parameters(19).Value = Global.System.DBNull.Value - End If - If (Original_LOG_OUT_WHEN.HasValue = true) Then - Me.Adapter.DeleteCommand.Parameters(20).Value = CType(0,Object) - Me.Adapter.DeleteCommand.Parameters(21).Value = CType(Original_LOG_OUT_WHEN.Value,Date) - Else - Me.Adapter.DeleteCommand.Parameters(20).Value = CType(1,Object) - Me.Adapter.DeleteCommand.Parameters(21).Value = Global.System.DBNull.Value - End If - Me.Adapter.DeleteCommand.Parameters(22).Value = CType(Original_PM_RIGHT_FILE_DELETE,Boolean) - Me.Adapter.DeleteCommand.Parameters(23).Value = CType(Original_USERID_FK_INT_ECM,Integer) - If (Original_DATE_FORMAT Is Nothing) Then - Throw New Global.System.ArgumentNullException("Original_DATE_FORMAT") - Else - Me.Adapter.DeleteCommand.Parameters(24).Value = CType(Original_DATE_FORMAT,String) - End If - If (Original_ADDED_WHO Is Nothing) Then - Throw New Global.System.ArgumentNullException("Original_ADDED_WHO") - Else - Me.Adapter.DeleteCommand.Parameters(25).Value = CType(Original_ADDED_WHO,String) - End If - If (Original_ADDED_WHEN.HasValue = true) Then - Me.Adapter.DeleteCommand.Parameters(26).Value = CType(0,Object) - Me.Adapter.DeleteCommand.Parameters(27).Value = CType(Original_ADDED_WHEN.Value,Date) - Else - Me.Adapter.DeleteCommand.Parameters(26).Value = CType(1,Object) - Me.Adapter.DeleteCommand.Parameters(27).Value = Global.System.DBNull.Value - End If - If (Original_CHANGED_WHO Is Nothing) Then - Me.Adapter.DeleteCommand.Parameters(28).Value = CType(1,Object) - Me.Adapter.DeleteCommand.Parameters(29).Value = Global.System.DBNull.Value - Else - Me.Adapter.DeleteCommand.Parameters(28).Value = CType(0,Object) - Me.Adapter.DeleteCommand.Parameters(29).Value = CType(Original_CHANGED_WHO,String) - End If - If (Original_CHANGED_WHEN.HasValue = true) Then - Me.Adapter.DeleteCommand.Parameters(30).Value = CType(0,Object) - Me.Adapter.DeleteCommand.Parameters(31).Value = CType(Original_CHANGED_WHEN.Value,Date) - Else - Me.Adapter.DeleteCommand.Parameters(30).Value = CType(1,Object) - Me.Adapter.DeleteCommand.Parameters(31).Value = Global.System.DBNull.Value - End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then diff --git a/DDUserManager/DDUserManager/UserDataSet.xsc b/DDUserManager/DDUserManager/UserDataSet.xsc index 9816080..b418a80 100644 --- a/DDUserManager/DDUserManager/UserDataSet.xsc +++ b/DDUserManager/DDUserManager/UserDataSet.xsc @@ -9,18 +9,14 @@ - - + - - + - - + - - + diff --git a/DDUserManager/DDUserManager/UserDataSet.xsd b/DDUserManager/DDUserManager/UserDataSet.xsd index 2c533b2..161043c 100644 --- a/DDUserManager/DDUserManager/UserDataSet.xsd +++ b/DDUserManager/DDUserManager/UserDataSet.xsd @@ -514,41 +514,11 @@ SELECT GUID, USER_ID, CLIENT_ID, COMMENT, ADDED_WHO, ADDED_WHEN FROM TBDD_CLIENT - - DELETE FROM [TBDD_USER] WHERE (([GUID] = @Original_GUID) AND ((@IsNull_PRENAME = 1 AND [PRENAME] IS NULL) OR ([PRENAME] = @Original_PRENAME)) AND ((@IsNull_NAME = 1 AND [NAME] IS NULL) OR ([NAME] = @Original_NAME)) AND ([USERNAME] = @Original_USERNAME) AND ((@IsNull_SHORTNAME = 1 AND [SHORTNAME] IS NULL) OR ([SHORTNAME] = @Original_SHORTNAME)) AND ((@IsNull_EMAIL = 1 AND [EMAIL] IS NULL) OR ([EMAIL] = @Original_EMAIL)) AND ([LANGUAGE] = @Original_LANGUAGE) AND ([GENERAL_VIEWER] = @Original_GENERAL_VIEWER) AND ((@IsNull_COMMENT = 1 AND [COMMENT] IS NULL) OR ([COMMENT] = @Original_COMMENT)) AND ([WAN_ENVIRONMENT] = @Original_WAN_ENVIRONMENT) AND ([LOGGED_IN] = @Original_LOGGED_IN) AND ((@IsNull_LOGGED_WHERE = 1 AND [LOGGED_WHERE] IS NULL) OR ([LOGGED_WHERE] = @Original_LOGGED_WHERE)) AND ((@IsNull_LOG_IN_WHEN = 1 AND [LOG_IN_WHEN] IS NULL) OR ([LOG_IN_WHEN] = @Original_LOG_IN_WHEN)) AND ((@IsNull_LOG_OUT_WHEN = 1 AND [LOG_OUT_WHEN] IS NULL) OR ([LOG_OUT_WHEN] = @Original_LOG_OUT_WHEN)) AND ([PM_RIGHT_FILE_DELETE] = @Original_PM_RIGHT_FILE_DELETE) AND ([USERID_FK_INT_ECM] = @Original_USERID_FK_INT_ECM) AND ([DATE_FORMAT] = @Original_DATE_FORMAT) AND ([ADDED_WHO] = @Original_ADDED_WHO) AND ((@IsNull_ADDED_WHEN = 1 AND [ADDED_WHEN] IS NULL) OR ([ADDED_WHEN] = @Original_ADDED_WHEN)) AND ((@IsNull_CHANGED_WHO = 1 AND [CHANGED_WHO] IS NULL) OR ([CHANGED_WHO] = @Original_CHANGED_WHO)) AND ((@IsNull_CHANGED_WHEN = 1 AND [CHANGED_WHEN] IS NULL) OR ([CHANGED_WHEN] = @Original_CHANGED_WHEN))) + + DELETE FROM TBDD_USER +WHERE (GUID = @Original_GUID) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1129,7 +1099,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1) - + @@ -1161,7 +1131,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1) - + @@ -1265,7 +1235,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1) - + @@ -1290,7 +1260,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1) - + @@ -1355,7 +1325,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1) - + @@ -1379,7 +1349,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1) - + @@ -1458,7 +1428,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1) - + @@ -1468,14 +1438,14 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1) - + - + @@ -1507,7 +1477,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1) - + @@ -1539,7 +1509,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1) - + @@ -1621,16 +1591,16 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1) - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/DDUserManager/DDUserManager/UserDataSet.xss b/DDUserManager/DDUserManager/UserDataSet.xss index afb0ca8..84286bf 100644 --- a/DDUserManager/DDUserManager/UserDataSet.xss +++ b/DDUserManager/DDUserManager/UserDataSet.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + diff --git a/DDUserManager/DDUserManager/frmADImport_Groups.vb b/DDUserManager/DDUserManager/frmADImport_Groups.vb index f9fedd3..0f4ae58 100644 --- a/DDUserManager/DDUserManager/frmADImport_Groups.vb +++ b/DDUserManager/DDUserManager/frmADImport_Groups.vb @@ -1,12 +1,10 @@ Imports DevExpress.XtraGrid.Views.Grid Public Class frmADImport_Groups - Private Sub frmADImport_Groups_Load(sender As Object, e As EventArgs) Handles MyBase.Load + Private Shared logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger() + Private Sub frmADImport_Groups_Load(sender As Object, e As EventArgs) Handles MyBase.Load Try - 'TBDD_GROUPSTableAdapter.Connection.ConnectionString = MyConnectionString - 'TBDD_GROUPSTableAdapter.Fill(DS_ChangeS.TBDD_GROUPS) - Dim groups = ClassActiveDirectory.GetActiveDirectoryGroups() UserDataSet.TBLOCAL_ADGROUPS.Clear() @@ -17,6 +15,7 @@ Public Class frmADImport_Groups gridAD_Groups.DataSource = UserDataSet.TBLOCAL_ADGROUPS Catch ex As Exception + logger.Error(ex, "Error while loading initial groups") MsgBox($"Error while loading initial groups") End Try End Sub @@ -40,8 +39,10 @@ Public Class frmADImport_Groups Next If importedGroups = 0 Then + logger.Warn($"Es wurden keine neuen Gruppen importiert, da alle ausgewählten Gruppen bereits in der Gruppenverwaltung vorhanden sind.") MsgBox($"Es wurden keine neuen Gruppen importiert, da alle ausgewählten Gruppen bereits in der Gruppenverwaltung vorhanden sind.", MsgBoxStyle.Exclamation, "UserManager") Else + logger.Info($"{importedGroups} Gruppen wurden erfolgreich importiert!") MsgBox($"{importedGroups} Gruppen wurden erfolgreich importiert!", MsgBoxStyle.Information, "UserManager") End If End Sub diff --git a/DDUserManager/DDUserManager/frmADImport_Users.vb b/DDUserManager/DDUserManager/frmADImport_Users.vb index fc1dcc4..fbfa5e4 100644 --- a/DDUserManager/DDUserManager/frmADImport_Users.vb +++ b/DDUserManager/DDUserManager/frmADImport_Users.vb @@ -6,6 +6,8 @@ Imports DD_LIB_Standards Public Class frmADImport_Users + Private Shared logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger() + Private Sub frmADImport_Load(sender As Object, e As EventArgs) Handles MyBase.Load Try Dim groups = ClassActiveDirectory.GetActiveDirectoryGroups() @@ -13,6 +15,7 @@ Public Class frmADImport_Users gridAD_Groups.DataSource = groups viewAD_Groups.Columns.Item(0).Caption = "Gruppe" Catch ex As Exception + logger.Error(ex, $"Error while loading initial groups") MsgBox($"Error while loading initial groups") End Try End Sub @@ -21,23 +24,24 @@ Public Class frmADImport_Users Dim groupName As String = viewAD_Groups.GetRow(e.FocusedRowHandle) Try - Dim usersForGroup As List(Of UserPrincipal) = ClassActiveDirectory.GetActiveDirectoryUsersForGroup(groupName) + Dim usersForGroup As List(Of ClassActiveDirectory.ADUser) = ClassActiveDirectory.GetActiveDirectoryUsersForGroup(groupName) UserDataSet.TBLOCAL_ADUSERS.Clear() - For Each user As UserPrincipal In usersForGroup + For Each user As ClassActiveDirectory.ADUser In usersForGroup Dim row As TBLOCAL_ADUSERSRow = UserDataSet.TBLOCAL_ADUSERS.NewTBLOCAL_ADUSERSRow() row.NAME = user.Surname row.PRENAME = user.GivenName - row.USERNAME = user.SamAccountName - row.EMAIL = user.EmailAddress + row.USERNAME = user.Username + row.EMAIL = user.Email UserDataSet.TBLOCAL_ADUSERS.AddTBLOCAL_ADUSERSRow(row) Next TBLOCAL_ADUSERSBindingSource.DataSource = UserDataSet.TBLOCAL_ADUSERS Catch ex As Exception + logger.Error(ex, $"Error while loading users for group {groupName}") MsgBox($"Error while loading users for group {groupName}") End Try End Sub @@ -67,12 +71,14 @@ Public Class frmADImport_Users Next If importedUsers = 0 Then + logger.Warn("No new users imported. All selected users are already in database.") MsgBox($"Es wurden keine neuen Benutzer importiert, da alle ausgewählten Benutzer bereits in der Benutzerverwaltung vorhanden sind.", MsgBoxStyle.Exclamation, "UserManager") Else + logger.Info($"{importedUsers} users sucessfully imported.") MsgBox($"{importedUsers} Benutzer wurden erfolgreich importiert!", MsgBoxStyle.Information, "UserManager") End If Catch ex As Exception - clsLogger.Add($"Error while importing users: {ex.Message}") + logger.Error(ex, "Error while importing users") MsgBox($"Error while importing users: {ex.Message}", MsgBoxStyle.Critical) End Try End Sub diff --git a/DDUserManager/DDUserManager/frmMain.Designer.vb b/DDUserManager/DDUserManager/frmMain.Designer.vb index 57b1a17..a83050c 100644 --- a/DDUserManager/DDUserManager/frmMain.Designer.vb +++ b/DDUserManager/DDUserManager/frmMain.Designer.vb @@ -60,6 +60,8 @@ Partial Class frmMain Me.tabPageUsers = New DevExpress.XtraTab.XtraTabPage() Me.SplitContainer1 = New System.Windows.Forms.SplitContainer() Me.SplitContainer2 = New System.Windows.Forms.SplitContainer() + Me.Label8 = New System.Windows.Forms.Label() + Me.Label4 = New System.Windows.Forms.Label() Me.LANGUAGEComboBox = New System.Windows.Forms.ComboBox() Me.TBDD_USERBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.UserDataSet = New DDUserManager.UserDataSet() @@ -193,22 +195,23 @@ Partial Class frmMain Me.ToolStripButton2 = New System.Windows.Forms.ToolStripButton() Me.tabPageGroups = New DevExpress.XtraTab.XtraTabPage() Me.SplitContainer3 = New System.Windows.Forms.SplitContainer() - Me.gridGroups = New DevExpress.XtraGrid.GridControl() - Me.viewGroups = New DevExpress.XtraGrid.Views.Grid.GridView() - Me.colNAME5 = New DevExpress.XtraGrid.Columns.GridColumn() - Me.colCOMMENT1 = New DevExpress.XtraGrid.Columns.GridColumn() - Me.GroupBox4 = New System.Windows.Forms.GroupBox() + Me.Panel16 = New System.Windows.Forms.Panel() + Me.Label14 = New System.Windows.Forms.Label() + Me.Label11 = New System.Windows.Forms.Label() Me.TextBox4 = New System.Windows.Forms.TextBox() + Me.INTERNALCheckBox = New System.Windows.Forms.CheckBox() + Me.NAMETextBox1 = New System.Windows.Forms.TextBox() Me.TextBox3 = New System.Windows.Forms.TextBox() + Me.COMMENTTextBox1 = New System.Windows.Forms.TextBox() Me.ADDED_WHOTextBox1 = New System.Windows.Forms.TextBox() - Me.CHANGED_WHOTextBox1 = New System.Windows.Forms.TextBox() - Me.GroupBox2 = New System.Windows.Forms.GroupBox() - Me.INTERNALCheckBox = New System.Windows.Forms.CheckBox() Me.ACTIVECheckBox = New System.Windows.Forms.CheckBox() Me.AD_SYNCCheckBox = New System.Windows.Forms.CheckBox() + Me.CHANGED_WHOTextBox1 = New System.Windows.Forms.TextBox() Me.GUIDTextBox1 = New System.Windows.Forms.TextBox() - Me.NAMETextBox1 = New System.Windows.Forms.TextBox() - Me.COMMENTTextBox1 = New System.Windows.Forms.TextBox() + Me.gridGroups = New DevExpress.XtraGrid.GridControl() + Me.viewGroups = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.colNAME5 = New DevExpress.XtraGrid.Columns.GridColumn() + Me.colCOMMENT1 = New DevExpress.XtraGrid.Columns.GridColumn() Me.XtraTabControl3 = New DevExpress.XtraTab.XtraTabControl() Me.XtraTabPage1 = New DevExpress.XtraTab.XtraTabPage() Me.SplitContainer5 = New System.Windows.Forms.SplitContainer() @@ -269,6 +272,17 @@ Partial Class frmMain Me.TBDD_GROUPSBindingNavigatorSaveItem = New System.Windows.Forms.ToolStripButton() Me.btnImportGroups = New System.Windows.Forms.ToolStripButton() Me.tabPageClients = New DevExpress.XtraTab.XtraTabPage() + Me.Panel17 = New System.Windows.Forms.Panel() + Me.Label18 = New System.Windows.Forms.Label() + Me.Label17 = New System.Windows.Forms.Label() + Me.GUIDTextBox2 = New System.Windows.Forms.TextBox() + Me.CLIENT_NAMETextBox = New System.Windows.Forms.TextBox() + Me.CHANGED_WHOTextBox2 = New System.Windows.Forms.TextBox() + Me.SHORTNAMETextBox1 = New System.Windows.Forms.TextBox() + Me.TextBox6 = New System.Windows.Forms.TextBox() + Me.COMMENTTextBox2 = New System.Windows.Forms.TextBox() + Me.TextBox5 = New System.Windows.Forms.TextBox() + Me.ADDED_WHOTextBox2 = New System.Windows.Forms.TextBox() Me.gridClients = New DevExpress.XtraGrid.GridControl() Me.GridView4 = New DevExpress.XtraGrid.Views.Grid.GridView() Me.GridColumn1 = New DevExpress.XtraGrid.Columns.GridColumn() @@ -287,17 +301,13 @@ Partial Class frmMain Me.BindingNavigatorMoveLastItem2 = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorSeparator8 = New System.Windows.Forms.ToolStripSeparator() Me.TBDD_CLIENTBindingNavigatorSaveItem = New System.Windows.Forms.ToolStripButton() - Me.GroupBox6 = New System.Windows.Forms.GroupBox() - Me.CHANGED_WHOTextBox2 = New System.Windows.Forms.TextBox() - Me.TextBox6 = New System.Windows.Forms.TextBox() - Me.TextBox5 = New System.Windows.Forms.TextBox() - Me.ADDED_WHOTextBox2 = New System.Windows.Forms.TextBox() - Me.GroupBox5 = New System.Windows.Forms.GroupBox() - Me.COMMENTTextBox2 = New System.Windows.Forms.TextBox() - Me.SHORTNAMETextBox1 = New System.Windows.Forms.TextBox() - Me.CLIENT_NAMETextBox = New System.Windows.Forms.TextBox() - Me.GUIDTextBox2 = New System.Windows.Forms.TextBox() Me.tabPageModules = New DevExpress.XtraTab.XtraTabPage() + Me.Panel18 = New System.Windows.Forms.Panel() + Me.Label19 = New System.Windows.Forms.Label() + Me.PRODUCT_VERSIONTextBox = New System.Windows.Forms.TextBox() + Me.SHORT_NAMETextBox = New System.Windows.Forms.TextBox() + Me.GUIDTextBox3 = New System.Windows.Forms.TextBox() + Me.NAMETextBox2 = New System.Windows.Forms.TextBox() Me.gridModules = New DevExpress.XtraGrid.GridControl() Me.GridView5 = New DevExpress.XtraGrid.Views.Grid.GridView() Me.GridColumn8 = New DevExpress.XtraGrid.Columns.GridColumn() @@ -313,12 +323,15 @@ Partial Class frmMain Me.BindingNavigatorMoveNextItem3 = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorMoveLastItem3 = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorSeparator11 = New System.Windows.Forms.ToolStripSeparator() - Me.GUIDTextBox3 = New System.Windows.Forms.TextBox() - Me.NAMETextBox2 = New System.Windows.Forms.TextBox() - Me.SHORT_NAMETextBox = New System.Windows.Forms.TextBox() - Me.PRODUCT_VERSIONTextBox = New System.Windows.Forms.TextBox() Me.tabPageRights = New DevExpress.XtraTab.XtraTabPage() Me.tabPageSettings = New DevExpress.XtraTab.XtraTabPage() + Me.Button2 = New System.Windows.Forms.Button() + Me.GroupBox1 = New System.Windows.Forms.GroupBox() + Me.btnADConnectionTest = New System.Windows.Forms.Button() + Me.txtADRootNode = New System.Windows.Forms.TextBox() + Me.lblADRootNode = New System.Windows.Forms.Label() + Me.btnOpenLogDir = New System.Windows.Forms.Button() + Me.btnOpenConfigDir = New System.Windows.Forms.Button() Me.btnConfigConnections = New System.Windows.Forms.Button() Me.TBDD_GROUPS_USERBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.TBDD_USERTableAdapter = New DDUserManager.UserDataSetTableAdapters.TBDD_USERTableAdapter() @@ -332,6 +345,7 @@ Partial Class frmMain Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() Me.tsLabelUser = New System.Windows.Forms.ToolStripStatusLabel() Me.tsLabelSaved = New System.Windows.Forms.ToolStripStatusLabel() + Me.tsLabelVersion = New System.Windows.Forms.ToolStripStatusLabel() Me.TBDD_GROUPS_MODULESTableAdapter = New DDUserManager.UserDataSetTableAdapters.TBDD_GROUPS_MODULESTableAdapter() Me.TBDD_GROUPS_CLIENTTableAdapter = New DDUserManager.UserDataSetTableAdapters.TBDD_GROUPS_CLIENTTableAdapter() Me.Button1 = New System.Windows.Forms.Button() @@ -445,10 +459,9 @@ Partial Class frmMain Me.SplitContainer3.Panel1.SuspendLayout() Me.SplitContainer3.Panel2.SuspendLayout() Me.SplitContainer3.SuspendLayout() + Me.Panel16.SuspendLayout() CType(Me.gridGroups, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.viewGroups, System.ComponentModel.ISupportInitialize).BeginInit() - Me.GroupBox4.SuspendLayout() - Me.GroupBox2.SuspendLayout() CType(Me.XtraTabControl3, System.ComponentModel.ISupportInitialize).BeginInit() Me.XtraTabControl3.SuspendLayout() Me.XtraTabPage1.SuspendLayout() @@ -482,18 +495,19 @@ Partial Class frmMain CType(Me.TBDD_GROUPSBindingNavigator, System.ComponentModel.ISupportInitialize).BeginInit() Me.TBDD_GROUPSBindingNavigator.SuspendLayout() Me.tabPageClients.SuspendLayout() + Me.Panel17.SuspendLayout() CType(Me.gridClients, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridView4, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TBDD_CLIENTBindingNavigator, System.ComponentModel.ISupportInitialize).BeginInit() Me.TBDD_CLIENTBindingNavigator.SuspendLayout() - Me.GroupBox6.SuspendLayout() - Me.GroupBox5.SuspendLayout() Me.tabPageModules.SuspendLayout() + Me.Panel18.SuspendLayout() CType(Me.gridModules, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridView5, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TBDD_MODULESBindingNavigator, System.ComponentModel.ISupportInitialize).BeginInit() Me.TBDD_MODULESBindingNavigator.SuspendLayout() Me.tabPageSettings.SuspendLayout() + Me.GroupBox1.SuspendLayout() CType(Me.TBDD_GROUPS_USERBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TBDD_CLIENT_USERBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TBDD_USER_MODULESBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() @@ -504,17 +518,17 @@ Partial Class frmMain ' GUIDLabel.AutoSize = True GUIDLabel.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - GUIDLabel.Location = New System.Drawing.Point(21, 25) + GUIDLabel.Location = New System.Drawing.Point(21, 40) GUIDLabel.Name = "GUIDLabel" - GUIDLabel.Size = New System.Drawing.Size(43, 13) + GUIDLabel.Size = New System.Drawing.Size(20, 13) GUIDLabel.TabIndex = 0 - GUIDLabel.Text = "UserId:" + GUIDLabel.Text = "Id:" ' 'PRENAMELabel ' PRENAMELabel.AutoSize = True PRENAMELabel.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - PRENAMELabel.Location = New System.Drawing.Point(21, 52) + PRENAMELabel.Location = New System.Drawing.Point(21, 67) PRENAMELabel.Name = "PRENAMELabel" PRENAMELabel.Size = New System.Drawing.Size(55, 13) PRENAMELabel.TabIndex = 2 @@ -524,7 +538,7 @@ Partial Class frmMain ' NAMELabel.AutoSize = True NAMELabel.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - NAMELabel.Location = New System.Drawing.Point(21, 79) + NAMELabel.Location = New System.Drawing.Point(21, 94) NAMELabel.Name = "NAMELabel" NAMELabel.Size = New System.Drawing.Size(64, 13) NAMELabel.TabIndex = 4 @@ -533,7 +547,7 @@ Partial Class frmMain 'USERNAMELabel ' USERNAMELabel.AutoSize = True - USERNAMELabel.Location = New System.Drawing.Point(238, 52) + USERNAMELabel.Location = New System.Drawing.Point(238, 67) USERNAMELabel.Name = "USERNAMELabel" USERNAMELabel.Size = New System.Drawing.Size(80, 13) USERNAMELabel.TabIndex = 6 @@ -542,7 +556,7 @@ Partial Class frmMain 'SHORTNAMELabel ' SHORTNAMELabel.AutoSize = True - SHORTNAMELabel.Location = New System.Drawing.Point(238, 79) + SHORTNAMELabel.Location = New System.Drawing.Point(238, 94) SHORTNAMELabel.Name = "SHORTNAMELabel" SHORTNAMELabel.Size = New System.Drawing.Size(40, 13) SHORTNAMELabel.TabIndex = 8 @@ -552,7 +566,7 @@ Partial Class frmMain ' EMAILLabel.AutoSize = True EMAILLabel.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - EMAILLabel.Location = New System.Drawing.Point(21, 105) + EMAILLabel.Location = New System.Drawing.Point(21, 120) EMAILLabel.Name = "EMAILLabel" EMAILLabel.Size = New System.Drawing.Size(37, 13) EMAILLabel.TabIndex = 10 @@ -561,7 +575,7 @@ Partial Class frmMain 'LANGUAGELabel ' LANGUAGELabel.AutoSize = True - LANGUAGELabel.Location = New System.Drawing.Point(238, 105) + LANGUAGELabel.Location = New System.Drawing.Point(238, 120) LANGUAGELabel.Name = "LANGUAGELabel" LANGUAGELabel.Size = New System.Drawing.Size(50, 13) LANGUAGELabel.TabIndex = 12 @@ -570,7 +584,7 @@ Partial Class frmMain 'COMMENTLabel ' COMMENTLabel.AutoSize = True - COMMENTLabel.Location = New System.Drawing.Point(238, 132) + COMMENTLabel.Location = New System.Drawing.Point(238, 147) COMMENTLabel.Name = "COMMENTLabel" COMMENTLabel.Size = New System.Drawing.Size(65, 13) COMMENTLabel.TabIndex = 16 @@ -580,7 +594,7 @@ Partial Class frmMain ' DATE_FORMATLabel.AutoSize = True DATE_FORMATLabel.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DATE_FORMATLabel.Location = New System.Drawing.Point(21, 132) + DATE_FORMATLabel.Location = New System.Drawing.Point(21, 147) DATE_FORMATLabel.Name = "DATE_FORMATLabel" DATE_FORMATLabel.Size = New System.Drawing.Size(83, 13) DATE_FORMATLabel.TabIndex = 42 @@ -589,7 +603,7 @@ Partial Class frmMain 'ADDED_WHOLabel ' ADDED_WHOLabel.AutoSize = True - ADDED_WHOLabel.Location = New System.Drawing.Point(463, 52) + ADDED_WHOLabel.Location = New System.Drawing.Point(544, 40) ADDED_WHOLabel.Name = "ADDED_WHOLabel" ADDED_WHOLabel.Size = New System.Drawing.Size(90, 13) ADDED_WHOLabel.TabIndex = 44 @@ -598,7 +612,7 @@ Partial Class frmMain 'ADDED_WHENLabel ' ADDED_WHENLabel.AutoSize = True - ADDED_WHENLabel.Location = New System.Drawing.Point(463, 80) + ADDED_WHENLabel.Location = New System.Drawing.Point(544, 68) ADDED_WHENLabel.Name = "ADDED_WHENLabel" ADDED_WHENLabel.Size = New System.Drawing.Size(98, 13) ADDED_WHENLabel.TabIndex = 46 @@ -607,7 +621,7 @@ Partial Class frmMain 'CHANGED_WHOLabel ' CHANGED_WHOLabel.AutoSize = True - CHANGED_WHOLabel.Location = New System.Drawing.Point(463, 106) + CHANGED_WHOLabel.Location = New System.Drawing.Point(544, 94) CHANGED_WHOLabel.Name = "CHANGED_WHOLabel" CHANGED_WHOLabel.Size = New System.Drawing.Size(77, 13) CHANGED_WHOLabel.TabIndex = 48 @@ -616,7 +630,7 @@ Partial Class frmMain 'CHANGED_WHENLabel ' CHANGED_WHENLabel.AutoSize = True - CHANGED_WHENLabel.Location = New System.Drawing.Point(463, 132) + CHANGED_WHENLabel.Location = New System.Drawing.Point(544, 120) CHANGED_WHENLabel.Name = "CHANGED_WHENLabel" CHANGED_WHENLabel.Size = New System.Drawing.Size(85, 13) CHANGED_WHENLabel.TabIndex = 50 @@ -625,16 +639,16 @@ Partial Class frmMain 'GUIDLabel1 ' GUIDLabel1.AutoSize = True - GUIDLabel1.Location = New System.Drawing.Point(6, 17) + GUIDLabel1.Location = New System.Drawing.Point(21, 40) GUIDLabel1.Name = "GUIDLabel1" - GUIDLabel1.Size = New System.Drawing.Size(62, 13) + GUIDLabel1.Size = New System.Drawing.Size(21, 13) GUIDLabel1.TabIndex = 1 - GUIDLabel1.Text = "GruppenId:" + GUIDLabel1.Text = "Id:" ' 'NAMELabel1 ' NAMELabel1.AutoSize = True - NAMELabel1.Location = New System.Drawing.Point(6, 44) + NAMELabel1.Location = New System.Drawing.Point(21, 67) NAMELabel1.Name = "NAMELabel1" NAMELabel1.Size = New System.Drawing.Size(46, 13) NAMELabel1.TabIndex = 3 @@ -643,7 +657,7 @@ Partial Class frmMain 'COMMENTLabel1 ' COMMENTLabel1.AutoSize = True - COMMENTLabel1.Location = New System.Drawing.Point(6, 71) + COMMENTLabel1.Location = New System.Drawing.Point(21, 94) COMMENTLabel1.Name = "COMMENTLabel1" COMMENTLabel1.Size = New System.Drawing.Size(65, 13) COMMENTLabel1.TabIndex = 5 @@ -652,7 +666,7 @@ Partial Class frmMain 'ADDED_WHOLabel1 ' ADDED_WHOLabel1.AutoSize = True - ADDED_WHOLabel1.Location = New System.Drawing.Point(6, 17) + ADDED_WHOLabel1.Location = New System.Drawing.Point(544, 40) ADDED_WHOLabel1.Name = "ADDED_WHOLabel1" ADDED_WHOLabel1.Size = New System.Drawing.Size(90, 13) ADDED_WHOLabel1.TabIndex = 7 @@ -661,7 +675,7 @@ Partial Class frmMain 'ADDED_WHENLabel1 ' ADDED_WHENLabel1.AutoSize = True - ADDED_WHENLabel1.Location = New System.Drawing.Point(6, 45) + ADDED_WHENLabel1.Location = New System.Drawing.Point(544, 68) ADDED_WHENLabel1.Name = "ADDED_WHENLabel1" ADDED_WHENLabel1.Size = New System.Drawing.Size(98, 13) ADDED_WHENLabel1.TabIndex = 9 @@ -670,7 +684,7 @@ Partial Class frmMain 'CHANGED_WHOLabel1 ' CHANGED_WHOLabel1.AutoSize = True - CHANGED_WHOLabel1.Location = New System.Drawing.Point(6, 71) + CHANGED_WHOLabel1.Location = New System.Drawing.Point(544, 94) CHANGED_WHOLabel1.Name = "CHANGED_WHOLabel1" CHANGED_WHOLabel1.Size = New System.Drawing.Size(77, 13) CHANGED_WHOLabel1.TabIndex = 11 @@ -679,7 +693,7 @@ Partial Class frmMain 'CHANGED_WHENLabel1 ' CHANGED_WHENLabel1.AutoSize = True - CHANGED_WHENLabel1.Location = New System.Drawing.Point(6, 99) + CHANGED_WHENLabel1.Location = New System.Drawing.Point(544, 122) CHANGED_WHENLabel1.Name = "CHANGED_WHENLabel1" CHANGED_WHENLabel1.Size = New System.Drawing.Size(85, 13) CHANGED_WHENLabel1.TabIndex = 13 @@ -688,16 +702,16 @@ Partial Class frmMain 'GUIDLabel2 ' GUIDLabel2.AutoSize = True - GUIDLabel2.Location = New System.Drawing.Point(6, 17) + GUIDLabel2.Location = New System.Drawing.Point(21, 40) GUIDLabel2.Name = "GUIDLabel2" - GUIDLabel2.Size = New System.Drawing.Size(75, 13) + GUIDLabel2.Size = New System.Drawing.Size(21, 13) GUIDLabel2.TabIndex = 0 - GUIDLabel2.Text = "MandantenId:" + GUIDLabel2.Text = "Id:" ' 'CLIENT_NAMELabel ' CLIENT_NAMELabel.AutoSize = True - CLIENT_NAMELabel.Location = New System.Drawing.Point(6, 44) + CLIENT_NAMELabel.Location = New System.Drawing.Point(21, 67) CLIENT_NAMELabel.Name = "CLIENT_NAMELabel" CLIENT_NAMELabel.Size = New System.Drawing.Size(53, 13) CLIENT_NAMELabel.TabIndex = 2 @@ -706,7 +720,7 @@ Partial Class frmMain 'SHORTNAMELabel1 ' SHORTNAMELabel1.AutoSize = True - SHORTNAMELabel1.Location = New System.Drawing.Point(6, 71) + SHORTNAMELabel1.Location = New System.Drawing.Point(21, 94) SHORTNAMELabel1.Name = "SHORTNAMELabel1" SHORTNAMELabel1.Size = New System.Drawing.Size(58, 13) SHORTNAMELabel1.TabIndex = 4 @@ -715,7 +729,7 @@ Partial Class frmMain 'COMMENTLabel2 ' COMMENTLabel2.AutoSize = True - COMMENTLabel2.Location = New System.Drawing.Point(6, 98) + COMMENTLabel2.Location = New System.Drawing.Point(21, 121) COMMENTLabel2.Name = "COMMENTLabel2" COMMENTLabel2.Size = New System.Drawing.Size(65, 13) COMMENTLabel2.TabIndex = 6 @@ -724,7 +738,7 @@ Partial Class frmMain 'ADDED_WHOLabel2 ' ADDED_WHOLabel2.AutoSize = True - ADDED_WHOLabel2.Location = New System.Drawing.Point(6, 23) + ADDED_WHOLabel2.Location = New System.Drawing.Point(538, 40) ADDED_WHOLabel2.Name = "ADDED_WHOLabel2" ADDED_WHOLabel2.Size = New System.Drawing.Size(90, 13) ADDED_WHOLabel2.TabIndex = 0 @@ -733,7 +747,7 @@ Partial Class frmMain 'CHANGED_WHOLabel2 ' CHANGED_WHOLabel2.AutoSize = True - CHANGED_WHOLabel2.Location = New System.Drawing.Point(6, 77) + CHANGED_WHOLabel2.Location = New System.Drawing.Point(538, 94) CHANGED_WHOLabel2.Name = "CHANGED_WHOLabel2" CHANGED_WHOLabel2.Size = New System.Drawing.Size(77, 13) CHANGED_WHOLabel2.TabIndex = 2 @@ -742,7 +756,7 @@ Partial Class frmMain 'CHANGED_WHENLabel2 ' CHANGED_WHENLabel2.AutoSize = True - CHANGED_WHENLabel2.Location = New System.Drawing.Point(6, 104) + CHANGED_WHENLabel2.Location = New System.Drawing.Point(538, 121) CHANGED_WHENLabel2.Name = "CHANGED_WHENLabel2" CHANGED_WHENLabel2.Size = New System.Drawing.Size(85, 13) CHANGED_WHENLabel2.TabIndex = 4 @@ -751,7 +765,7 @@ Partial Class frmMain 'ADDED_WHENLabel2 ' ADDED_WHENLabel2.AutoSize = True - ADDED_WHENLabel2.Location = New System.Drawing.Point(6, 50) + ADDED_WHENLabel2.Location = New System.Drawing.Point(538, 67) ADDED_WHENLabel2.Name = "ADDED_WHENLabel2" ADDED_WHENLabel2.Size = New System.Drawing.Size(98, 13) ADDED_WHENLabel2.TabIndex = 6 @@ -760,7 +774,7 @@ Partial Class frmMain 'GUIDLabel3 ' GUIDLabel3.AutoSize = True - GUIDLabel3.Location = New System.Drawing.Point(410, 31) + GUIDLabel3.Location = New System.Drawing.Point(21, 40) GUIDLabel3.Name = "GUIDLabel3" GUIDLabel3.Size = New System.Drawing.Size(49, 13) GUIDLabel3.TabIndex = 0 @@ -769,7 +783,7 @@ Partial Class frmMain 'NAMELabel2 ' NAMELabel2.AutoSize = True - NAMELabel2.Location = New System.Drawing.Point(410, 58) + NAMELabel2.Location = New System.Drawing.Point(21, 65) NAMELabel2.Name = "NAMELabel2" NAMELabel2.Size = New System.Drawing.Size(39, 13) NAMELabel2.TabIndex = 2 @@ -778,7 +792,7 @@ Partial Class frmMain 'SHORT_NAMELabel ' SHORT_NAMELabel.AutoSize = True - SHORT_NAMELabel.Location = New System.Drawing.Point(410, 85) + SHORT_NAMELabel.Location = New System.Drawing.Point(21, 92) SHORT_NAMELabel.Name = "SHORT_NAMELabel" SHORT_NAMELabel.Size = New System.Drawing.Size(58, 13) SHORT_NAMELabel.TabIndex = 4 @@ -787,7 +801,7 @@ Partial Class frmMain 'PRODUCT_VERSIONLabel ' PRODUCT_VERSIONLabel.AutoSize = True - PRODUCT_VERSIONLabel.Location = New System.Drawing.Point(410, 112) + PRODUCT_VERSIONLabel.Location = New System.Drawing.Point(21, 119) PRODUCT_VERSIONLabel.Name = "PRODUCT_VERSIONLabel" PRODUCT_VERSIONLabel.Size = New System.Drawing.Size(46, 13) PRODUCT_VERSIONLabel.TabIndex = 8 @@ -844,6 +858,8 @@ Partial Class frmMain 'SplitContainer2.Panel1 ' Me.SplitContainer2.Panel1.AutoScroll = True + Me.SplitContainer2.Panel1.Controls.Add(Me.Label8) + Me.SplitContainer2.Panel1.Controls.Add(Me.Label4) Me.SplitContainer2.Panel1.Controls.Add(Me.LANGUAGEComboBox) Me.SplitContainer2.Panel1.Controls.Add(Me.DATE_FORMATComboBox) Me.SplitContainer2.Panel1.Controls.Add(Me.TextBox2) @@ -885,12 +901,32 @@ Partial Class frmMain Me.SplitContainer2.SplitterDistance = 181 Me.SplitContainer2.TabIndex = 63 ' + 'Label8 + ' + Me.Label8.AutoSize = True + Me.Label8.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label8.Location = New System.Drawing.Point(544, 10) + Me.Label8.Name = "Label8" + Me.Label8.Size = New System.Drawing.Size(156, 13) + Me.Label8.TabIndex = 56 + Me.Label8.Text = "Zusätzliche Informationen" + ' + 'Label4 + ' + Me.Label4.AutoSize = True + Me.Label4.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label4.Location = New System.Drawing.Point(21, 10) + Me.Label4.Name = "Label4" + Me.Label4.Size = New System.Drawing.Size(137, 13) + Me.Label4.TabIndex = 56 + Me.Label4.Text = "Benutzer-Stammdaten" + ' 'LANGUAGEComboBox ' Me.LANGUAGEComboBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "LANGUAGE", True)) Me.LANGUAGEComboBox.FormattingEnabled = True Me.LANGUAGEComboBox.Items.AddRange(New Object() {"de-DE", "en-US"}) - Me.LANGUAGEComboBox.Location = New System.Drawing.Point(347, 102) + Me.LANGUAGEComboBox.Location = New System.Drawing.Point(347, 117) Me.LANGUAGEComboBox.Name = "LANGUAGEComboBox" Me.LANGUAGEComboBox.Size = New System.Drawing.Size(109, 21) Me.LANGUAGEComboBox.TabIndex = 55 @@ -910,7 +946,7 @@ Partial Class frmMain Me.DATE_FORMATComboBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "DATE_FORMAT", True)) Me.DATE_FORMATComboBox.FormattingEnabled = True Me.DATE_FORMATComboBox.Items.AddRange(New Object() {"dd.MM.yyyy", "MM.dd.yyyy", "yyyy-MM-dd"}) - Me.DATE_FORMATComboBox.Location = New System.Drawing.Point(106, 129) + Me.DATE_FORMATComboBox.Location = New System.Drawing.Point(106, 144) Me.DATE_FORMATComboBox.Name = "DATE_FORMATComboBox" Me.DATE_FORMATComboBox.Size = New System.Drawing.Size(109, 21) Me.DATE_FORMATComboBox.TabIndex = 54 @@ -918,35 +954,35 @@ Partial Class frmMain 'TextBox2 ' Me.TextBox2.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "CHANGED_WHEN", True)) - Me.TextBox2.Location = New System.Drawing.Point(577, 129) + Me.TextBox2.Location = New System.Drawing.Point(658, 117) Me.TextBox2.Name = "TextBox2" Me.TextBox2.ReadOnly = True - Me.TextBox2.Size = New System.Drawing.Size(163, 21) + Me.TextBox2.Size = New System.Drawing.Size(128, 21) Me.TextBox2.TabIndex = 53 ' 'TextBox1 ' Me.TextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "ADDED_WHEN", True)) - Me.TextBox1.Location = New System.Drawing.Point(577, 77) + Me.TextBox1.Location = New System.Drawing.Point(658, 65) Me.TextBox1.Name = "TextBox1" Me.TextBox1.ReadOnly = True - Me.TextBox1.Size = New System.Drawing.Size(163, 21) + Me.TextBox1.Size = New System.Drawing.Size(128, 21) Me.TextBox1.TabIndex = 52 ' 'CHANGED_WHOTextBox ' Me.CHANGED_WHOTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "CHANGED_WHO", True)) Me.CHANGED_WHOTextBox.Enabled = False - Me.CHANGED_WHOTextBox.Location = New System.Drawing.Point(577, 102) + Me.CHANGED_WHOTextBox.Location = New System.Drawing.Point(658, 90) Me.CHANGED_WHOTextBox.Name = "CHANGED_WHOTextBox" Me.CHANGED_WHOTextBox.ReadOnly = True - Me.CHANGED_WHOTextBox.Size = New System.Drawing.Size(163, 21) + Me.CHANGED_WHOTextBox.Size = New System.Drawing.Size(128, 21) Me.CHANGED_WHOTextBox.TabIndex = 49 ' 'PRENAMETextBox ' Me.PRENAMETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "PRENAME", True)) - Me.PRENAMETextBox.Location = New System.Drawing.Point(106, 49) + Me.PRENAMETextBox.Location = New System.Drawing.Point(106, 64) Me.PRENAMETextBox.Name = "PRENAMETextBox" Me.PRENAMETextBox.Size = New System.Drawing.Size(109, 21) Me.PRENAMETextBox.TabIndex = 3 @@ -954,7 +990,7 @@ Partial Class frmMain 'EMAILTextBox ' Me.EMAILTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "EMAIL", True)) - Me.EMAILTextBox.Location = New System.Drawing.Point(106, 102) + Me.EMAILTextBox.Location = New System.Drawing.Point(106, 117) Me.EMAILTextBox.Name = "EMAILTextBox" Me.EMAILTextBox.Size = New System.Drawing.Size(109, 21) Me.EMAILTextBox.TabIndex = 11 @@ -963,16 +999,16 @@ Partial Class frmMain ' Me.ADDED_WHOTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "ADDED_WHO", True)) Me.ADDED_WHOTextBox.Enabled = False - Me.ADDED_WHOTextBox.Location = New System.Drawing.Point(577, 50) + Me.ADDED_WHOTextBox.Location = New System.Drawing.Point(658, 38) Me.ADDED_WHOTextBox.Name = "ADDED_WHOTextBox" Me.ADDED_WHOTextBox.ReadOnly = True - Me.ADDED_WHOTextBox.Size = New System.Drawing.Size(163, 21) + Me.ADDED_WHOTextBox.Size = New System.Drawing.Size(128, 21) Me.ADDED_WHOTextBox.TabIndex = 45 ' 'GUIDTextBox ' Me.GUIDTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "GUID", True)) - Me.GUIDTextBox.Location = New System.Drawing.Point(106, 22) + Me.GUIDTextBox.Location = New System.Drawing.Point(106, 37) Me.GUIDTextBox.Name = "GUIDTextBox" Me.GUIDTextBox.ReadOnly = True Me.GUIDTextBox.Size = New System.Drawing.Size(109, 21) @@ -981,7 +1017,7 @@ Partial Class frmMain 'COMMENTTextBox ' Me.COMMENTTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "COMMENT", True)) - Me.COMMENTTextBox.Location = New System.Drawing.Point(347, 129) + Me.COMMENTTextBox.Location = New System.Drawing.Point(347, 144) Me.COMMENTTextBox.Name = "COMMENTTextBox" Me.COMMENTTextBox.Size = New System.Drawing.Size(109, 21) Me.COMMENTTextBox.TabIndex = 17 @@ -989,7 +1025,7 @@ Partial Class frmMain 'NAMETextBox ' Me.NAMETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "NAME", True)) - Me.NAMETextBox.Location = New System.Drawing.Point(106, 76) + Me.NAMETextBox.Location = New System.Drawing.Point(106, 91) Me.NAMETextBox.Name = "NAMETextBox" Me.NAMETextBox.Size = New System.Drawing.Size(109, 21) Me.NAMETextBox.TabIndex = 5 @@ -997,7 +1033,7 @@ Partial Class frmMain 'USERNAMETextBox ' Me.USERNAMETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "USERNAME", True)) - Me.USERNAMETextBox.Location = New System.Drawing.Point(347, 49) + Me.USERNAMETextBox.Location = New System.Drawing.Point(347, 64) Me.USERNAMETextBox.Name = "USERNAMETextBox" Me.USERNAMETextBox.Size = New System.Drawing.Size(109, 21) Me.USERNAMETextBox.TabIndex = 7 @@ -1005,7 +1041,7 @@ Partial Class frmMain 'SHORTNAMETextBox ' Me.SHORTNAMETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_USERBindingSource, "SHORTNAME", True)) - Me.SHORTNAMETextBox.Location = New System.Drawing.Point(347, 76) + Me.SHORTNAMETextBox.Location = New System.Drawing.Point(347, 91) Me.SHORTNAMETextBox.Name = "SHORTNAMETextBox" Me.SHORTNAMETextBox.Size = New System.Drawing.Size(109, 21) Me.SHORTNAMETextBox.TabIndex = 9 @@ -2161,9 +2197,8 @@ Partial Class frmMain 'SplitContainer3.Panel1 ' Me.SplitContainer3.Panel1.AutoScroll = True + Me.SplitContainer3.Panel1.Controls.Add(Me.Panel16) Me.SplitContainer3.Panel1.Controls.Add(Me.gridGroups) - Me.SplitContainer3.Panel1.Controls.Add(Me.GroupBox4) - Me.SplitContainer3.Panel1.Controls.Add(Me.GroupBox2) ' 'SplitContainer3.Panel2 ' @@ -2172,130 +2207,111 @@ Partial Class frmMain Me.SplitContainer3.SplitterDistance = 375 Me.SplitContainer3.TabIndex = 18 ' - 'gridGroups - ' - Me.gridGroups.DataSource = Me.TBDD_GROUPSBindingSource1 - Me.gridGroups.Dock = System.Windows.Forms.DockStyle.Left - Me.gridGroups.Location = New System.Drawing.Point(0, 0) - Me.gridGroups.MainView = Me.viewGroups - Me.gridGroups.Name = "gridGroups" - Me.gridGroups.Size = New System.Drawing.Size(400, 375) - Me.gridGroups.TabIndex = 17 - Me.gridGroups.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.viewGroups}) - ' - 'viewGroups - ' - Me.viewGroups.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colNAME5, Me.colCOMMENT1}) - Me.viewGroups.GridControl = Me.gridGroups - Me.viewGroups.Name = "viewGroups" - Me.viewGroups.OptionsBehavior.Editable = False - Me.viewGroups.OptionsBehavior.ReadOnly = True - Me.viewGroups.OptionsDetail.EnableMasterViewMode = False - Me.viewGroups.OptionsView.ShowAutoFilterRow = True - Me.viewGroups.OptionsView.ShowGroupPanel = False - ' - 'colNAME5 - ' - Me.colNAME5.Caption = "Gruppe" - Me.colNAME5.FieldName = "NAME" - Me.colNAME5.Name = "colNAME5" - Me.colNAME5.Visible = True - Me.colNAME5.VisibleIndex = 0 - ' - 'colCOMMENT1 - ' - Me.colCOMMENT1.Caption = "Kommentar" - Me.colCOMMENT1.FieldName = "COMMENT" - Me.colCOMMENT1.Name = "colCOMMENT1" - Me.colCOMMENT1.Visible = True - Me.colCOMMENT1.VisibleIndex = 1 - ' - 'GroupBox4 - ' - Me.GroupBox4.Controls.Add(ADDED_WHOLabel1) - Me.GroupBox4.Controls.Add(Me.TextBox4) - Me.GroupBox4.Controls.Add(Me.TextBox3) - Me.GroupBox4.Controls.Add(Me.ADDED_WHOTextBox1) - Me.GroupBox4.Controls.Add(CHANGED_WHENLabel1) - Me.GroupBox4.Controls.Add(ADDED_WHENLabel1) - Me.GroupBox4.Controls.Add(CHANGED_WHOLabel1) - Me.GroupBox4.Controls.Add(Me.CHANGED_WHOTextBox1) - Me.GroupBox4.Location = New System.Drawing.Point(406, 214) - Me.GroupBox4.Name = "GroupBox4" - Me.GroupBox4.Size = New System.Drawing.Size(561, 144) - Me.GroupBox4.TabIndex = 16 - Me.GroupBox4.TabStop = False - Me.GroupBox4.Text = "Informationen" + 'Panel16 + ' + Me.Panel16.Controls.Add(Me.Label14) + Me.Panel16.Controls.Add(Me.Label11) + Me.Panel16.Controls.Add(ADDED_WHOLabel1) + Me.Panel16.Controls.Add(Me.TextBox4) + Me.Panel16.Controls.Add(Me.INTERNALCheckBox) + Me.Panel16.Controls.Add(Me.NAMETextBox1) + Me.Panel16.Controls.Add(Me.TextBox3) + Me.Panel16.Controls.Add(Me.COMMENTTextBox1) + Me.Panel16.Controls.Add(Me.ADDED_WHOTextBox1) + Me.Panel16.Controls.Add(Me.ACTIVECheckBox) + Me.Panel16.Controls.Add(CHANGED_WHENLabel1) + Me.Panel16.Controls.Add(Me.AD_SYNCCheckBox) + Me.Panel16.Controls.Add(ADDED_WHENLabel1) + Me.Panel16.Controls.Add(NAMELabel1) + Me.Panel16.Controls.Add(CHANGED_WHOLabel1) + Me.Panel16.Controls.Add(COMMENTLabel1) + Me.Panel16.Controls.Add(Me.CHANGED_WHOTextBox1) + Me.Panel16.Controls.Add(GUIDLabel1) + Me.Panel16.Controls.Add(Me.GUIDTextBox1) + Me.Panel16.Dock = System.Windows.Forms.DockStyle.Fill + Me.Panel16.Location = New System.Drawing.Point(400, 0) + Me.Panel16.Name = "Panel16" + Me.Panel16.Size = New System.Drawing.Size(793, 375) + Me.Panel16.TabIndex = 58 + ' + 'Label14 + ' + Me.Label14.AutoSize = True + Me.Label14.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label14.Location = New System.Drawing.Point(544, 10) + Me.Label14.Name = "Label14" + Me.Label14.Size = New System.Drawing.Size(156, 13) + Me.Label14.TabIndex = 58 + Me.Label14.Text = "Zusätzliche Informationen" + ' + 'Label11 + ' + Me.Label11.AutoSize = True + Me.Label11.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label11.Location = New System.Drawing.Point(21, 10) + Me.Label11.Name = "Label11" + Me.Label11.Size = New System.Drawing.Size(134, 13) + Me.Label11.TabIndex = 57 + Me.Label11.Text = "Gruppen-Stammdaten" ' 'TextBox4 ' Me.TextBox4.DataBindings.Add(New System.Windows.Forms.Binding("Tag", Me.TBDD_GROUPSBindingSource, "CHANGED_WHEN", True)) - Me.TextBox4.Location = New System.Drawing.Point(126, 96) + Me.TextBox4.Location = New System.Drawing.Point(658, 119) Me.TextBox4.Name = "TextBox4" Me.TextBox4.ReadOnly = True - Me.TextBox4.Size = New System.Drawing.Size(200, 21) + Me.TextBox4.Size = New System.Drawing.Size(128, 21) Me.TextBox4.TabIndex = 8 ' + 'INTERNALCheckBox + ' + Me.INTERNALCheckBox.DataBindings.Add(New System.Windows.Forms.Binding("CheckState", Me.TBDD_GROUPSBindingSource1, "INTERNAL", True)) + Me.INTERNALCheckBox.Enabled = False + Me.INTERNALCheckBox.Location = New System.Drawing.Point(106, 145) + Me.INTERNALCheckBox.Name = "INTERNALCheckBox" + Me.INTERNALCheckBox.Size = New System.Drawing.Size(104, 24) + Me.INTERNALCheckBox.TabIndex = 9 + Me.INTERNALCheckBox.Text = "Interne Gruppe" + Me.INTERNALCheckBox.UseVisualStyleBackColor = True + ' + 'NAMETextBox1 + ' + Me.NAMETextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_GROUPSBindingSource1, "NAME", True)) + Me.NAMETextBox1.Location = New System.Drawing.Point(106, 64) + Me.NAMETextBox1.Name = "NAMETextBox1" + Me.NAMETextBox1.Size = New System.Drawing.Size(128, 21) + Me.NAMETextBox1.TabIndex = 4 + ' 'TextBox3 ' Me.TextBox3.DataBindings.Add(New System.Windows.Forms.Binding("Tag", Me.TBDD_GROUPSBindingSource, "ADDED_WHEN", True)) - Me.TextBox3.Location = New System.Drawing.Point(126, 42) + Me.TextBox3.Location = New System.Drawing.Point(658, 65) Me.TextBox3.Name = "TextBox3" Me.TextBox3.ReadOnly = True - Me.TextBox3.Size = New System.Drawing.Size(200, 21) + Me.TextBox3.Size = New System.Drawing.Size(128, 21) Me.TextBox3.TabIndex = 8 ' + 'COMMENTTextBox1 + ' + Me.COMMENTTextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_GROUPSBindingSource1, "COMMENT", True)) + Me.COMMENTTextBox1.Location = New System.Drawing.Point(106, 91) + Me.COMMENTTextBox1.Name = "COMMENTTextBox1" + Me.COMMENTTextBox1.Size = New System.Drawing.Size(128, 21) + Me.COMMENTTextBox1.TabIndex = 6 + ' 'ADDED_WHOTextBox1 ' Me.ADDED_WHOTextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_GROUPSBindingSource, "ADDED_WHO", True)) - Me.ADDED_WHOTextBox1.Location = New System.Drawing.Point(126, 14) + Me.ADDED_WHOTextBox1.Location = New System.Drawing.Point(658, 37) Me.ADDED_WHOTextBox1.Name = "ADDED_WHOTextBox1" Me.ADDED_WHOTextBox1.ReadOnly = True - Me.ADDED_WHOTextBox1.Size = New System.Drawing.Size(200, 21) + Me.ADDED_WHOTextBox1.Size = New System.Drawing.Size(128, 21) Me.ADDED_WHOTextBox1.TabIndex = 8 ' - 'CHANGED_WHOTextBox1 - ' - Me.CHANGED_WHOTextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_GROUPSBindingSource, "CHANGED_WHO", True)) - Me.CHANGED_WHOTextBox1.Location = New System.Drawing.Point(126, 68) - Me.CHANGED_WHOTextBox1.Name = "CHANGED_WHOTextBox1" - Me.CHANGED_WHOTextBox1.ReadOnly = True - Me.CHANGED_WHOTextBox1.Size = New System.Drawing.Size(200, 21) - Me.CHANGED_WHOTextBox1.TabIndex = 12 - ' - 'GroupBox2 - ' - Me.GroupBox2.Controls.Add(Me.INTERNALCheckBox) - Me.GroupBox2.Controls.Add(Me.ACTIVECheckBox) - Me.GroupBox2.Controls.Add(Me.AD_SYNCCheckBox) - Me.GroupBox2.Controls.Add(Me.GUIDTextBox1) - Me.GroupBox2.Controls.Add(GUIDLabel1) - Me.GroupBox2.Controls.Add(NAMELabel1) - Me.GroupBox2.Controls.Add(Me.NAMETextBox1) - Me.GroupBox2.Controls.Add(Me.COMMENTTextBox1) - Me.GroupBox2.Controls.Add(COMMENTLabel1) - Me.GroupBox2.Location = New System.Drawing.Point(406, 3) - Me.GroupBox2.Name = "GroupBox2" - Me.GroupBox2.Size = New System.Drawing.Size(561, 205) - Me.GroupBox2.TabIndex = 15 - Me.GroupBox2.TabStop = False - Me.GroupBox2.Text = "Allgemein" - ' - 'INTERNALCheckBox - ' - Me.INTERNALCheckBox.DataBindings.Add(New System.Windows.Forms.Binding("CheckState", Me.TBDD_GROUPSBindingSource1, "INTERNAL", True)) - Me.INTERNALCheckBox.Enabled = False - Me.INTERNALCheckBox.Location = New System.Drawing.Point(126, 155) - Me.INTERNALCheckBox.Name = "INTERNALCheckBox" - Me.INTERNALCheckBox.Size = New System.Drawing.Size(104, 24) - Me.INTERNALCheckBox.TabIndex = 9 - Me.INTERNALCheckBox.Text = "Interne Gruppe" - Me.INTERNALCheckBox.UseVisualStyleBackColor = True - ' 'ACTIVECheckBox ' Me.ACTIVECheckBox.DataBindings.Add(New System.Windows.Forms.Binding("CheckState", Me.TBDD_GROUPSBindingSource1, "ACTIVE", True)) - Me.ACTIVECheckBox.Location = New System.Drawing.Point(126, 125) + Me.ACTIVECheckBox.Location = New System.Drawing.Point(106, 118) Me.ACTIVECheckBox.Name = "ACTIVECheckBox" Me.ACTIVECheckBox.Size = New System.Drawing.Size(104, 24) Me.ACTIVECheckBox.TabIndex = 8 @@ -2306,37 +2322,68 @@ Partial Class frmMain ' Me.AD_SYNCCheckBox.DataBindings.Add(New System.Windows.Forms.Binding("CheckState", Me.TBDD_GROUPSBindingSource1, "AD_SYNC", True)) Me.AD_SYNCCheckBox.Enabled = False - Me.AD_SYNCCheckBox.Location = New System.Drawing.Point(236, 155) + Me.AD_SYNCCheckBox.Location = New System.Drawing.Point(106, 172) Me.AD_SYNCCheckBox.Name = "AD_SYNCCheckBox" - Me.AD_SYNCCheckBox.Size = New System.Drawing.Size(200, 24) + Me.AD_SYNCCheckBox.Size = New System.Drawing.Size(179, 24) Me.AD_SYNCCheckBox.TabIndex = 7 Me.AD_SYNCCheckBox.Text = "Mit Active Directory abgleichen" Me.AD_SYNCCheckBox.UseVisualStyleBackColor = True ' + 'CHANGED_WHOTextBox1 + ' + Me.CHANGED_WHOTextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_GROUPSBindingSource, "CHANGED_WHO", True)) + Me.CHANGED_WHOTextBox1.Location = New System.Drawing.Point(658, 91) + Me.CHANGED_WHOTextBox1.Name = "CHANGED_WHOTextBox1" + Me.CHANGED_WHOTextBox1.ReadOnly = True + Me.CHANGED_WHOTextBox1.Size = New System.Drawing.Size(128, 21) + Me.CHANGED_WHOTextBox1.TabIndex = 12 + ' 'GUIDTextBox1 ' Me.GUIDTextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_GROUPSBindingSource1, "GUID", True)) - Me.GUIDTextBox1.Location = New System.Drawing.Point(126, 14) + Me.GUIDTextBox1.Location = New System.Drawing.Point(106, 37) Me.GUIDTextBox1.Name = "GUIDTextBox1" Me.GUIDTextBox1.ReadOnly = True - Me.GUIDTextBox1.Size = New System.Drawing.Size(200, 21) + Me.GUIDTextBox1.Size = New System.Drawing.Size(128, 21) Me.GUIDTextBox1.TabIndex = 2 ' - 'NAMETextBox1 + 'gridGroups ' - Me.NAMETextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_GROUPSBindingSource1, "NAME", True)) - Me.NAMETextBox1.Location = New System.Drawing.Point(126, 41) - Me.NAMETextBox1.Name = "NAMETextBox1" - Me.NAMETextBox1.Size = New System.Drawing.Size(200, 21) - Me.NAMETextBox1.TabIndex = 4 + Me.gridGroups.DataSource = Me.TBDD_GROUPSBindingSource1 + Me.gridGroups.Dock = System.Windows.Forms.DockStyle.Left + Me.gridGroups.Location = New System.Drawing.Point(0, 0) + Me.gridGroups.MainView = Me.viewGroups + Me.gridGroups.Name = "gridGroups" + Me.gridGroups.Size = New System.Drawing.Size(400, 375) + Me.gridGroups.TabIndex = 17 + Me.gridGroups.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.viewGroups}) ' - 'COMMENTTextBox1 + 'viewGroups ' - Me.COMMENTTextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_GROUPSBindingSource1, "COMMENT", True)) - Me.COMMENTTextBox1.Location = New System.Drawing.Point(126, 68) - Me.COMMENTTextBox1.Name = "COMMENTTextBox1" - Me.COMMENTTextBox1.Size = New System.Drawing.Size(200, 21) - Me.COMMENTTextBox1.TabIndex = 6 + Me.viewGroups.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colNAME5, Me.colCOMMENT1}) + Me.viewGroups.GridControl = Me.gridGroups + Me.viewGroups.Name = "viewGroups" + Me.viewGroups.OptionsBehavior.Editable = False + Me.viewGroups.OptionsBehavior.ReadOnly = True + Me.viewGroups.OptionsDetail.EnableMasterViewMode = False + Me.viewGroups.OptionsView.ShowAutoFilterRow = True + Me.viewGroups.OptionsView.ShowGroupPanel = False + ' + 'colNAME5 + ' + Me.colNAME5.Caption = "Gruppe" + Me.colNAME5.FieldName = "NAME" + Me.colNAME5.Name = "colNAME5" + Me.colNAME5.Visible = True + Me.colNAME5.VisibleIndex = 0 + ' + 'colCOMMENT1 + ' + Me.colCOMMENT1.Caption = "Kommentar" + Me.colCOMMENT1.FieldName = "COMMENT" + Me.colCOMMENT1.Name = "colCOMMENT1" + Me.colCOMMENT1.Visible = True + Me.colCOMMENT1.VisibleIndex = 1 ' 'XtraTabControl3 ' @@ -2375,7 +2422,7 @@ Partial Class frmMain Me.SplitContainer5.Panel2.Controls.Add(Me.Panel12) Me.SplitContainer5.Panel2.Controls.Add(Me.Panel11) Me.SplitContainer5.Size = New System.Drawing.Size(1190, 349) - Me.SplitContainer5.SplitterDistance = 526 + Me.SplitContainer5.SplitterDistance = 435 Me.SplitContainer5.TabIndex = 0 ' 'btnClients_AddGroups @@ -2383,7 +2430,7 @@ Partial Class frmMain Me.btnClients_AddGroups.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.btnClients_AddGroups.Image = Global.DDUserManager.My.Resources.Resources.arrow_right Me.btnClients_AddGroups.ImageAlign = System.Drawing.ContentAlignment.MiddleRight - Me.btnClients_AddGroups.Location = New System.Drawing.Point(497, 108) + Me.btnClients_AddGroups.Location = New System.Drawing.Point(329, 108) Me.btnClients_AddGroups.Name = "btnClients_AddGroups" Me.btnClients_AddGroups.Size = New System.Drawing.Size(103, 50) Me.btnClients_AddGroups.TabIndex = 15 @@ -2395,7 +2442,7 @@ Partial Class frmMain Me.btnClients_RemoveGroups.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.btnClients_RemoveGroups.Image = Global.DDUserManager.My.Resources.Resources.arrow_left_red Me.btnClients_RemoveGroups.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.btnClients_RemoveGroups.Location = New System.Drawing.Point(498, 164) + Me.btnClients_RemoveGroups.Location = New System.Drawing.Point(330, 164) Me.btnClients_RemoveGroups.Name = "btnClients_RemoveGroups" Me.btnClients_RemoveGroups.Size = New System.Drawing.Size(103, 50) Me.btnClients_RemoveGroups.TabIndex = 14 @@ -2411,7 +2458,7 @@ Partial Class frmMain Me.Panel10.Controls.Add(Me.Label5) Me.Panel10.Location = New System.Drawing.Point(0, 0) Me.Panel10.Name = "Panel10" - Me.Panel10.Size = New System.Drawing.Size(489, 366) + Me.Panel10.Size = New System.Drawing.Size(320, 366) Me.Panel10.TabIndex = 0 ' 'gridClientsGroups_AvailableGroups @@ -2421,7 +2468,7 @@ Partial Class frmMain Me.gridClientsGroups_AvailableGroups.Location = New System.Drawing.Point(0, 30) Me.gridClientsGroups_AvailableGroups.MainView = Me.viewClientsGroups_AvailableGroups Me.gridClientsGroups_AvailableGroups.Name = "gridClientsGroups_AvailableGroups" - Me.gridClientsGroups_AvailableGroups.Size = New System.Drawing.Size(489, 336) + Me.gridClientsGroups_AvailableGroups.Size = New System.Drawing.Size(320, 336) Me.gridClientsGroups_AvailableGroups.TabIndex = 0 Me.gridClientsGroups_AvailableGroups.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.viewClientsGroups_AvailableGroups}) ' @@ -2461,7 +2508,7 @@ Partial Class frmMain Me.Label5.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.Location = New System.Drawing.Point(0, 0) Me.Label5.Name = "Label5" - Me.Label5.Size = New System.Drawing.Size(489, 30) + Me.Label5.Size = New System.Drawing.Size(320, 30) Me.Label5.TabIndex = 1 Me.Label5.Text = "Nicht zugeordnete Gruppen:" Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -2473,7 +2520,7 @@ Partial Class frmMain Me.Panel12.Dock = System.Windows.Forms.DockStyle.Fill Me.Panel12.Location = New System.Drawing.Point(326, 0) Me.Panel12.Name = "Panel12" - Me.Panel12.Size = New System.Drawing.Size(334, 349) + Me.Panel12.Size = New System.Drawing.Size(425, 349) Me.Panel12.TabIndex = 0 ' 'gridClientsGroups_AssignedGroups @@ -2483,7 +2530,7 @@ Partial Class frmMain Me.gridClientsGroups_AssignedGroups.Location = New System.Drawing.Point(0, 30) Me.gridClientsGroups_AssignedGroups.MainView = Me.viewClientsGroups_AssignedGroups Me.gridClientsGroups_AssignedGroups.Name = "gridClientsGroups_AssignedGroups" - Me.gridClientsGroups_AssignedGroups.Size = New System.Drawing.Size(334, 319) + Me.gridClientsGroups_AssignedGroups.Size = New System.Drawing.Size(425, 319) Me.gridClientsGroups_AssignedGroups.TabIndex = 0 Me.gridClientsGroups_AssignedGroups.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.viewClientsGroups_AssignedGroups}) ' @@ -2524,7 +2571,7 @@ Partial Class frmMain Me.labelClients_AssignedGroups.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.labelClients_AssignedGroups.Location = New System.Drawing.Point(0, 0) Me.labelClients_AssignedGroups.Name = "labelClients_AssignedGroups" - Me.labelClients_AssignedGroups.Size = New System.Drawing.Size(334, 30) + Me.labelClients_AssignedGroups.Size = New System.Drawing.Size(425, 30) Me.labelClients_AssignedGroups.TabIndex = 1 Me.labelClients_AssignedGroups.Text = "Zugeordnete Gruppen zu Mandant {0}" Me.labelClients_AssignedGroups.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -2951,15 +2998,129 @@ Partial Class frmMain ' 'tabPageClients ' + Me.tabPageClients.Controls.Add(Me.Panel17) Me.tabPageClients.Controls.Add(Me.gridClients) Me.tabPageClients.Controls.Add(Me.TBDD_CLIENTBindingNavigator) - Me.tabPageClients.Controls.Add(Me.GroupBox6) - Me.tabPageClients.Controls.Add(Me.GroupBox5) Me.tabPageClients.Image = Global.DDUserManager.My.Resources.Resources.book Me.tabPageClients.Name = "tabPageClients" Me.tabPageClients.Size = New System.Drawing.Size(1193, 784) Me.tabPageClients.Text = "Mandanten" ' + 'Panel17 + ' + Me.Panel17.Controls.Add(Me.Label18) + Me.Panel17.Controls.Add(Me.Label17) + Me.Panel17.Controls.Add(GUIDLabel2) + Me.Panel17.Controls.Add(ADDED_WHENLabel2) + Me.Panel17.Controls.Add(Me.GUIDTextBox2) + Me.Panel17.Controls.Add(CHANGED_WHENLabel2) + Me.Panel17.Controls.Add(COMMENTLabel2) + Me.Panel17.Controls.Add(Me.CLIENT_NAMETextBox) + Me.Panel17.Controls.Add(CHANGED_WHOLabel2) + Me.Panel17.Controls.Add(CLIENT_NAMELabel) + Me.Panel17.Controls.Add(Me.CHANGED_WHOTextBox2) + Me.Panel17.Controls.Add(Me.SHORTNAMETextBox1) + Me.Panel17.Controls.Add(SHORTNAMELabel1) + Me.Panel17.Controls.Add(Me.TextBox6) + Me.Panel17.Controls.Add(Me.COMMENTTextBox2) + Me.Panel17.Controls.Add(ADDED_WHOLabel2) + Me.Panel17.Controls.Add(Me.TextBox5) + Me.Panel17.Controls.Add(Me.ADDED_WHOTextBox2) + Me.Panel17.Dock = System.Windows.Forms.DockStyle.Fill + Me.Panel17.Location = New System.Drawing.Point(400, 25) + Me.Panel17.Name = "Panel17" + Me.Panel17.Size = New System.Drawing.Size(793, 759) + Me.Panel17.TabIndex = 20 + ' + 'Label18 + ' + Me.Label18.AutoSize = True + Me.Label18.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label18.Location = New System.Drawing.Point(538, 10) + Me.Label18.Name = "Label18" + Me.Label18.Size = New System.Drawing.Size(156, 13) + Me.Label18.TabIndex = 57 + Me.Label18.Text = "Zusätzliche Informationen" + ' + 'Label17 + ' + Me.Label17.AutoSize = True + Me.Label17.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label17.Location = New System.Drawing.Point(21, 10) + Me.Label17.Name = "Label17" + Me.Label17.Size = New System.Drawing.Size(150, 13) + Me.Label17.TabIndex = 57 + Me.Label17.Text = "Mandanten-Stammdaten" + ' + 'GUIDTextBox2 + ' + Me.GUIDTextBox2.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_CLIENTBindingSource, "GUID", True)) + Me.GUIDTextBox2.Location = New System.Drawing.Point(106, 37) + Me.GUIDTextBox2.Name = "GUIDTextBox2" + Me.GUIDTextBox2.ReadOnly = True + Me.GUIDTextBox2.Size = New System.Drawing.Size(109, 21) + Me.GUIDTextBox2.TabIndex = 1 + ' + 'CLIENT_NAMETextBox + ' + Me.CLIENT_NAMETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_CLIENTBindingSource, "CLIENT_NAME", True)) + Me.CLIENT_NAMETextBox.Location = New System.Drawing.Point(106, 64) + Me.CLIENT_NAMETextBox.Name = "CLIENT_NAMETextBox" + Me.CLIENT_NAMETextBox.Size = New System.Drawing.Size(109, 21) + Me.CLIENT_NAMETextBox.TabIndex = 3 + ' + 'CHANGED_WHOTextBox2 + ' + Me.CHANGED_WHOTextBox2.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_CLIENTBindingSource, "CHANGED_WHO", True)) + Me.CHANGED_WHOTextBox2.Location = New System.Drawing.Point(646, 91) + Me.CHANGED_WHOTextBox2.Name = "CHANGED_WHOTextBox2" + Me.CHANGED_WHOTextBox2.ReadOnly = True + Me.CHANGED_WHOTextBox2.Size = New System.Drawing.Size(100, 21) + Me.CHANGED_WHOTextBox2.TabIndex = 3 + ' + 'SHORTNAMETextBox1 + ' + Me.SHORTNAMETextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_CLIENTBindingSource, "SHORTNAME", True)) + Me.SHORTNAMETextBox1.Location = New System.Drawing.Point(106, 91) + Me.SHORTNAMETextBox1.Name = "SHORTNAMETextBox1" + Me.SHORTNAMETextBox1.Size = New System.Drawing.Size(109, 21) + Me.SHORTNAMETextBox1.TabIndex = 5 + ' + 'TextBox6 + ' + Me.TextBox6.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_CLIENTBindingSource, "CHANGED_WHEN", True)) + Me.TextBox6.Location = New System.Drawing.Point(646, 118) + Me.TextBox6.Name = "TextBox6" + Me.TextBox6.ReadOnly = True + Me.TextBox6.Size = New System.Drawing.Size(100, 21) + Me.TextBox6.TabIndex = 1 + ' + 'COMMENTTextBox2 + ' + Me.COMMENTTextBox2.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_CLIENTBindingSource, "COMMENT", True)) + Me.COMMENTTextBox2.Location = New System.Drawing.Point(106, 118) + Me.COMMENTTextBox2.Name = "COMMENTTextBox2" + Me.COMMENTTextBox2.Size = New System.Drawing.Size(109, 21) + Me.COMMENTTextBox2.TabIndex = 7 + ' + 'TextBox5 + ' + Me.TextBox5.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_CLIENTBindingSource, "ADDED_WHEN", True)) + Me.TextBox5.Location = New System.Drawing.Point(646, 64) + Me.TextBox5.Name = "TextBox5" + Me.TextBox5.ReadOnly = True + Me.TextBox5.Size = New System.Drawing.Size(100, 21) + Me.TextBox5.TabIndex = 1 + ' + 'ADDED_WHOTextBox2 + ' + Me.ADDED_WHOTextBox2.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_CLIENTBindingSource, "ADDED_WHO", True)) + Me.ADDED_WHOTextBox2.Location = New System.Drawing.Point(646, 37) + Me.ADDED_WHOTextBox2.Name = "ADDED_WHOTextBox2" + Me.ADDED_WHOTextBox2.ReadOnly = True + Me.ADDED_WHOTextBox2.Size = New System.Drawing.Size(100, 21) + Me.ADDED_WHOTextBox2.TabIndex = 1 + ' 'gridClients ' Me.gridClients.DataSource = Me.TBDD_CLIENTBindingSource @@ -3118,125 +3279,78 @@ Partial Class frmMain Me.TBDD_CLIENTBindingNavigatorSaveItem.Size = New System.Drawing.Size(23, 22) Me.TBDD_CLIENTBindingNavigatorSaveItem.Text = "Daten speichern" ' - 'GroupBox6 - ' - Me.GroupBox6.Controls.Add(ADDED_WHENLabel2) - Me.GroupBox6.Controls.Add(CHANGED_WHENLabel2) - Me.GroupBox6.Controls.Add(CHANGED_WHOLabel2) - Me.GroupBox6.Controls.Add(Me.CHANGED_WHOTextBox2) - Me.GroupBox6.Controls.Add(Me.TextBox6) - Me.GroupBox6.Controls.Add(ADDED_WHOLabel2) - Me.GroupBox6.Controls.Add(Me.TextBox5) - Me.GroupBox6.Controls.Add(Me.ADDED_WHOTextBox2) - Me.GroupBox6.Location = New System.Drawing.Point(406, 189) - Me.GroupBox6.Name = "GroupBox6" - Me.GroupBox6.Size = New System.Drawing.Size(372, 149) - Me.GroupBox6.TabIndex = 3 - Me.GroupBox6.TabStop = False - Me.GroupBox6.Text = "Informationen" - ' - 'CHANGED_WHOTextBox2 - ' - Me.CHANGED_WHOTextBox2.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_CLIENTBindingSource, "CHANGED_WHO", True)) - Me.CHANGED_WHOTextBox2.Location = New System.Drawing.Point(114, 74) - Me.CHANGED_WHOTextBox2.Name = "CHANGED_WHOTextBox2" - Me.CHANGED_WHOTextBox2.ReadOnly = True - Me.CHANGED_WHOTextBox2.Size = New System.Drawing.Size(100, 21) - Me.CHANGED_WHOTextBox2.TabIndex = 3 - ' - 'TextBox6 - ' - Me.TextBox6.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_CLIENTBindingSource, "CHANGED_WHEN", True)) - Me.TextBox6.Location = New System.Drawing.Point(114, 101) - Me.TextBox6.Name = "TextBox6" - Me.TextBox6.ReadOnly = True - Me.TextBox6.Size = New System.Drawing.Size(100, 21) - Me.TextBox6.TabIndex = 1 - ' - 'TextBox5 - ' - Me.TextBox5.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_CLIENTBindingSource, "ADDED_WHEN", True)) - Me.TextBox5.Location = New System.Drawing.Point(114, 47) - Me.TextBox5.Name = "TextBox5" - Me.TextBox5.ReadOnly = True - Me.TextBox5.Size = New System.Drawing.Size(100, 21) - Me.TextBox5.TabIndex = 1 - ' - 'ADDED_WHOTextBox2 - ' - Me.ADDED_WHOTextBox2.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_CLIENTBindingSource, "ADDED_WHO", True)) - Me.ADDED_WHOTextBox2.Location = New System.Drawing.Point(114, 20) - Me.ADDED_WHOTextBox2.Name = "ADDED_WHOTextBox2" - Me.ADDED_WHOTextBox2.ReadOnly = True - Me.ADDED_WHOTextBox2.Size = New System.Drawing.Size(100, 21) - Me.ADDED_WHOTextBox2.TabIndex = 1 - ' - 'GroupBox5 - ' - Me.GroupBox5.Controls.Add(COMMENTLabel2) - Me.GroupBox5.Controls.Add(Me.COMMENTTextBox2) - Me.GroupBox5.Controls.Add(SHORTNAMELabel1) - Me.GroupBox5.Controls.Add(Me.SHORTNAMETextBox1) - Me.GroupBox5.Controls.Add(CLIENT_NAMELabel) - Me.GroupBox5.Controls.Add(Me.CLIENT_NAMETextBox) - Me.GroupBox5.Controls.Add(GUIDLabel2) - Me.GroupBox5.Controls.Add(Me.GUIDTextBox2) - Me.GroupBox5.Location = New System.Drawing.Point(406, 28) - Me.GroupBox5.Name = "GroupBox5" - Me.GroupBox5.Size = New System.Drawing.Size(372, 155) - Me.GroupBox5.TabIndex = 0 - Me.GroupBox5.TabStop = False - Me.GroupBox5.Text = "Allgemein" + 'tabPageModules ' - 'COMMENTTextBox2 + Me.tabPageModules.Controls.Add(Me.Panel18) + Me.tabPageModules.Controls.Add(Me.gridModules) + Me.tabPageModules.Controls.Add(Me.TBDD_MODULESBindingNavigator) + Me.tabPageModules.Image = Global.DDUserManager.My.Resources.Resources.plugin + Me.tabPageModules.Name = "tabPageModules" + Me.tabPageModules.Size = New System.Drawing.Size(1193, 784) + Me.tabPageModules.Text = "Module" ' - Me.COMMENTTextBox2.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_CLIENTBindingSource, "COMMENT", True)) - Me.COMMENTTextBox2.Location = New System.Drawing.Point(97, 95) - Me.COMMENTTextBox2.Name = "COMMENTTextBox2" - Me.COMMENTTextBox2.Size = New System.Drawing.Size(100, 21) - Me.COMMENTTextBox2.TabIndex = 7 + 'Panel18 + ' + Me.Panel18.Controls.Add(Me.Label19) + Me.Panel18.Controls.Add(GUIDLabel3) + Me.Panel18.Controls.Add(Me.PRODUCT_VERSIONTextBox) + Me.Panel18.Controls.Add(PRODUCT_VERSIONLabel) + Me.Panel18.Controls.Add(Me.SHORT_NAMETextBox) + Me.Panel18.Controls.Add(Me.GUIDTextBox3) + Me.Panel18.Controls.Add(SHORT_NAMELabel) + Me.Panel18.Controls.Add(NAMELabel2) + Me.Panel18.Controls.Add(Me.NAMETextBox2) + Me.Panel18.Dock = System.Windows.Forms.DockStyle.Fill + Me.Panel18.Location = New System.Drawing.Point(400, 25) + Me.Panel18.Name = "Panel18" + Me.Panel18.Size = New System.Drawing.Size(793, 759) + Me.Panel18.TabIndex = 40 + ' + 'Label19 + ' + Me.Label19.AutoSize = True + Me.Label19.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label19.Location = New System.Drawing.Point(21, 10) + Me.Label19.Name = "Label19" + Me.Label19.Size = New System.Drawing.Size(118, 13) + Me.Label19.TabIndex = 10 + Me.Label19.Text = "Modul Stammdaten" ' - 'SHORTNAMETextBox1 + 'PRODUCT_VERSIONTextBox ' - Me.SHORTNAMETextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_CLIENTBindingSource, "SHORTNAME", True)) - Me.SHORTNAMETextBox1.Location = New System.Drawing.Point(97, 68) - Me.SHORTNAMETextBox1.Name = "SHORTNAMETextBox1" - Me.SHORTNAMETextBox1.Size = New System.Drawing.Size(100, 21) - Me.SHORTNAMETextBox1.TabIndex = 5 + Me.PRODUCT_VERSIONTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_MODULESBindingSource, "PRODUCT_VERSION", True)) + Me.PRODUCT_VERSIONTextBox.Location = New System.Drawing.Point(87, 116) + Me.PRODUCT_VERSIONTextBox.Name = "PRODUCT_VERSIONTextBox" + Me.PRODUCT_VERSIONTextBox.ReadOnly = True + Me.PRODUCT_VERSIONTextBox.Size = New System.Drawing.Size(200, 21) + Me.PRODUCT_VERSIONTextBox.TabIndex = 9 ' - 'CLIENT_NAMETextBox + 'SHORT_NAMETextBox ' - Me.CLIENT_NAMETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_CLIENTBindingSource, "CLIENT_NAME", True)) - Me.CLIENT_NAMETextBox.Location = New System.Drawing.Point(97, 41) - Me.CLIENT_NAMETextBox.Name = "CLIENT_NAMETextBox" - Me.CLIENT_NAMETextBox.Size = New System.Drawing.Size(100, 21) - Me.CLIENT_NAMETextBox.TabIndex = 3 + Me.SHORT_NAMETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_MODULESBindingSource, "SHORT_NAME", True)) + Me.SHORT_NAMETextBox.Location = New System.Drawing.Point(87, 89) + Me.SHORT_NAMETextBox.Name = "SHORT_NAMETextBox" + Me.SHORT_NAMETextBox.ReadOnly = True + Me.SHORT_NAMETextBox.Size = New System.Drawing.Size(200, 21) + Me.SHORT_NAMETextBox.TabIndex = 5 ' - 'GUIDTextBox2 + 'GUIDTextBox3 ' - Me.GUIDTextBox2.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_CLIENTBindingSource, "GUID", True)) - Me.GUIDTextBox2.Location = New System.Drawing.Point(97, 14) - Me.GUIDTextBox2.Name = "GUIDTextBox2" - Me.GUIDTextBox2.ReadOnly = True - Me.GUIDTextBox2.Size = New System.Drawing.Size(100, 21) - Me.GUIDTextBox2.TabIndex = 1 + Me.GUIDTextBox3.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_MODULESBindingSource, "GUID", True)) + Me.GUIDTextBox3.Location = New System.Drawing.Point(87, 35) + Me.GUIDTextBox3.Name = "GUIDTextBox3" + Me.GUIDTextBox3.ReadOnly = True + Me.GUIDTextBox3.Size = New System.Drawing.Size(200, 21) + Me.GUIDTextBox3.TabIndex = 1 ' - 'tabPageModules + 'NAMETextBox2 ' - Me.tabPageModules.Controls.Add(Me.gridModules) - Me.tabPageModules.Controls.Add(Me.TBDD_MODULESBindingNavigator) - Me.tabPageModules.Controls.Add(GUIDLabel3) - Me.tabPageModules.Controls.Add(Me.GUIDTextBox3) - Me.tabPageModules.Controls.Add(NAMELabel2) - Me.tabPageModules.Controls.Add(Me.NAMETextBox2) - Me.tabPageModules.Controls.Add(SHORT_NAMELabel) - Me.tabPageModules.Controls.Add(Me.SHORT_NAMETextBox) - Me.tabPageModules.Controls.Add(PRODUCT_VERSIONLabel) - Me.tabPageModules.Controls.Add(Me.PRODUCT_VERSIONTextBox) - Me.tabPageModules.Image = Global.DDUserManager.My.Resources.Resources.plugin - Me.tabPageModules.Name = "tabPageModules" - Me.tabPageModules.Size = New System.Drawing.Size(1193, 784) - Me.tabPageModules.Text = "Module" + Me.NAMETextBox2.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_MODULESBindingSource, "NAME", True)) + Me.NAMETextBox2.Location = New System.Drawing.Point(87, 62) + Me.NAMETextBox2.Name = "NAMETextBox2" + Me.NAMETextBox2.ReadOnly = True + Me.NAMETextBox2.Size = New System.Drawing.Size(200, 21) + Me.NAMETextBox2.TabIndex = 3 ' 'gridModules ' @@ -3370,42 +3484,6 @@ Partial Class frmMain Me.BindingNavigatorSeparator11.Name = "BindingNavigatorSeparator11" Me.BindingNavigatorSeparator11.Size = New System.Drawing.Size(6, 25) ' - 'GUIDTextBox3 - ' - Me.GUIDTextBox3.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_MODULESBindingSource, "GUID", True)) - Me.GUIDTextBox3.Location = New System.Drawing.Point(476, 28) - Me.GUIDTextBox3.Name = "GUIDTextBox3" - Me.GUIDTextBox3.ReadOnly = True - Me.GUIDTextBox3.Size = New System.Drawing.Size(200, 21) - Me.GUIDTextBox3.TabIndex = 1 - ' - 'NAMETextBox2 - ' - Me.NAMETextBox2.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_MODULESBindingSource, "NAME", True)) - Me.NAMETextBox2.Location = New System.Drawing.Point(476, 55) - Me.NAMETextBox2.Name = "NAMETextBox2" - Me.NAMETextBox2.ReadOnly = True - Me.NAMETextBox2.Size = New System.Drawing.Size(200, 21) - Me.NAMETextBox2.TabIndex = 3 - ' - 'SHORT_NAMETextBox - ' - Me.SHORT_NAMETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_MODULESBindingSource, "SHORT_NAME", True)) - Me.SHORT_NAMETextBox.Location = New System.Drawing.Point(476, 82) - Me.SHORT_NAMETextBox.Name = "SHORT_NAMETextBox" - Me.SHORT_NAMETextBox.ReadOnly = True - Me.SHORT_NAMETextBox.Size = New System.Drawing.Size(200, 21) - Me.SHORT_NAMETextBox.TabIndex = 5 - ' - 'PRODUCT_VERSIONTextBox - ' - Me.PRODUCT_VERSIONTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBDD_MODULESBindingSource, "PRODUCT_VERSION", True)) - Me.PRODUCT_VERSIONTextBox.Location = New System.Drawing.Point(476, 109) - Me.PRODUCT_VERSIONTextBox.Name = "PRODUCT_VERSIONTextBox" - Me.PRODUCT_VERSIONTextBox.ReadOnly = True - Me.PRODUCT_VERSIONTextBox.Size = New System.Drawing.Size(200, 21) - Me.PRODUCT_VERSIONTextBox.TabIndex = 9 - ' 'tabPageRights ' Me.tabPageRights.Image = Global.DDUserManager.My.Resources.Resources.key @@ -3416,12 +3494,85 @@ Partial Class frmMain ' 'tabPageSettings ' + Me.tabPageSettings.Controls.Add(Me.Button2) + Me.tabPageSettings.Controls.Add(Me.GroupBox1) + Me.tabPageSettings.Controls.Add(Me.btnOpenLogDir) + Me.tabPageSettings.Controls.Add(Me.btnOpenConfigDir) Me.tabPageSettings.Controls.Add(Me.btnConfigConnections) Me.tabPageSettings.Image = Global.DDUserManager.My.Resources.Resources.cog Me.tabPageSettings.Name = "tabPageSettings" Me.tabPageSettings.Size = New System.Drawing.Size(1193, 784) Me.tabPageSettings.Text = "Einstellungen" ' + 'Button2 + ' + Me.Button2.Image = Global.DDUserManager.My.Resources.Resources.help + Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.Button2.Location = New System.Drawing.Point(11, 70) + Me.Button2.Name = "Button2" + Me.Button2.Size = New System.Drawing.Size(167, 47) + Me.Button2.TabIndex = 6 + Me.Button2.Text = "Support Tool aufrufen" + Me.Button2.UseVisualStyleBackColor = True + ' + 'GroupBox1 + ' + Me.GroupBox1.Controls.Add(Me.btnADConnectionTest) + Me.GroupBox1.Controls.Add(Me.txtADRootNode) + Me.GroupBox1.Controls.Add(Me.lblADRootNode) + Me.GroupBox1.Location = New System.Drawing.Point(11, 143) + Me.GroupBox1.Name = "GroupBox1" + Me.GroupBox1.Size = New System.Drawing.Size(456, 134) + Me.GroupBox1.TabIndex = 5 + Me.GroupBox1.TabStop = False + Me.GroupBox1.Text = "Alternativer LDAP Abfrage Pfad" + ' + 'btnADConnectionTest + ' + Me.btnADConnectionTest.Location = New System.Drawing.Point(312, 96) + Me.btnADConnectionTest.Name = "btnADConnectionTest" + Me.btnADConnectionTest.Size = New System.Drawing.Size(138, 23) + Me.btnADConnectionTest.TabIndex = 6 + Me.btnADConnectionTest.Text = "Verbindungstest" + Me.btnADConnectionTest.UseVisualStyleBackColor = True + ' + 'txtADRootNode + ' + Me.txtADRootNode.Location = New System.Drawing.Point(6, 53) + Me.txtADRootNode.Name = "txtADRootNode" + Me.txtADRootNode.Size = New System.Drawing.Size(444, 21) + Me.txtADRootNode.TabIndex = 2 + ' + 'lblADRootNode + ' + Me.lblADRootNode.Location = New System.Drawing.Point(6, 17) + Me.lblADRootNode.Name = "lblADRootNode" + Me.lblADRootNode.Size = New System.Drawing.Size(444, 33) + Me.lblADRootNode.TabIndex = 4 + Me.lblADRootNode.Text = "Standardmäßig wird folgender Pfad verwendet: LDAP://{0}" + ' + 'btnOpenLogDir + ' + Me.btnOpenLogDir.Image = Global.DDUserManager.My.Resources.Resources.folder + Me.btnOpenLogDir.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.btnOpenLogDir.Location = New System.Drawing.Point(263, 70) + Me.btnOpenLogDir.Name = "btnOpenLogDir" + Me.btnOpenLogDir.Size = New System.Drawing.Size(204, 47) + Me.btnOpenLogDir.TabIndex = 1 + Me.btnOpenLogDir.Text = "Log Verzeichnis öffnen" + Me.btnOpenLogDir.UseVisualStyleBackColor = True + ' + 'btnOpenConfigDir + ' + Me.btnOpenConfigDir.Image = Global.DDUserManager.My.Resources.Resources.folder + Me.btnOpenConfigDir.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.btnOpenConfigDir.Location = New System.Drawing.Point(263, 17) + Me.btnOpenConfigDir.Name = "btnOpenConfigDir" + Me.btnOpenConfigDir.Size = New System.Drawing.Size(204, 47) + Me.btnOpenConfigDir.TabIndex = 1 + Me.btnOpenConfigDir.Text = "Konfigurations Verzeichnis öffnen" + Me.btnOpenConfigDir.UseVisualStyleBackColor = True + ' 'btnConfigConnections ' Me.btnConfigConnections.Image = Global.DDUserManager.My.Resources.Resources.database_connect @@ -3484,7 +3635,7 @@ Partial Class frmMain ' 'StatusStrip1 ' - Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsLabelUser, Me.tsLabelSaved}) + Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsLabelUser, Me.tsLabelSaved, Me.tsLabelVersion}) Me.StatusStrip1.Location = New System.Drawing.Point(0, 815) Me.StatusStrip1.Name = "StatusStrip1" Me.StatusStrip1.Size = New System.Drawing.Size(1199, 22) @@ -3506,6 +3657,12 @@ Partial Class frmMain Me.tsLabelSaved.Text = "tsLabelSaved" Me.tsLabelSaved.Visible = False ' + 'tsLabelVersion + ' + Me.tsLabelVersion.Name = "tsLabelVersion" + Me.tsLabelVersion.Size = New System.Drawing.Size(82, 17) + Me.tsLabelVersion.Text = "tsLabelVersion" + ' 'TBDD_GROUPS_MODULESTableAdapter ' Me.TBDD_GROUPS_MODULESTableAdapter.ClearBeforeFill = True @@ -3626,12 +3783,10 @@ Partial Class frmMain Me.SplitContainer3.Panel2.ResumeLayout(False) CType(Me.SplitContainer3, System.ComponentModel.ISupportInitialize).EndInit() Me.SplitContainer3.ResumeLayout(False) + Me.Panel16.ResumeLayout(False) + Me.Panel16.PerformLayout() CType(Me.gridGroups, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.viewGroups, System.ComponentModel.ISupportInitialize).EndInit() - Me.GroupBox4.ResumeLayout(False) - Me.GroupBox4.PerformLayout() - Me.GroupBox2.ResumeLayout(False) - Me.GroupBox2.PerformLayout() CType(Me.XtraTabControl3, System.ComponentModel.ISupportInitialize).EndInit() Me.XtraTabControl3.ResumeLayout(False) Me.XtraTabPage1.ResumeLayout(False) @@ -3667,23 +3822,25 @@ Partial Class frmMain Me.TBDD_GROUPSBindingNavigator.PerformLayout() Me.tabPageClients.ResumeLayout(False) Me.tabPageClients.PerformLayout() + Me.Panel17.ResumeLayout(False) + Me.Panel17.PerformLayout() CType(Me.gridClients, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.GridView4, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TBDD_CLIENTBindingNavigator, System.ComponentModel.ISupportInitialize).EndInit() Me.TBDD_CLIENTBindingNavigator.ResumeLayout(False) Me.TBDD_CLIENTBindingNavigator.PerformLayout() - Me.GroupBox6.ResumeLayout(False) - Me.GroupBox6.PerformLayout() - Me.GroupBox5.ResumeLayout(False) - Me.GroupBox5.PerformLayout() Me.tabPageModules.ResumeLayout(False) Me.tabPageModules.PerformLayout() + Me.Panel18.ResumeLayout(False) + Me.Panel18.PerformLayout() CType(Me.gridModules, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.GridView5, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TBDD_MODULESBindingNavigator, System.ComponentModel.ISupportInitialize).EndInit() Me.TBDD_MODULESBindingNavigator.ResumeLayout(False) Me.TBDD_MODULESBindingNavigator.PerformLayout() Me.tabPageSettings.ResumeLayout(False) + Me.GroupBox1.ResumeLayout(False) + Me.GroupBox1.PerformLayout() CType(Me.TBDD_GROUPS_USERBindingSource, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TBDD_CLIENT_USERBindingSource, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TBDD_USER_MODULESBindingSource, System.ComponentModel.ISupportInitialize).EndInit() @@ -3753,14 +3910,10 @@ Partial Class frmMain Friend WithEvents BindingNavigatorMoveLastItem1 As ToolStripButton Friend WithEvents BindingNavigatorSeparator5 As ToolStripSeparator Friend WithEvents GUIDTextBox1 As TextBox - Friend WithEvents GroupBox4 As GroupBox Friend WithEvents ADDED_WHOTextBox1 As TextBox Friend WithEvents CHANGED_WHOTextBox1 As TextBox - Friend WithEvents GroupBox2 As GroupBox Friend WithEvents NAMETextBox1 As TextBox Friend WithEvents COMMENTTextBox1 As TextBox - Friend WithEvents GroupBox6 As GroupBox - Friend WithEvents GroupBox5 As GroupBox Friend WithEvents COMMENTTextBox2 As TextBox Friend WithEvents SHORTNAMETextBox1 As TextBox Friend WithEvents CLIENT_NAMETextBox As TextBox @@ -3976,4 +4129,22 @@ Partial Class frmMain Friend WithEvents TBDD_GROUPS_USERTableAdapter As UserDataSetTableAdapters.TBDD_GROUPS_USERTableAdapter Friend WithEvents LANGUAGEComboBox As ComboBox Friend WithEvents btnConfigConnections As Button + Friend WithEvents tsLabelVersion As ToolStripStatusLabel + Friend WithEvents Label4 As Label + Friend WithEvents Label8 As Label + Friend WithEvents Panel16 As Panel + Friend WithEvents Label14 As Label + Friend WithEvents Label11 As Label + Friend WithEvents Panel17 As Panel + Friend WithEvents Label18 As Label + Friend WithEvents Label17 As Label + Friend WithEvents Panel18 As Panel + Friend WithEvents Label19 As Label + Friend WithEvents btnOpenLogDir As Button + Friend WithEvents btnOpenConfigDir As Button + Friend WithEvents txtADRootNode As TextBox + Friend WithEvents lblADRootNode As Label + Friend WithEvents GroupBox1 As GroupBox + Friend WithEvents btnADConnectionTest As Button + Friend WithEvents Button2 As Button End Class diff --git a/DDUserManager/DDUserManager/frmMain.resx b/DDUserManager/DDUserManager/frmMain.resx index 3c5e5c9..b72d482 100644 --- a/DDUserManager/DDUserManager/frmMain.resx +++ b/DDUserManager/DDUserManager/frmMain.resx @@ -213,12 +213,39 @@ False + + 693, 17 + + + 17, 95 + + + 247, 95 + + + 909, 95 + + + 136, 17 + + + 469, 95 + + + 489, 56 + + + 911, 56 + 136, 17 17, 17 + + 17, 17 + 469, 95 @@ -234,6 +261,9 @@ 906, 134 + + 906, 134 + 693, 17 diff --git a/DDUserManager/DDUserManager/frmMain.vb b/DDUserManager/DDUserManager/frmMain.vb index 6770c8b..615230f 100644 --- a/DDUserManager/DDUserManager/frmMain.vb +++ b/DDUserManager/DDUserManager/frmMain.vb @@ -10,20 +10,34 @@ Imports DD_LIB_Standards ''' https://stackoverflow.com/questions/21270697/argumentoutofrangeexception-with-data-binding-when-debugger-is-running-vs2010#28550637 ''' Public Class frmMain + Private Const MODULE_NAME As String = "UserManager" + Private CurrentUser As TBDD_USERRow = Nothing + Private CurrentUserId As Integer + Private DragDropManager As ClassDragDrop = Nothing + Private Shared logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger() + Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load + NLog.LogManager.Configuration = ClassNLog.GetLoggerConfigFor(MODULE_NAME) + + logger.Info("Starting UserManager v" & Application.ProductVersion) + logger.Info($"Current Username: {Environment.UserName}") + If InitDatabase() = False Then MsgBox($"Unexpected error in Database Init(1). {vbCrLf & vbCrLf}Please contact Your admin.", MsgBoxStyle.Critical, "UserManager") + logger.Fatal($"Unexpected error in Database Init(1). {vbCrLf & vbCrLf}Please contact Your admin.") Application.Exit() Exit Sub End If If MyConnectionString = "" Then MsgBox($"Unexpected error in Database Init(2). {vbCrLf & vbCrLf}Please contact Your admin.", MsgBoxStyle.Critical, "UserManager") + logger.Fatal($"Unexpected error in Database Init(2). {vbCrLf & vbCrLf}Please contact Your admin.") Application.Exit() Exit Sub End If + TBDD_CLIENTTableAdapter.Connection.ConnectionString = MyConnectionString TBDD_CLIENT_USERTableAdapter.Connection.ConnectionString = MyConnectionString TBDD_GROUPSTableAdapter.Connection.ConnectionString = MyConnectionString @@ -39,11 +53,18 @@ Public Class frmMain Dim DT_CHECKUSER_MODULE As DataTable = clsDatabase.Return_Datatable(sql) If DT_CHECKUSER_MODULE.Rows.Count = 1 Then - USER_ID = DT_CHECKUSER_MODULE.Rows(0).Item("USER_ID") + Dim userRow As TBDD_USERRow = GetCurrentUserRow(Environment.UserName) + tsLabelUser.Text = $"Angemeldeter Benutzer: {Environment.UserName}" + tsLabelVersion.Text = $"Version {Application.ProductVersion}" + + lblADRootNode.Text = String.Format(lblADRootNode.Text, Environment.UserDomainName) + txtADRootNode.Text = ActiveDirectoryRootNode + CurrentUser = userRow + CurrentUserId = userRow.GUID ' Grunddaten aus Tabellen laden ' Davon abhängige Daten werden in den `focusedRowChanged`-Events der Grids geladen @@ -68,14 +89,13 @@ Public Class frmMain DragDropManager.AddGridView(viewModulesGroups_AvailableGroups) Else MsgBox($"Der Benutzer '{Environment.UserName}' ist nicht zur Benutzerverwaltung berechtigt. {vbCrLf & vbCrLf}Bitte kontaktieren Sie den Administrator, wenn dies ein Fehler ist.", MsgBoxStyle.Critical, "UserManager") + logger.Warn($"Der Benutzer '{Environment.UserName}' ist nicht zur Benutzerverwaltung berechtigt.") Application.Exit() End If - If TBDD_USERTableAdapter.IsUserManagerAdmin(Environment.UserName) = 1 Then - - - Else + If TBDD_USERTableAdapter.IsUserManagerAdmin(Environment.UserName) <> 1 Then MsgBox($"Der Benutzer '{Environment.UserName}' ist nicht zur Benutzerverwaltung berechtigt. {vbCrLf & vbCrLf}Bitte kontaktieren Sie den Administrator, wenn dies ein Fehler ist.", MsgBoxStyle.Critical, "UserManager") + logger.Warn($"Der Benutzer '{Environment.UserName}' ist nicht zur Benutzerverwaltung berechtigt.") Application.Exit() End If End Sub @@ -104,10 +124,11 @@ Public Class frmMain End If Return True Catch ex As Exception + logger.Fatal(ex, "Unexpected Error in Init Database:") MsgBox("Unexpected Error in Init Database:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) + Return False End Try - End Function Private Sub btnImportUsers_Click(sender As Object, e As EventArgs) Handles btnImportUsers.Click @@ -988,7 +1009,8 @@ Public Class frmMain #End Region Private Sub ShowErrorMessage(errorText As String, ex As Exception) - MsgBox(errorText & vbCrLf & vbCrLf & ex.Message, MsgBoxStyle.Critical, "Process Manager") + logger.Error(ex, errorText) + MsgBox(errorText & vbCrLf & vbCrLf & ex.Message, MsgBoxStyle.Critical, "User Manager") End Sub Private Sub BindingNavigatorAddNewItem_Click(sender As Object, e As EventArgs) Handles TBDD_GROUPSBindingNavigator.Click @@ -1001,11 +1023,43 @@ Public Class frmMain End Sub Private Sub TBDD_GROUPSBindingSource_AddingNew(sender As Object, e As System.ComponentModel.AddingNewEventArgs) Handles TBDD_GROUPSBindingSource1.AddingNew - 'UserDataSet.TBDD_GROUPS.ADDED_WHOColumn.DefaultValue = Environment.UserName DS_ChangeS.TBDD_GROUPS.ADDED_WHOColumn.DefaultValue = Environment.UserName End Sub Private Sub btnConfigConnections_Click(sender As Object, e As EventArgs) Handles btnConfigConnections.Click frmConfigDatabase.ShowDialog() End Sub + + Private Sub TBDD_USERBindingSource_AddingNew(sender As Object, e As System.ComponentModel.AddingNewEventArgs) Handles TBDD_USERBindingSource.AddingNew + UserDataSet.TBDD_USER.ADDED_WHOColumn.DefaultValue = Environment.UserName + End Sub + + Private Sub btnOpenConfigDir_Click(sender As Object, e As EventArgs) Handles btnOpenConfigDir.Click + Process.Start(Application.UserAppDataPath()) + End Sub + + Private Sub btnOpenLogDir_Click(sender As Object, e As EventArgs) Handles btnOpenLogDir.Click + Process.Start(ClassNLog.GetLogPathFor(MODULE_NAME)) + End Sub + + Private Sub txtADRootNode_Leave(sender As Object, e As EventArgs) Handles txtADRootNode.Leave + SaveMySettingsValue("ActiveDirectoryRootNode", txtADRootNode.Text, "ConfigMain") + End Sub + + + Private Sub btnADConnectionTest_Click(sender As Object, e As EventArgs) Handles btnADConnectionTest.Click + Dim ldapPAth = IIf(txtADRootNode.Text = String.Empty, ActiveDirectoryRootNode, txtADRootNode.Text) + + + If ClassActiveDirectory.ConnectionTest(txtADRootNode.Text) Then + MsgBox("Verbindung erfolgreich aufgebaut!", MsgBoxStyle.Information) + + SaveMySettingsValue("ActiveDirectoryRootNode", txtADRootNode.Text, "ConfigMain") + logger.Info($"New ActiveDirectory Path saved: {txtADRootNode.Text}") + End If + End Sub + + Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click + Process.Start("https://didalog.de/support") + End Sub End Class From 35b6bd5b99934b41087648efff4be96331c238b2 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 2 Jul 2018 11:52:53 +0200 Subject: [PATCH 3/4] jj: catch all exceptions in frmMain_Load --- DDUserManager/DDUserManager/frmMain.vb | 157 ++++++++++++++----------- 1 file changed, 89 insertions(+), 68 deletions(-) diff --git a/DDUserManager/DDUserManager/frmMain.vb b/DDUserManager/DDUserManager/frmMain.vb index 615230f..65d020e 100644 --- a/DDUserManager/DDUserManager/frmMain.vb +++ b/DDUserManager/DDUserManager/frmMain.vb @@ -20,84 +20,105 @@ Public Class frmMain Private Shared logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger() Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load - NLog.LogManager.Configuration = ClassNLog.GetLoggerConfigFor(MODULE_NAME) - - logger.Info("Starting UserManager v" & Application.ProductVersion) - logger.Info($"Current Username: {Environment.UserName}") - - If InitDatabase() = False Then - MsgBox($"Unexpected error in Database Init(1). {vbCrLf & vbCrLf}Please contact Your admin.", MsgBoxStyle.Critical, "UserManager") - logger.Fatal($"Unexpected error in Database Init(1). {vbCrLf & vbCrLf}Please contact Your admin.") - Application.Exit() - Exit Sub - End If - If MyConnectionString = "" Then - MsgBox($"Unexpected error in Database Init(2). {vbCrLf & vbCrLf}Please contact Your admin.", MsgBoxStyle.Critical, "UserManager") - logger.Fatal($"Unexpected error in Database Init(2). {vbCrLf & vbCrLf}Please contact Your admin.") - Application.Exit() - Exit Sub - End If - - TBDD_CLIENTTableAdapter.Connection.ConnectionString = MyConnectionString - TBDD_CLIENT_USERTableAdapter.Connection.ConnectionString = MyConnectionString - TBDD_GROUPSTableAdapter.Connection.ConnectionString = MyConnectionString - TBDD_GROUPS_CLIENTTableAdapter.Connection.ConnectionString = MyConnectionString - TBDD_GROUPS_MODULESTableAdapter.Connection.ConnectionString = MyConnectionString - TBDD_GROUPS_USERTableAdapter.Connection.ConnectionString = MyConnectionString - TBDD_MODULESTableAdapter.Connection.ConnectionString = MyConnectionString - TBDD_USERTableAdapter.Connection.ConnectionString = MyConnectionString - TBDD_USER_MODULESTableAdapter.Connection.ConnectionString = MyConnectionString - - - Dim sql = String.Format("SELECT * FROM [dbo].[FNDD_CHECK_USER_MODULE] ('{0}','UM',{1})", Environment.UserName, 1) - Dim DT_CHECKUSER_MODULE As DataTable = clsDatabase.Return_Datatable(sql) + Try + NLog.LogManager.Configuration = ClassNLog.GetLoggerConfigFor(MODULE_NAME) - If DT_CHECKUSER_MODULE.Rows.Count = 1 Then + logger.Info("Starting UserManager v" & Application.ProductVersion) + logger.Info($"Current Username: {Environment.UserName}") + If InitDatabase() = False Then + MsgBox($"Unexpected error in Database Init(1). {vbCrLf & vbCrLf}Please contact Your admin.", MsgBoxStyle.Critical, "UserManager") + logger.Fatal($"Unexpected error in Database Init(1). {vbCrLf & vbCrLf}Please contact Your admin.") + Application.Exit() + Exit Sub + End If + If MyConnectionString = "" Then + MsgBox($"Unexpected error in Database Init(2). {vbCrLf & vbCrLf}Please contact Your admin.", MsgBoxStyle.Critical, "UserManager") + logger.Fatal($"Unexpected error in Database Init(2). {vbCrLf & vbCrLf}Please contact Your admin.") + Application.Exit() + Exit Sub + End If - Dim userRow As TBDD_USERRow = GetCurrentUserRow(Environment.UserName) + TBDD_CLIENTTableAdapter.Connection.ConnectionString = MyConnectionString + TBDD_CLIENT_USERTableAdapter.Connection.ConnectionString = MyConnectionString + TBDD_GROUPSTableAdapter.Connection.ConnectionString = MyConnectionString + TBDD_GROUPS_CLIENTTableAdapter.Connection.ConnectionString = MyConnectionString + TBDD_GROUPS_MODULESTableAdapter.Connection.ConnectionString = MyConnectionString + TBDD_GROUPS_USERTableAdapter.Connection.ConnectionString = MyConnectionString + TBDD_MODULESTableAdapter.Connection.ConnectionString = MyConnectionString + TBDD_USERTableAdapter.Connection.ConnectionString = MyConnectionString + TBDD_USER_MODULESTableAdapter.Connection.ConnectionString = MyConnectionString + + Dim sql = String.Format("SELECT * FROM [dbo].[FNDD_CHECK_USER_MODULE] ('{0}','UM',{1})", Environment.UserName, 1) + Dim DT_CHECKUSER_MODULE As DataTable = clsDatabase.Return_Datatable(sql) + + If DT_CHECKUSER_MODULE.Rows.Count = 0 Then + MsgBox($"Der Benutzer '{Environment.UserName}' ist nicht zur Benutzerverwaltung berechtigt. {vbCrLf & vbCrLf}Bitte kontaktieren Sie den Administrator, wenn dies ein Fehler ist.", MsgBoxStyle.Critical, "UserManager") + logger.Warn($"Der Benutzer '{Environment.UserName}' ist nicht zur Benutzerverwaltung berechtigt.") + Application.ExitThread() + End If - tsLabelUser.Text = $"Angemeldeter Benutzer: {Environment.UserName}" - tsLabelVersion.Text = $"Version {Application.ProductVersion}" + Dim firstRow As DataRow = DT_CHECKUSER_MODULE.Rows.Item(0) + Dim userId As Integer = firstRow.Item("USER_ID") - lblADRootNode.Text = String.Format(lblADRootNode.Text, Environment.UserDomainName) - txtADRootNode.Text = ActiveDirectoryRootNode + If userId = 0 Then + MsgBox($"Der Benutzer '{Environment.UserName}' ist nicht in der Benutzerverwaltung vorhanden. {vbCrLf & vbCrLf}Bitte kontaktieren Sie den Administrator, wenn dies ein Fehler ist.", MsgBoxStyle.Critical, "UserManager") + logger.Warn($"Der Benutzer '{Environment.UserName}' ist nicht in der Benutzerverwaltung vorhanden.") + Application.ExitThread() + End If - CurrentUser = userRow - CurrentUserId = userRow.GUID + If DT_CHECKUSER_MODULE.Rows.Count = 1 Then + Dim userRow As TBDD_USERRow = GetCurrentUserRow(Environment.UserName) - ' Grunddaten aus Tabellen laden - ' Davon abhängige Daten werden in den `focusedRowChanged`-Events der Grids geladen - LoadData() + If userRow Is Nothing Then - 'Spalten an Inhalte anpassen - gvUsers.BestFitColumns() - viewClients_AllClients.BestFitColumns() - viewGroups_AllGroups.BestFitColumns() + End If - ' Dragdrop Events für Grids anlegen - DragDropManager = New ClassDragDrop() - DragDropManager.AddGridView(viewGroups_AvailableUsers) - DragDropManager.AddGridView(viewGroups_AssignedUsers) - DragDropManager.AddGridView(viewModules_AvailableUsers) - DragDropManager.AddGridView(viewModules_AssignedUsers) - DragDropManager.AddGridView(viewClients_AvailableUsers) - DragDropManager.AddGridView(viewClients_AssignedUsers) - DragDropManager.AddGridView(viewClientsGroups_AssignedGroups) - DragDropManager.AddGridView(viewClientsGroups_AvailableGroups) - DragDropManager.AddGridView(viewModulesGroups_AssignedGroups) - DragDropManager.AddGridView(viewModulesGroups_AvailableGroups) - Else - MsgBox($"Der Benutzer '{Environment.UserName}' ist nicht zur Benutzerverwaltung berechtigt. {vbCrLf & vbCrLf}Bitte kontaktieren Sie den Administrator, wenn dies ein Fehler ist.", MsgBoxStyle.Critical, "UserManager") - logger.Warn($"Der Benutzer '{Environment.UserName}' ist nicht zur Benutzerverwaltung berechtigt.") - Application.Exit() - End If + tsLabelUser.Text = $"Angemeldeter Benutzer: {Environment.UserName}" + tsLabelVersion.Text = $"Version {Application.ProductVersion}" + + lblADRootNode.Text = String.Format(lblADRootNode.Text, Environment.UserDomainName) + txtADRootNode.Text = ActiveDirectoryRootNode + + CurrentUser = userRow + CurrentUserId = userRow.GUID + + ' Grunddaten aus Tabellen laden + ' Davon abhängige Daten werden in den `focusedRowChanged`-Events der Grids geladen + LoadData() + + 'Spalten an Inhalte anpassen + gvUsers.BestFitColumns() + viewClients_AllClients.BestFitColumns() + viewGroups_AllGroups.BestFitColumns() + + ' Dragdrop Events für Grids anlegen + DragDropManager = New ClassDragDrop() + DragDropManager.AddGridView(viewGroups_AvailableUsers) + DragDropManager.AddGridView(viewGroups_AssignedUsers) + DragDropManager.AddGridView(viewModules_AvailableUsers) + DragDropManager.AddGridView(viewModules_AssignedUsers) + DragDropManager.AddGridView(viewClients_AvailableUsers) + DragDropManager.AddGridView(viewClients_AssignedUsers) + DragDropManager.AddGridView(viewClientsGroups_AssignedGroups) + DragDropManager.AddGridView(viewClientsGroups_AvailableGroups) + DragDropManager.AddGridView(viewModulesGroups_AssignedGroups) + DragDropManager.AddGridView(viewModulesGroups_AvailableGroups) + Else + MsgBox($"Der Benutzer '{Environment.UserName}' ist nicht zur Benutzerverwaltung berechtigt. {vbCrLf & vbCrLf}Bitte kontaktieren Sie den Administrator, wenn dies ein Fehler ist.", MsgBoxStyle.Critical, "UserManager") + logger.Warn($"Der Benutzer '{Environment.UserName}' ist nicht zur Benutzerverwaltung berechtigt.") + Application.ExitThread() + End If - If TBDD_USERTableAdapter.IsUserManagerAdmin(Environment.UserName) <> 1 Then - MsgBox($"Der Benutzer '{Environment.UserName}' ist nicht zur Benutzerverwaltung berechtigt. {vbCrLf & vbCrLf}Bitte kontaktieren Sie den Administrator, wenn dies ein Fehler ist.", MsgBoxStyle.Critical, "UserManager") - logger.Warn($"Der Benutzer '{Environment.UserName}' ist nicht zur Benutzerverwaltung berechtigt.") - Application.Exit() - End If + If TBDD_USERTableAdapter.IsUserManagerAdmin(Environment.UserName) <> 1 Then + MsgBox($"Der Benutzer '{Environment.UserName}' ist nicht zur Benutzerverwaltung berechtigt. {vbCrLf & vbCrLf}Bitte kontaktieren Sie den Administrator, wenn dies ein Fehler ist.", MsgBoxStyle.Critical, "UserManager") + logger.Warn($"Der Benutzer '{Environment.UserName}' ist nicht zur Benutzerverwaltung berechtigt.") + Application.ExitThread() + End If + Catch ex As Exception + MsgBox("Unexpected Error while loading. Please check the log.", MsgBoxStyle.Critical, "User Manager") + logger.Fatal(ex, "Unexpected Error while loading.") + End Try End Sub Public Function InitDatabase() From 1d883c1ca93be85bf171e123805baaaad09f0b98 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 19 Sep 2018 15:23:16 +0200 Subject: [PATCH 4/4] jj: Update installer to respect revision number --- DDUserManager/SetupWix/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DDUserManager/SetupWix/Product.wxs b/DDUserManager/SetupWix/Product.wxs index 2163d04..55b23ae 100644 --- a/DDUserManager/SetupWix/Product.wxs +++ b/DDUserManager/SetupWix/Product.wxs @@ -20,7 +20,7 @@