APIZugange, Mitarbeiter, StartOptions, UTA.

This commit is contained in:
2024-08-27 10:11:30 +02:00
parent 2535a268a7
commit 6f3dbaa305
16 changed files with 6976 additions and 97 deletions

View File

@@ -83,6 +83,9 @@
<Reference Include="atapi, Version=1.5.0.0, Culture=neutral, PublicKeyToken=6148c7b92dc86471, processorArchitecture=x86">
<HintPath>..\packages\ATAPI.2018.3.9\lib\net46\atapi.dll</HintPath>
</Reference>
<Reference Include="BCrypt.Net-Next, Version=4.0.3.0, Culture=neutral, PublicKeyToken=1e11be04b6288443, processorArchitecture=MSIL">
<HintPath>..\packages\BCrypt.Net-Next.4.0.3\lib\net462\BCrypt.Net-Next.dll</HintPath>
</Reference>
<Reference Include="BouncyCastle.Crypto, Version=1.8.4.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\GrapeCity\ActiveReports 15\Tools\BouncyCastle.Crypto.dll</HintPath>
@@ -446,6 +449,12 @@
<Compile Include="frmAPI.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmAPIZugaenge.Designer.vb">
<DependentUpon>frmAPIZugaenge.vb</DependentUpon>
</Compile>
<Compile Include="frmAPIZugaenge.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmAPIEinstellungen.Designer.vb">
<DependentUpon>frmAPIEinstellungen.vb</DependentUpon>
</Compile>
@@ -742,6 +751,9 @@
<EmbeddedResource Include="frmAPI.resx">
<DependentUpon>frmAPI.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmAPIZugaenge.resx">
<DependentUpon>frmAPIZugaenge.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmAPIEinstellungen.resx">
<DependentUpon>frmAPIEinstellungen.vb</DependentUpon>
</EmbeddedResource>

View File

