diff --git a/DienstplanTV/App.config b/DienstplanTV/App.config index 15dab8a..2320b38 100644 --- a/DienstplanTV/App.config +++ b/DienstplanTV/App.config @@ -61,6 +61,14 @@ + + + + + + + + diff --git a/UID/ADMIN.vbproj b/UID/ADMIN.vbproj index 630130c..360d592 100644 --- a/UID/ADMIN.vbproj +++ b/UID/ADMIN.vbproj @@ -218,6 +218,9 @@ ..\..\..\dll\.net MySQL v4.5.2\MySql.Data.dll + + ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\dll\PdfSharp.dll @@ -237,6 +240,7 @@ ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll diff --git a/UID/App.config b/UID/App.config index 9c63e20..397872f 100644 --- a/UID/App.config +++ b/UID/App.config @@ -136,6 +136,22 @@ + + + + + + + + + + + + + + + + diff --git a/UID/Mitarbeiter/frmMitarbDetails.Designer.vb b/UID/Mitarbeiter/frmMitarbDetails.Designer.vb index 7bd1b7e..e1f888a 100644 --- a/UID/Mitarbeiter/frmMitarbDetails.Designer.vb +++ b/UID/Mitarbeiter/frmMitarbDetails.Designer.vb @@ -60,8 +60,17 @@ Partial Class frmMitarbDetails Me.Label43 = New System.Windows.Forms.Label() Me.cboEZOLL_SB = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.cboATLAS_SB = New VERAG_PROG_ALLGEMEIN.MyComboBox() + Me.TabPage5 = New System.Windows.Forms.TabPage() + Me.lblCheckconnection = New System.Windows.Forms.Label() + Me.Button6 = New System.Windows.Forms.Button() + Me.txtCSPW = New System.Windows.Forms.TextBox() + Me.Label58 = New System.Windows.Forms.Label() + Me.txtCSUser = New System.Windows.Forms.TextBox() + Me.Label59 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.GroupBox2 = New System.Windows.Forms.GroupBox() + Me.txtAbweichenderAnzeigename = New System.Windows.Forms.TextBox() + Me.Label57 = New System.Windows.Forms.Label() Me.cboFaktGrp = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.Label56 = New System.Windows.Forms.Label() Me.cboALIASDomain2 = New VERAG_PROG_ALLGEMEIN.MyComboBox() @@ -173,8 +182,6 @@ Partial Class frmMitarbDetails Me.PictureBox6 = New System.Windows.Forms.PictureBox() Me.cboAdminBer = New System.Windows.Forms.ComboBox() Me.Label7 = New System.Windows.Forms.Label() - Me.txtAbweichenderAnzeigename = New System.Windows.Forms.TextBox() - Me.Label57 = New System.Windows.Forms.Label() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() Me.Panel1.SuspendLayout() Me.TabControl2.SuspendLayout() @@ -182,6 +189,7 @@ Partial Class frmMitarbDetails Me.tbcntr.SuspendLayout() Me.TabPage2.SuspendLayout() Me.TabPage4.SuspendLayout() + Me.TabPage5.SuspendLayout() Me.GroupBox2.SuspendLayout() Me.GroupBox1.SuspendLayout() CType(Me.picFoto, System.ComponentModel.ISupportInitialize).BeginInit() @@ -302,6 +310,7 @@ Partial Class frmMitarbDetails ' Me.tbcntr.Controls.Add(Me.TabPage2) Me.tbcntr.Controls.Add(Me.TabPage4) + Me.tbcntr.Controls.Add(Me.TabPage5) Me.tbcntr.Location = New System.Drawing.Point(2, 539) Me.tbcntr.Name = "tbcntr" Me.tbcntr.SelectedIndex = 0 @@ -623,6 +632,79 @@ Partial Class frmMitarbDetails Me.cboATLAS_SB.Size = New System.Drawing.Size(200, 21) Me.cboATLAS_SB.TabIndex = 107 ' + 'TabPage5 + ' + Me.TabPage5.Controls.Add(Me.lblCheckconnection) + Me.TabPage5.Controls.Add(Me.Button6) + Me.TabPage5.Controls.Add(Me.txtCSPW) + Me.TabPage5.Controls.Add(Me.Label58) + Me.TabPage5.Controls.Add(Me.txtCSUser) + Me.TabPage5.Controls.Add(Me.Label59) + Me.TabPage5.Location = New System.Drawing.Point(4, 22) + Me.TabPage5.Name = "TabPage5" + Me.TabPage5.Size = New System.Drawing.Size(442, 174) + Me.TabPage5.TabIndex = 2 + Me.TabPage5.Text = "Zuordnung Creditsafe" + Me.TabPage5.UseVisualStyleBackColor = True + ' + 'lblCheckconnection + ' + Me.lblCheckconnection.AutoSize = True + Me.lblCheckconnection.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblCheckconnection.Location = New System.Drawing.Point(131, 104) + Me.lblCheckconnection.Name = "lblCheckconnection" + Me.lblCheckconnection.Size = New System.Drawing.Size(0, 13) + Me.lblCheckconnection.TabIndex = 121 + ' + 'Button6 + ' + Me.Button6.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.Button6.BackColor = System.Drawing.Color.White + Me.Button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button6.Location = New System.Drawing.Point(14, 97) + Me.Button6.Name = "Button6" + Me.Button6.Size = New System.Drawing.Size(88, 26) + Me.Button6.TabIndex = 53 + Me.Button6.Text = "prüfen" + Me.Button6.UseVisualStyleBackColor = False + ' + 'txtCSPW + ' + Me.txtCSPW.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtCSPW.Location = New System.Drawing.Point(14, 71) + Me.txtCSPW.Name = "txtCSPW" + Me.txtCSPW.Size = New System.Drawing.Size(200, 20) + Me.txtCSPW.TabIndex = 120 + Me.txtCSPW.UseSystemPasswordChar = True + ' + 'Label58 + ' + Me.Label58.AutoSize = True + Me.Label58.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label58.Location = New System.Drawing.Point(11, 55) + Me.Label58.Name = "Label58" + Me.Label58.Size = New System.Drawing.Size(50, 13) + Me.Label58.TabIndex = 119 + Me.Label58.Text = "Passwort" + ' + 'txtCSUser + ' + Me.txtCSUser.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtCSUser.Location = New System.Drawing.Point(12, 28) + Me.txtCSUser.Name = "txtCSUser" + Me.txtCSUser.Size = New System.Drawing.Size(200, 20) + Me.txtCSUser.TabIndex = 118 + ' + 'Label59 + ' + Me.Label59.AutoSize = True + Me.Label59.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label59.Location = New System.Drawing.Point(9, 12) + Me.Label59.Name = "Label59" + Me.Label59.Size = New System.Drawing.Size(49, 13) + Me.Label59.TabIndex = 117 + Me.Label59.Text = "Benutzer" + ' 'Label4 ' Me.Label4.AutoSize = True @@ -682,6 +764,24 @@ Partial Class frmMitarbDetails Me.GroupBox2.TabStop = False Me.GroupBox2.Text = "Firmendaten" ' + 'txtAbweichenderAnzeigename + ' + Me.txtAbweichenderAnzeigename.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtAbweichenderAnzeigename.Location = New System.Drawing.Point(399, 156) + Me.txtAbweichenderAnzeigename.Name = "txtAbweichenderAnzeigename" + Me.txtAbweichenderAnzeigename.Size = New System.Drawing.Size(148, 20) + Me.txtAbweichenderAnzeigename.TabIndex = 109 + ' + 'Label57 + ' + Me.Label57.AutoSize = True + Me.Label57.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label57.Location = New System.Drawing.Point(396, 140) + Me.Label57.Name = "Label57" + Me.Label57.Size = New System.Drawing.Size(151, 13) + Me.Label57.TabIndex = 110 + Me.Label57.Text = "And. Anzeigename (Aviso,TV):" + ' 'cboFaktGrp ' Me.cboFaktGrp._allowedValuesFreiText = Nothing @@ -1893,24 +1993,6 @@ Partial Class frmMitarbDetails Me.Label7.TabIndex = 78 Me.Label7.Text = "Berechtigung:" ' - 'txtAbweichenderAnzeigename - ' - Me.txtAbweichenderAnzeigename.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.txtAbweichenderAnzeigename.Location = New System.Drawing.Point(399, 156) - Me.txtAbweichenderAnzeigename.Name = "txtAbweichenderAnzeigename" - Me.txtAbweichenderAnzeigename.Size = New System.Drawing.Size(148, 20) - Me.txtAbweichenderAnzeigename.TabIndex = 109 - ' - 'Label57 - ' - Me.Label57.AutoSize = True - Me.Label57.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.Label57.Location = New System.Drawing.Point(396, 140) - Me.Label57.Name = "Label57" - Me.Label57.Size = New System.Drawing.Size(151, 13) - Me.Label57.TabIndex = 110 - Me.Label57.Text = "And. Anzeigename (Aviso,TV):" - ' 'frmMitarbDetails ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -1936,6 +2018,8 @@ Partial Class frmMitarbDetails Me.TabPage2.PerformLayout() Me.TabPage4.ResumeLayout(False) Me.TabPage4.PerformLayout() + Me.TabPage5.ResumeLayout(False) + Me.TabPage5.PerformLayout() Me.GroupBox2.ResumeLayout(False) Me.GroupBox2.PerformLayout() Me.GroupBox1.ResumeLayout(False) @@ -2105,4 +2189,11 @@ Partial Class frmMitarbDetails Friend WithEvents Label56 As Label Friend WithEvents txtAbweichenderAnzeigename As TextBox Friend WithEvents Label57 As Label + Friend WithEvents TabPage5 As TabPage + Friend WithEvents lblCheckconnection As Label + Friend WithEvents Button6 As Button + Friend WithEvents txtCSPW As TextBox + Friend WithEvents Label58 As Label + Friend WithEvents txtCSUser As TextBox + Friend WithEvents Label59 As Label End Class diff --git a/UID/Mitarbeiter/frmMitarbDetails.resx b/UID/Mitarbeiter/frmMitarbDetails.resx index a4c7566..3585d39 100644 --- a/UID/Mitarbeiter/frmMitarbDetails.resx +++ b/UID/Mitarbeiter/frmMitarbDetails.resx @@ -121,7 +121,7 @@ iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wQAADsEBuJFr7QAAAhBJREFUWEftlbFKA1EQRQP5FyG1fyBp/ANT2KYxWNkm+AExtYipLASDlYVpRBSC + vwAADr8BOAVTJAAAAhBJREFUWEftlbFKA1EQRQP5FyG1fyBp/ANT2KYxWNkm+AExtYipLASDlYVpRBSC RRoDQbBYEItAFLQwksJi9Qy5j8ljG5vdZgdmd959M3fuzEaspAVbKaAUUApYE/CzWJjH9h/cn+M46y4I eBuN0ptq1XzcaKzQ1GLhD/V6OhsODectnFoI72u1UM85jpWrWvAgYNrphCSIMBXS+LnXMxwHT/r9kP86 GKyd4dJAPtaZXA1pApbzuV1Crolp8pUkFj+2WpaMCM4QkocwzhKnM4LwOOZePRCCmQCp50ICPieTsCru diff --git a/UID/Mitarbeiter/frmMitarbDetails.vb b/UID/Mitarbeiter/frmMitarbDetails.vb index 68ac2ee..71439a7 100644 --- a/UID/Mitarbeiter/frmMitarbDetails.vb +++ b/UID/Mitarbeiter/frmMitarbDetails.vb @@ -1,4 +1,16 @@ -Public Class frmMitarbDetails + +Imports System.IO +Imports System.Net +Imports System.Net.Http +Imports System.Net.WebRequestMethods +Imports System.Security.Policy +Imports System.Text +Imports System.Windows +Imports Newtonsoft.Json + + + +Public Class frmMitarbDetails Private UID As New cMitarbeiter Private berechtigungen As New List(Of cBerechtigungen) @@ -834,4 +846,74 @@ End If cboFirmaHaupt.Enabled = (cboFirma.Text = "ALLE") End Sub + + Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click + + Dim myUrl As New Uri("https://connect.creditsafe.com/v1/authenticate") + lblCheckconnection.Text = "" + + If txtCSUser.Text = "" Then + lblCheckconnection.Text = "User ist leer!" + Exit Sub + End If + If txtCSPW.Text = "" Then + lblCheckconnection.Text = "Passwort ist leer!" + Exit Sub + End If + + Dim csUser As New CreditSafeUser(txtCSUser.Text, txtCSPW.Text) + + Dim yourJSONString = JsonConvert.SerializeObject(csUser) + + lblCheckconnection.Text = SendRequest(myUrl, yourJSONString, "application/json", "POST") + + End Sub + + Private Function SendRequest(uri As Uri, jsonString As String, contentType As String, method As String) As String + + Dim response As HttpWebResponse + Dim request As WebRequest + Dim jsonDataBytes = Encoding.UTF8.GetBytes(jsonString) + + Try + + request = WebRequest.Create(uri) + request.ContentLength = jsonDataBytes.Length + request.ContentType = contentType + request.Method = method + + Using requestStream = request.GetRequestStream + requestStream.Write(jsonDataBytes, 0, jsonDataBytes.Length) + requestStream.Close() + + + + End Using + response = request.GetResponse + Return response.StatusDescription + + + Catch ex As WebException + + + Dim ExResponse = TryCast(ex.Response, HttpWebResponse) + Return ExResponse.StatusDescription + + End Try + + End Function + + +End Class + +Public Class CreditSafeUser + Public Property username As String + Public Property password As String + + Public Sub New(_username As String, _password As String) + username = _username + password = _password + + End Sub + End Class \ No newline at end of file diff --git a/UID/packages.config b/UID/packages.config index 0db4d67..c042e72 100644 --- a/UID/packages.config +++ b/UID/packages.config @@ -24,6 +24,7 @@ +