@@ -225,12 +225,12 @@ Partial Class frmMitarbDetails
Me.lblTage = New System.Windows.Forms.Label()
Me.Label67 = New System.Windows.Forms.Label()
Me.txtWoStd = New System.Windows.Forms.TextBox()
Me.Label66 = New System.Windows.Forms.Label()
Me.txtaliquUA = New System.Windows.Forms.TextBox()
Me.txtUrlaubsabsp = New System.Windows.Forms.TextBox()
Me.Label65 = New System.Windows.Forms.Label()
Me.cbUrlaubInStund = New System.Windows.Forms.CheckBox()
Me.dgvData = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.Label66 = New System.Windows.Forms.Label()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel1.SuspendLayout()
@@ -288,7 +288,7 @@ Partial Class frmMitarbDetails
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
Me.Panel1.Location = New System.Drawing.Point(0, 0)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(747, 57)
Me.Panel1.Size = New System.Drawing.Size(782, 57)
Me.Panel1.TabIndex = 23
'
'btnADladen
@@ -357,7 +357,7 @@ Partial Class frmMitarbDetails
Me.TabControl2.Location = New System.Drawing.Point(12, 63)
Me.TabControl2.Name = "TabControl2"
Me.TabControl2.SelectedIndex = 0
Me.TabControl2.Size = New System.Drawing.Size(723, 773)
Me.TabControl2.Size = New System.Drawing.Size(758, 773)
Me.TabControl2.TabIndex = 0
'
'TabPage1
@@ -370,7 +370,7 @@ Partial Class frmMitarbDetails
Me.TabPage1.Location = New System.Drawing.Point(4, 22)
Me.TabPage1.Name = "TabPage1"
Me.TabPage1.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage1.Size = New System.Drawing.Size(715, 747)
Me.TabPage1.Size = New System.Drawing.Size(750, 747)
Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = "Daten"
Me.TabPage1.UseVisualStyleBackColor = True
@@ -1792,7 +1792,7 @@ Partial Class frmMitarbDetails
Me.TabPage3.Location = New System.Drawing.Point(4, 22)
Me.TabPage3.Name = "TabPage3"
Me.TabPage3.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage3.Size = New System.Drawing.Size(715, 747)
Me.TabPage3.Size = New System.Drawing.Size(750, 747)
Me.TabPage3.TabIndex = 1
Me.TabPage3.Text = "Programme"
Me.TabPage3.UseVisualStyleBackColor = True
@@ -2284,7 +2284,7 @@ Partial Class frmMitarbDetails
Me.TabPage8.Controls.Add(Me.Label66)
Me.TabPage8.Location = New System.Drawing.Point(4, 22)
Me.TabPage8.Name = "TabPage8"
Me.TabPage8.Size = New System.Drawing.Size(715, 747)
Me.TabPage8.Size = New System.Drawing.Size(750, 747)
Me.TabPage8.TabIndex = 2
Me.TabPage8.Text = "Zeiterfassung"
Me.TabPage8.UseVisualStyleBackColor = True
@@ -2306,7 +2306,7 @@ Partial Class frmMitarbDetails
Me.TabControl3.Location = New System.Drawing.Point(24, 172)
Me.TabControl3.Name = "TabControl3"
Me.TabControl3.SelectedIndex = 0
Me.TabControl3.Size = New System.Drawing.Size(669, 280)
Me.TabControl3.Size = New System.Drawing.Size(723, 280)
Me.TabControl3.TabIndex = 142
'
'rtfInfoTimas
@@ -2432,7 +2432,7 @@ Partial Class frmMitarbDetails
Me.dgvUberstundenauszahlungen.Location = New System.Drawing.Point(6, 489)
Me.dgvUberstundenauszahlungen.Name = "dgvUberstundenauszahlungen"
Me.dgvUberstundenauszahlungen.ReadOnly = True
Me.dgvUberstundenauszahlungen.Size = New System.Drawing.Size(703, 255)
Me.dgvUberstundenauszahlungen.Size = New System.Drawing.Size(741, 255)
Me.dgvUberstundenauszahlungen.TabIndex = 136
'
'Label69
@@ -2525,16 +2525,6 @@ Partial Class frmMitarbDetails
Me.txtWoStd.Size = New System.Drawing.Size(44, 20)
Me.txtWoStd.TabIndex = 130
'
'Label66
'
Me.Label66.AutoSize = True
Me.Label66.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label66.Location = New System.Drawing.Point(344, 76)
Me.Label66.Name = "Label66"
Me.Label66.Size = New System.Drawing.Size(72, 13)
Me.Label66.TabIndex = 127
Me.Label66.Text = "aliqu. Urlaub.:"
'
'txtaliquUA
'
Me.txtaliquUA.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
@@ -2584,6 +2574,16 @@ Partial Class frmMitarbDetails
Me.dgvData.Size = New System.Drawing.Size(390, 192)
Me.dgvData.TabIndex = 149
'
'Label66
'
Me.Label66.AutoSize = True
Me.Label66.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label66.Location = New System.Drawing.Point(344, 76)
Me.Label66.Name = "Label66"
Me.Label66.Size = New System.Drawing.Size(72, 13)
Me.Label66.TabIndex = 127
Me.Label66.Text = "aliqu. Urlaub.:"
'
'ContextMenuStrip1
'
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
@@ -2594,7 +2594,7 @@ Partial Class frmMitarbDetails
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.WhiteSmoke
Me.ClientSize = New System.Drawing.Size(747, 892)
Me.ClientSize = New System.Drawing.Size(782, 892)
Me.Controls.Add(Me.TabControl2)
Me.Controls.Add(Me.btnCancel)
Me.Controls.Add(Me.btnOK)

View File

@@ -1426,7 +1426,7 @@ Public Class frmMitarbDetails
Dim dtbereitsausgezahlteUE As DataTable
Dim bereitsgezahlteueberstunden = "select uest_date as Datum ,isnull(uest_100,0) as ÜS100 , isnull(uest_50,0) as ÜS50, isnull(uest_25,0) as ÜS25, isnull(uest_0,0) as ÜS50_Saldo, isnull(uest_paidout_sum,0) as ausbezahlt, uest_systemuser as eingetragen_von ,uest_created as eingetragen_am
Dim bereitsgezahlteueberstunden = "select uest_date as Datum ,isnull(uest_100,0) as ÜS100 , isnull(uest_50,0) as ÜS50, isnull(uest_25,0) as ÜS25, isnull(uest_0,0) as ÜS50_Saldo, isnull(uest_paidout_sum,0) as ausbezahlt, uest_systemuser as eingetragen_von ,uest_created as eingetragen_am, cast (isnull([uest_ignorePayoutDate],0) as bit) as 'Auszahlungsdatum ignoriert'
FROM [ADMIN].[dbo].[tblUeberstunden]
where uest_deleted = 0 and uest_maId = " & mitarbeiter.mit_id & "
Order by uest_date"
@@ -1451,7 +1451,7 @@ Public Class frmMitarbDetails
Me.Cursor = Cursors.Default
frmMitarbDetails.ShowDialog()
End Sub
End Class

View File

@@ -52,7 +52,7 @@ Public Class frmMitarbeiter
'Paint wieder reaktivieren
locZeilen = -1
If Not Grid_aktiv Then Exit Sub
Dim sql As String = "SELECT mit_id,mit_username,mit_vname, mit_nname ,mit_niederlassung,mit_abteilung,mit_email,mit_durchwahl,mit_gekuendigt, cast (case when mit_timasId is null then 0 else 1 end as bit) mit_ze FROM tblMitarbeiter "
Dim sql As String = "SELECT mit_id,mit_username,mit_vname, mit_nname ,mit_niederlassung,mit_abteilung,mit_email,mit_durchwahl,mit_gekuendigt, cast (case when mit_timasId is null then 0 else 1 end as bit) mit_ze, cast (case when isnull([mit_DAKOSY_SB],'')<> '' and isnull([mit_DAKOSY_SBFull],'')<>'' then 1 else 0 end as bit) mit_DAKOSY FROM tblMitarbeiter "
If txtSuche.Text <> "" Then
sql &= " WHERE (mit_username LIKE '%" & txtSuche.Text & "%' OR mit_nname LIKE '%" & txtSuche.Text & "%' OR mit_vname LIKE '%" & txtSuche.Text & "%') "
End If
@@ -93,24 +93,24 @@ Public Class frmMitarbeiter
'.Columns("Info").DisplayIndex = 7
.Columns(7).DisplayIndex = 6
.Columns(0).Visible = False 'ID nicht anzeigen
.Columns("mit_id").Visible = False 'ID nicht anzeigen
.Columns(2).Visible = False 'PWD nicht anzeigen
.Columns(1).Width = 80
.Columns(1).HeaderText = "Kurzbezeichnung"
.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
.Columns("mit_username").Width = 80
.Columns("mit_username").HeaderText = "Kurzbezeichnung"
.Columns("mit_username").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
.Columns(3).Width = 150
.Columns(3).HeaderText = "Vorname"
.Columns("mit_vname").Width = 150
.Columns("mit_vname").HeaderText = "Vorname"
.Columns(4).Width = 150
.Columns(4).HeaderText = "Nachname"
.Columns("mit_nname").Width = 150
.Columns("mit_nname").HeaderText = "Nachname"
.Columns(5).Width = 80
.Columns(5).HeaderText = "Sicherheitsstufe"
.Columns(6).Width = 175
.Columns(6).HeaderText = "Info"
.Columns("mit_niederlassung").Width = 80
.Columns("mit_niederlassung").HeaderText = "Sicherheitsstufe"
.Columns("mit_niederlassung").Width = 175
.Columns("mit_niederlassung").HeaderText = "Info"
.Columns(7).Width = 80
.Columns(7).HeaderText = "Niederlassung"

View File

@@ -58,6 +58,7 @@ Partial Class usrCntlMitarbeiter
Me.UserKopierenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.BerechtigungenSetzenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.cbxDakosy = New System.Windows.Forms.CheckBox()
Me.Panel2.SuspendLayout()
Me.TabControl1.SuspendLayout()
Me.TabPage1.SuspendLayout()
@@ -335,6 +336,7 @@ Partial Class usrCntlMitarbeiter
'
'Panel1
'
Me.Panel1.Controls.Add(Me.cbxDakosy)
Me.Panel1.Controls.Add(Me.cbxZE)
Me.Panel1.Controls.Add(Me.cbx)
Me.Panel1.Controls.Add(Me.txtSuche)
@@ -437,6 +439,19 @@ Partial Class usrCntlMitarbeiter
Me.ContextMenuStrip2.Name = "ContextMenuStrip2"
Me.ContextMenuStrip2.Size = New System.Drawing.Size(61, 4)
'
'cbxDakosy
'
Me.cbxDakosy.AutoSize = True
Me.cbxDakosy.Checked = True
Me.cbxDakosy.CheckState = System.Windows.Forms.CheckState.Indeterminate
Me.cbxDakosy.Location = New System.Drawing.Point(798, 13)
Me.cbxDakosy.Name = "cbxDakosy"
Me.cbxDakosy.Size = New System.Drawing.Size(62, 17)
Me.cbxDakosy.TabIndex = 52
Me.cbxDakosy.Text = "Dakosy"
Me.cbxDakosy.ThreeState = True
Me.cbxDakosy.UseVisualStyleBackColor = True
'
'usrCntlMitarbeiter
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -507,4 +522,5 @@ Partial Class usrCntlMitarbeiter
Friend WithEvents Button9 As Button
Friend WithEvents ContextMenuStrip2 As ContextMenuStrip
Friend WithEvents cbxZE As CheckBox
Friend WithEvents cbxDakosy As CheckBox
End Class

View File

@@ -68,7 +68,7 @@ Public Class usrCntlMitarbeiter
Dim sql As String = "SELECT mit_id,mit_username,mit_vname, mit_nname ,mit_niederlassung,mit_abteilung,mit_email,cast (case when mit_timasId is null then 0 else 1 end as bit) mit_ze,mit_durchwahl,mit_gekuendigt, isnull(mit_foto_DocId,'') as mit_foto_DocId FROM tblMitarbeiter WHERE (mit_firma='" & firma & "' OR (mit_firma='ALL' AND mit_FirmaHaupt='" & firma & "' )) "
Dim sql As String = "SELECT mit_id,mit_username,mit_vname, mit_nname ,mit_niederlassung,mit_abteilung,mit_email,cast (case when mit_timasId is null then 0 else 1 end as bit) mit_ze, cast (case when isnull([mit_DAKOSY_SB],'')<> '' and isnull([mit_DAKOSY_SBFull],'')<>'' then 1 else 0 end as bit) as mit_DAKOSY, mit_durchwahl,mit_gekuendigt, isnull(mit_foto_DocId,'') as mit_foto_DocId FROM tblMitarbeiter WHERE (mit_firma='" & firma & "' OR (mit_firma='ALL' AND mit_FirmaHaupt='" & firma & "' )) "
If txtSuche.Text <> "" Then
sql &= " AND (mit_username LIKE '%" & txtSuche.Text & "%' OR mit_nname LIKE '%" & txtSuche.Text & "%' OR mit_vname LIKE '%" & txtSuche.Text & "%') "
@@ -82,6 +82,10 @@ Public Class usrCntlMitarbeiter
sql &= IIf(cbxZE.Checked, " AND mit_timasId is not null", " AND mit_timasId is null")
End If
If cbxDakosy.CheckState <> CheckState.Indeterminate Then
sql &= IIf(cbxDakosy.Checked, " AND (isnull([mit_DAKOSY_SB],'')<> '' AND isnull([mit_DAKOSY_SBFull],'')<>'')", " AND ((isnull([mit_DAKOSY_SB],'')= '' OR isnull([mit_DAKOSY_SBFull],'')=''))")
End If
If firma = "VERAG" Then
' dgvVERAG.DataSource = UID.AnzeigeTabelleFirma(sql)
@@ -252,38 +256,48 @@ Public Class usrCntlMitarbeiter
.AllowUserToOrderColumns = True
.Columns(0).Visible = False 'ID nicht anzeigen
.Columns("mit_id").Visible = False 'ID nicht anzeigen
.Columns(1).Width = 150
.Columns(1).HeaderText = "Username"
.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
.Columns("mit_username").Width = 150
.Columns("mit_username").HeaderText = "Username"
.Columns("mit_username").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
.Columns(2).Width = 100
.Columns(2).HeaderText = "Vorname"
.Columns("mit_vname").Width = 100
.Columns("mit_vname").HeaderText = "Vorname"
.Columns(3).Width = 130
.Columns(3).HeaderText = "Nachname"
.Columns("mit_nname").Width = 130
.Columns("mit_nname").HeaderText = "Nachname"
.Columns(4).Width = 85
.Columns(4).HeaderText = "Niederlassung"
.Columns("mit_niederlassung").Width = 85
.Columns("mit_niederlassung").HeaderText = "Niederlassung"
.Columns(5).Width = 85
.Columns(5).HeaderText = "Abteilung"
.Columns("mit_abteilung").Width = 85
.Columns("mit_abteilung").HeaderText = "Abteilung"
.Columns(6).Width = 120
.Columns(6).HeaderText = "Email"
.Columns("mit_email").Width = 120
.Columns("mit_email").HeaderText = "Email"
.Columns("mit_ze").Width = 50
.Columns("mit_ze").HeaderText = "Zeiterf."
.Columns("mit_ze").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
.Columns(7).Width = 70
.Columns(7).HeaderText = "Zeiterf."
.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
.Columns("mit_durchwahl").Width = 120
.Columns("mit_durchwahl").HeaderText = "TelefonNr."
.Columns(8).Width = 120
.Columns(8).HeaderText = "TelefonNr."
.Columns("mit_gekuendigt").Width = 70
.Columns("mit_gekuendigt").HeaderText = "Gekünd."
.Columns("mit_gekuendigt").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
.Columns("mit_DAKOSY").Width = 100
.Columns("mit_DAKOSY").HeaderText = "Dakosy-Zugang"
.Columns("mit_DAKOSY").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
.Columns("mit_foto_DocId").Width = 70
.Columns("mit_foto_DocId").HeaderText = "FotoID"
.Columns(9).Width = 70
.Columns(9).HeaderText = "Gekünd."
.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
'.AutoGenerateColumns = False
@@ -871,7 +885,9 @@ Public Class usrCntlMitarbeiter
Me.Cursor = Cursors.Default
End Sub
Private Sub cbxZE_CheckStateChanged(sender As Object, e As EventArgs) Handles cbxZE.CheckStateChanged
Private Sub cbxZE_CheckStateChanged(sender As Object, e As EventArgs) Handles cbxZE.CheckStateChanged, cbxDakosy.CheckStateChanged
Tabelle_anzeigen()
End Sub
End Class

147
UID/frmAPIZugaenge.Designer.vb generated Normal file
View File

@@ -0,0 +1,147 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class frmAPIZugaenge
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAPIZugaenge))
Me.Label2 = New System.Windows.Forms.Label()
Me.txtSuche = New System.Windows.Forms.TextBox()
Me.btnOK = New System.Windows.Forms.Button()
Me.DataGridView = New System.Windows.Forms.DataGridView()
Me.cbxProduktivsystem = New System.Windows.Forms.CheckBox()
Me.PictureBox5 = New System.Windows.Forms.PictureBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.Button2 = New System.Windows.Forms.Button()
CType(Me.DataGridView, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(9, 7)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(41, 13)
Me.Label2.TabIndex = 21
Me.Label2.Text = "Suche:"
'
'txtSuche
'
Me.txtSuche.Location = New System.Drawing.Point(12, 23)
Me.txtSuche.Name = "txtSuche"
Me.txtSuche.Size = New System.Drawing.Size(176, 20)
Me.txtSuche.TabIndex = 22
'
'btnOK
'
Me.btnOK.Location = New System.Drawing.Point(942, 454)
Me.btnOK.Name = "btnOK"
Me.btnOK.Size = New System.Drawing.Size(109, 23)
Me.btnOK.TabIndex = 20
Me.btnOK.Text = "Speichern"
Me.btnOK.UseVisualStyleBackColor = True
Me.btnOK.Visible = False
'
'DataGridView
'
Me.DataGridView.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.DataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.DataGridView.Location = New System.Drawing.Point(12, 49)
Me.DataGridView.MultiSelect = False
Me.DataGridView.Name = "DataGridView"
Me.DataGridView.Size = New System.Drawing.Size(1035, 399)
Me.DataGridView.TabIndex = 19
'
'cbxProduktivsystem
'
Me.cbxProduktivsystem.AutoSize = True
Me.cbxProduktivsystem.Checked = True
Me.cbxProduktivsystem.CheckState = System.Windows.Forms.CheckState.Checked
Me.cbxProduktivsystem.Location = New System.Drawing.Point(213, 26)
Me.cbxProduktivsystem.Name = "cbxProduktivsystem"
Me.cbxProduktivsystem.Size = New System.Drawing.Size(80, 17)
Me.cbxProduktivsystem.TabIndex = 25
Me.cbxProduktivsystem.Text = "aktive User"
Me.cbxProduktivsystem.UseVisualStyleBackColor = True
'
'PictureBox5
'
Me.PictureBox5.BackgroundImage = Global.ADMIN.My.Resources.Resources.fragezeichen
Me.PictureBox5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.PictureBox5.Location = New System.Drawing.Point(1020, 21)
Me.PictureBox5.Name = "PictureBox5"
Me.PictureBox5.Size = New System.Drawing.Size(27, 22)
Me.PictureBox5.TabIndex = 131
Me.PictureBox5.TabStop = False
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(806, 454)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(109, 23)
Me.Button1.TabIndex = 132
Me.Button1.Text = "Hash PW"
Me.Button1.UseVisualStyleBackColor = True
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(12, 454)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(109, 23)
Me.Button2.TabIndex = 133
Me.Button2.Text = "TEST HASHES"
Me.Button2.UseVisualStyleBackColor = True
'
'frmAPIZugaenge
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(1059, 485)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.PictureBox5)
Me.Controls.Add(Me.cbxProduktivsystem)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.txtSuche)
Me.Controls.Add(Me.btnOK)
Me.Controls.Add(Me.DataGridView)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "frmAPIZugaenge"
Me.Text = "API Verwaltung"
CType(Me.DataGridView, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents Label2 As Label
Friend WithEvents txtSuche As TextBox
Friend WithEvents btnOK As Button
Friend WithEvents DataGridView As DataGridView
Friend WithEvents cbxProduktivsystem As CheckBox
Friend WithEvents PictureBox5 As PictureBox
Friend WithEvents Button1 As Button
Friend WithEvents Button2 As Button
End Class

6334
UID/frmAPIZugaenge.resx Normal file

File diff suppressed because it is too large Load Diff

192
UID/frmAPIZugaenge.vb Normal file
View File

@@ -0,0 +1,192 @@
Imports System.Net
Imports Org.BouncyCastle.Crypto
Imports Org.BouncyCastle.Crypto.Generators
Imports VERAG_PROG_ALLGEMEIN
Public Class frmAPIZugaenge
Dim APIBind As cEasyBinding
Public table
Public BIND_DB
Private EditRow As Integer = -1
Sub New(table, BIND_DB)
Me.table = table
Me.BIND_DB = BIND_DB
InitializeComponent()
End Sub
Private Sub frmAPIZugaengen_Load(sender As Object, e As EventArgs) Handles MyBase.Load
loadDGV()
btnOK.Visible = True
End Sub
Private Sub loadDGV(Optional sqlwhere As String = "")
Try
APIBind = New cEasyBinding(BIND_DB)
If sqlwhere = "" Then
APIBind.initBinding("SELECT [userId] ,[username] ,[password] ,[customerId] ,[type] ,[active], [description], hashedPassword FROM " & table & " WHERE [active] = " & IIf(cbxProduktivsystem.Checked, "1", "0"), table)
Else
APIBind.initBinding("Select [userId] ,[username] ,[password] ,[customerId] ,[type] ,[active], [description], hashedPassword FROM " & table & " WHERE [active] = " & IIf(cbxProduktivsystem.Checked, "1", "0") & sqlwhere, table)
End If
DataGridView.DataSource = APIBind.bindingdataTable
With DataGridView
If .Columns.Count > 0 Then
.Columns("userId").Visible = False
.Columns("username").HeaderText = "Username"
.Columns("username").Width = 100
.Columns("password").HeaderText = "PW"
.Columns("password").Width = 100
.Columns("hashedPassword").HeaderText = "Hashed PW"
.Columns("hashedPassword").Width = 250
.Columns("customerId").HeaderText = "CustomerID"
.Columns("customerId").Width = 100
.Columns("type").HeaderText = "Type"
.Columns("type").Width = 100
.Columns("description").HeaderText = "Beschreibung"
.Columns("description").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("active").HeaderText = "Aktiv"
.Columns("active").Width = 25
End If
End With
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
Private Sub DataGridView_DefaultValuesNeeded(sender As Object, e As DataGridViewRowEventArgs) Handles DataGridView.DefaultValuesNeeded
Try
e.Row.Cells("active").Value = False
e.Row.Cells("type").Value = "REST"
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click
If DataGridView.Columns.Count = 0 Or DataGridView.SelectedRows.Count = 0 Then 'alles gelöscht oder markierte Zeile gelöscht
APIBind.updateBinding()
Exit Sub
End If
If DataGridView.CurrentRow.Cells("username").ToString <> "" AndAlso DataGridView.CurrentRow.Cells("password").ToString <> "" AndAlso DataGridView.CurrentRow.Cells("type").ToString <> "" AndAlso EditRow >= 0 Then
APIBind.updateBinding()
End If
End Sub
Private Sub DataGridView_EditingControlShowing(sender As Object, e As DataGridViewEditingControlShowingEventArgs) Handles DataGridView.EditingControlShowing
EditRow = DataGridView.CurrentRow.Index
End Sub
Private Sub DataGridView_SelectionChanged(sender As Object, e As EventArgs) Handles DataGridView.SelectionChanged
If EditRow >= 0 Then
Dim new_row As Integer = EditRow
EditRow = -1
DataGridView.CurrentCell = DataGridView.Rows(new_row).Cells(
DataGridView.CurrentCell.ColumnIndex)
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs)
If DataGridView.SelectedRows.Count = 0 Then Exit Sub
End Sub
Private Sub txtSuche_KeyDown(sender As Object, e As KeyEventArgs) Handles txtSuche.KeyDown
Dim sqladdon As String = ""
If e.KeyCode = Keys.Enter Then
If txtSuche.Text <> "" Then
sqladdon &= " [username] Like '%" & txtSuche.Text & "%' or [type] like '%" & txtSuche.Text & "%'"
End If
loadDGV(sqladdon)
End If
End Sub
Private Sub cbxProduktivsystem_CheckedChanged(sender As Object, e As EventArgs) Handles cbxProduktivsystem.CheckedChanged
Dim sqladdon As String = ""
If txtSuche.Text <> "" Then
sqladdon &= " [username] Like '%" & txtSuche.Text & "%' or [type] like '%" & txtSuche.Text & "%'"
End If
loadDGV(sqladdon)
End Sub
Private Sub PictureBox5_Click(sender As Object, e As EventArgs) Handles PictureBox5.Click
Dim webAddress As String = "https://wiki.verag.ag/de/software/Offene_Punkte#aviso-rest-api"
Process.Start(webAddress)
End Sub
Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click
If DataGridView.SelectedRows.Count = 0 Then Exit Sub
For Each r As DataGridViewRow In DataGridView.SelectedRows
If r.Cells("password").Value IsNot Nothing AndAlso r.Cells("password").Value <> "" Then
If IsDBNull(r.Cells("hashedPassword").Value) OrElse r.Cells("hashedPassword").Value = "" Then
If Not vbYes = MsgBox("Möchten Sie die Passwörter der markierten Datensätze hashen?" & vbNewLine & "Achtung, das Klartextpassowrt wird nicht in der Datenbank gespeichert!", vbYesNoCancel) Then
Exit Sub
End If
Dim hashedPW = BCrypt.Net.BCrypt.HashPassword(r.Cells("password").Value).ToString
r.Cells("hashedPassword").Value = hashedPW
r.Cells("password").Value = ""
APIBind.updateBinding()
End If
End If
Next
Dim sqladdon As String = ""
If txtSuche.Text <> "" Then
sqladdon &= " [username] Like '%" & txtSuche.Text & "%' or [type] like '%" & txtSuche.Text & "%'"
End If
loadDGV(sqladdon)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim testpw = InputBox("zu testendes Passwort eingeben!", "PW-TESTER - Funktion des Hashing/Validation")
If testpw = "" Then Exit Sub
Dim passwordHash1 As String = BCrypt.Net.BCrypt.HashPassword(testpw)
Dim passwordHash2 As String = BCrypt.Net.BCrypt.HashPassword(testpw)
Dim passwordHash3 As String = BCrypt.Net.BCrypt.HashPassword(testpw)
Dim verified1 As Boolean = BCrypt.Net.BCrypt.Verify(testpw, passwordHash1)
Dim verified2 As Boolean = BCrypt.Net.BCrypt.Verify(testpw, passwordHash2)
Dim verified3 As Boolean = BCrypt.Net.BCrypt.Verify(testpw, passwordHash3)
MsgBox(passwordHash1 & vbNewLine & passwordHash2 & vbNewLine & passwordHash3 & vbNewLine & verified1 & vbNewLine & verified2 & vbNewLine & verified3)
End Sub
End Class

View File

@@ -47,6 +47,7 @@ Partial Class frmMain
Me.btnMitarbeiter = New System.Windows.Forms.Button()
Me.Panel2 = New System.Windows.Forms.Panel()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.Button3 = New System.Windows.Forms.Button()
Me.Panel3.SuspendLayout()
Me.Panel2.SuspendLayout()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -109,6 +110,7 @@ Partial Class frmMain
'Panel3
'
Me.Panel3.BackColor = System.Drawing.Color.White
Me.Panel3.Controls.Add(Me.Button3)
Me.Panel3.Controls.Add(Me.Button2)
Me.Panel3.Controls.Add(Me.btnFehler)
Me.Panel3.Controls.Add(Me.btnAPI)
@@ -167,7 +169,7 @@ Partial Class frmMain
'
Me.btnHomepage.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnHomepage.ImageAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnHomepage.Location = New System.Drawing.Point(12, 372)
Me.btnHomepage.Location = New System.Drawing.Point(12, 358)
Me.btnHomepage.Name = "btnHomepage"
Me.btnHomepage.Size = New System.Drawing.Size(94, 33)
Me.btnHomepage.TabIndex = 38
@@ -190,7 +192,7 @@ Partial Class frmMain
'btnUpdate
'
Me.btnUpdate.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnUpdate.Location = New System.Drawing.Point(12, 487)
Me.btnUpdate.Location = New System.Drawing.Point(12, 476)
Me.btnUpdate.Name = "btnUpdate"
Me.btnUpdate.Size = New System.Drawing.Size(94, 34)
Me.btnUpdate.TabIndex = 37
@@ -235,11 +237,12 @@ Partial Class frmMain
'Button6
'
Me.Button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button6.Location = New System.Drawing.Point(12, 411)
Me.Button6.Location = New System.Drawing.Point(12, 397)
Me.Button6.Name = "Button6"
Me.Button6.Size = New System.Drawing.Size(94, 34)
Me.Button6.TabIndex = 33
Me.Button6.Text = "Proezeduren"
Me.Button6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button6.UseVisualStyleBackColor = True
'
'btnProgramme
@@ -287,6 +290,18 @@ Partial Class frmMain
Me.PictureBox1.TabIndex = 31
Me.PictureBox1.TabStop = False
'
'Button3
'
Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button3.ImageAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button3.Location = New System.Drawing.Point(12, 437)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(94, 33)
Me.Button3.TabIndex = 42
Me.Button3.Text = "Zugänge API"
Me.Button3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button3.UseVisualStyleBackColor = True
'
'frmMain
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -330,4 +345,5 @@ Partial Class frmMain
Friend WithEvents btnFehler As Button
Friend WithEvents btnAPI As Button
Friend WithEvents Button2 As Button
Friend WithEvents Button3 As Button
End Class

View File

@@ -222,4 +222,9 @@ Public Class frmMain
usrCntl.Dock = DockStyle.Fill
button_Click(sender)
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim f = New frmAPIZugaenge("tblRESTAuthentication", "ADMIN")
f.Show()
End Sub
End Class

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ATAPI" version="2018.3.9" targetFramework="net47" />
<package id="BCrypt.Net-Next" version="4.0.3" targetFramework="net47" />
<package id="ClosedXML" version="0.95.4" targetFramework="net47" />
<package id="DocumentFormat.OpenXml" version="2.7.2" targetFramework="net47" />
<package id="ExcelNumberFormat" version="1.0.10" targetFramework="net47" />