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("mit_niederlassung").Width = 80
.Columns("mit_niederlassung").HeaderText = "Sicherheitsstufe"
.Columns(6).Width = 175
.Columns(6).HeaderText = "Info"
.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" />

View File

@@ -878,7 +878,7 @@ Public Class cUTA
Return cnt
End Function
Public Function readAndSaveUTA(objFileRead As StreamReader, fi As FileInfo) As Boolean
Public Function readAndSaveUTA(objFileRead As StreamReader, fi As FileInfo, cnt As Integer) As Boolean
Dim booHeaderVorhanden = False
@@ -1219,7 +1219,7 @@ Public Class cUTA
End Select
Loop
cnt = CInt(lngRecordCount)
objFileRead.Close()
Return True

View File

@@ -233,7 +233,6 @@ Public Class frmNachrichtenVerarbeitung_MDM_divers
Dim downloadedFile As Stream = IO.File.Create(filePath)
client.DownloadFile(Path + remoteFileName, downloadedFile)
If IO.File.Exists(filePath) AndAlso deleteAfterDownload Then client.DeleteFile(Path + remoteFileName) 'Datei nach erfolgreichem Herunterladen vom Server löschen
@@ -365,7 +364,6 @@ Public Class frmNachrichtenVerarbeitung_MDM_divers
frmStartOptions.moveFile_DateBack(d, zielpfad & "Invoice_PDF\" & Now.Year & "\" & Now.ToString("yyyyMMdd") & "\")
If fi.Name.ToLower.Contains("pdf") Then addDGVEinarbeitung("PDF", fi.Name)
dgvEinarbeitung.Refresh()
End If
@@ -383,9 +381,9 @@ Public Class frmNachrichtenVerarbeitung_MDM_divers
'------------------ .UTA ------------------
'------------------------------------------
If Not deleteTable Then
deleteTable = uta.clearimporttable()
End If
'If Not deleteTable Then
' deleteTable = uta.clearimporttable()
'End If
If fi.Extension.ToLower = ".uta" Then
@@ -530,22 +528,24 @@ Public Class frmNachrichtenVerarbeitung_MDM_divers
Try
Dim fi As FileInfo = New FileInfo(d)
Dim cnt = 0
Dim objFileRead As StreamReader = New StreamReader(d)
If uta.readAndSaveUTA(objFileRead, fi) Then
If uta.readAndSaveUTA(objFileRead, fi, cnt) Then
addDGVEinarbeitung(fi.Name, "OK")
Else
addDGVEinarbeitung(fi.Name, "Fehler")
End If
readUTA = "Zeilen: " & cnt
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name)
MsgBox(ex.StackTrace & ex.Message)
End Try
End Function

View File

@@ -169,6 +169,8 @@ Partial Class frmStartOptions
Me.LinkLabel30 = New System.Windows.Forms.LinkLabel()
Me.Label11 = New System.Windows.Forms.Label()
Me.TabPage4 = New System.Windows.Forms.TabPage()
Me.LinkLabel62 = New System.Windows.Forms.LinkLabel()
Me.LinkLabel60 = New System.Windows.Forms.LinkLabel()
Me.LinkLabel61 = New System.Windows.Forms.LinkLabel()
Me.Label40 = New System.Windows.Forms.Label()
Me.txtTransactionID = New VERAG_PROG_ALLGEMEIN.MyTextBox()
@@ -243,6 +245,7 @@ Partial Class frmStartOptions
Me.lblRoutineManager = New System.Windows.Forms.Label()
Me.txtGJ_UNISPED = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Button21 = New System.Windows.Forms.Button()
Me.cbxOnlyBilledTransactions = New System.Windows.Forms.CheckBox()
Me.pnl.SuspendLayout()
CType(Me.PictureBox23, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PictureBox22, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -2145,6 +2148,9 @@ Partial Class frmStartOptions
'
'TabPage4
'
Me.TabPage4.Controls.Add(Me.cbxOnlyBilledTransactions)
Me.TabPage4.Controls.Add(Me.LinkLabel62)
Me.TabPage4.Controls.Add(Me.LinkLabel60)
Me.TabPage4.Controls.Add(Me.LinkLabel61)
Me.TabPage4.Controls.Add(Me.Label40)
Me.TabPage4.Controls.Add(Me.txtTransactionID)
@@ -2201,11 +2207,33 @@ Partial Class frmStartOptions
Me.TabPage4.Text = "VERAG 360"
Me.TabPage4.UseVisualStyleBackColor = True
'
'LinkLabel62
'
Me.LinkLabel62.AutoSize = True
Me.LinkLabel62.LinkColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
Me.LinkLabel62.Location = New System.Drawing.Point(622, 374)
Me.LinkLabel62.Name = "LinkLabel62"
Me.LinkLabel62.Size = New System.Drawing.Size(226, 13)
Me.LinkLabel62.TabIndex = 120
Me.LinkLabel62.TabStop = True
Me.LinkLabel62.Text = "nicht abgerechete Transaktionen aktualisieren"
'
'LinkLabel60
'
Me.LinkLabel60.AutoSize = True
Me.LinkLabel60.LinkColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
Me.LinkLabel60.Location = New System.Drawing.Point(662, 131)
Me.LinkLabel60.Name = "LinkLabel60"
Me.LinkLabel60.Size = New System.Drawing.Size(144, 13)
Me.LinkLabel60.TabIndex = 119
Me.LinkLabel60.TabStop = True
Me.LinkLabel60.Text = "Neueste Settlements abrufen"
'
'LinkLabel61
'
Me.LinkLabel61.AutoSize = True
Me.LinkLabel61.LinkColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
Me.LinkLabel61.Location = New System.Drawing.Point(658, 300)
Me.LinkLabel61.Location = New System.Drawing.Point(657, 351)
Me.LinkLabel61.Name = "LinkLabel61"
Me.LinkLabel61.Size = New System.Drawing.Size(158, 13)
Me.LinkLabel61.TabIndex = 118
@@ -2216,7 +2244,7 @@ Partial Class frmStartOptions
'
Me.Label40.AutoSize = True
Me.Label40.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label40.Location = New System.Drawing.Point(658, 185)
Me.Label40.Location = New System.Drawing.Point(658, 235)
Me.Label40.Name = "Label40"
Me.Label40.Size = New System.Drawing.Size(20, 13)
Me.Label40.TabIndex = 116
@@ -2238,7 +2266,7 @@ Partial Class frmStartOptions
Me.txtTransactionID._WaehrungZeichen = True
Me.txtTransactionID.BackColor = System.Drawing.SystemColors.Window
Me.txtTransactionID.ForeColor = System.Drawing.Color.Black
Me.txtTransactionID.Location = New System.Drawing.Point(691, 182)
Me.txtTransactionID.Location = New System.Drawing.Point(691, 232)
Me.txtTransactionID.MaxLength = 10
Me.txtTransactionID.MaxLineLength = -1
Me.txtTransactionID.MaxLines_Warning = ""
@@ -2253,7 +2281,7 @@ Partial Class frmStartOptions
'
Me.LinkLabel59.AutoSize = True
Me.LinkLabel59.LinkColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
Me.LinkLabel59.Location = New System.Drawing.Point(670, 205)
Me.LinkLabel59.Location = New System.Drawing.Point(670, 255)
Me.LinkLabel59.Name = "LinkLabel59"
Me.LinkLabel59.Size = New System.Drawing.Size(149, 13)
Me.LinkLabel59.TabIndex = 114
@@ -2264,7 +2292,7 @@ Partial Class frmStartOptions
'
Me.Label39.AutoSize = True
Me.Label39.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label39.Location = New System.Drawing.Point(657, 246)
Me.Label39.Location = New System.Drawing.Point(657, 296)
Me.Label39.Name = "Label39"
Me.Label39.Size = New System.Drawing.Size(28, 13)
Me.Label39.TabIndex = 113
@@ -2274,7 +2302,7 @@ Partial Class frmStartOptions
'
Me.Label38.AutoSize = True
Me.Label38.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label38.Location = New System.Drawing.Point(656, 365)
Me.Label38.Location = New System.Drawing.Point(656, 439)
Me.Label38.Name = "Label38"
Me.Label38.Size = New System.Drawing.Size(23, 13)
Me.Label38.TabIndex = 112
@@ -2284,7 +2312,7 @@ Partial Class frmStartOptions
'
Me.Label37.AutoSize = True
Me.Label37.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label37.Location = New System.Drawing.Point(656, 346)
Me.Label37.Location = New System.Drawing.Point(656, 420)
Me.Label37.Name = "Label37"
Me.Label37.Size = New System.Drawing.Size(28, 13)
Me.Label37.TabIndex = 111
@@ -2294,7 +2322,7 @@ Partial Class frmStartOptions
'
Me.LinkLabel58.AutoSize = True
Me.LinkLabel58.LinkColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
Me.LinkLabel58.Location = New System.Drawing.Point(663, 106)
Me.LinkLabel58.Location = New System.Drawing.Point(663, 156)
Me.LinkLabel58.Name = "LinkLabel58"
Me.LinkLabel58.Size = New System.Drawing.Size(126, 13)
Me.LinkLabel58.TabIndex = 110
@@ -2317,7 +2345,7 @@ Partial Class frmStartOptions
Me.txtBatchNr._WaehrungZeichen = True
Me.txtBatchNr.BackColor = System.Drawing.SystemColors.Window
Me.txtBatchNr.ForeColor = System.Drawing.Color.Black
Me.txtBatchNr.Location = New System.Drawing.Point(666, 132)
Me.txtBatchNr.Location = New System.Drawing.Point(666, 182)
Me.txtBatchNr.MaxLength = 3
Me.txtBatchNr.MaxLineLength = -1
Me.txtBatchNr.MaxLines_Warning = ""
@@ -2332,7 +2360,7 @@ Partial Class frmStartOptions
'
Me.LinkLabel57.AutoSize = True
Me.LinkLabel57.LinkColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
Me.LinkLabel57.Location = New System.Drawing.Point(663, 155)
Me.LinkLabel57.Location = New System.Drawing.Point(663, 205)
Me.LinkLabel57.Name = "LinkLabel57"
Me.LinkLabel57.Size = New System.Drawing.Size(166, 13)
Me.LinkLabel57.TabIndex = 108
@@ -2342,7 +2370,7 @@ Partial Class frmStartOptions
'DateTimePicker2
'
Me.DateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
Me.DateTimePicker2.Location = New System.Drawing.Point(691, 359)
Me.DateTimePicker2.Location = New System.Drawing.Point(691, 433)
Me.DateTimePicker2.Name = "DateTimePicker2"
Me.DateTimePicker2.Size = New System.Drawing.Size(85, 20)
Me.DateTimePicker2.TabIndex = 107
@@ -2350,7 +2378,7 @@ Partial Class frmStartOptions
'DateTimePicker1
'
Me.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
Me.DateTimePicker1.Location = New System.Drawing.Point(691, 340)
Me.DateTimePicker1.Location = New System.Drawing.Point(691, 414)
Me.DateTimePicker1.Name = "DateTimePicker1"
Me.DateTimePicker1.Size = New System.Drawing.Size(85, 20)
Me.DateTimePicker1.TabIndex = 106
@@ -2359,7 +2387,7 @@ Partial Class frmStartOptions
'
Me.LinkLabel56.AutoSize = True
Me.LinkLabel56.LinkColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
Me.LinkLabel56.Location = New System.Drawing.Point(656, 382)
Me.LinkLabel56.Location = New System.Drawing.Point(656, 456)
Me.LinkLabel56.Name = "LinkLabel56"
Me.LinkLabel56.Size = New System.Drawing.Size(114, 13)
Me.LinkLabel56.TabIndex = 105
@@ -2369,7 +2397,7 @@ Partial Class frmStartOptions
'datVon
'
Me.datVon.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
Me.datVon.Location = New System.Drawing.Point(691, 246)
Me.datVon.Location = New System.Drawing.Point(691, 296)
Me.datVon.Name = "datVon"
Me.datVon.Size = New System.Drawing.Size(85, 20)
Me.datVon.TabIndex = 104
@@ -2378,7 +2406,7 @@ Partial Class frmStartOptions
'
Me.LinkLabel55.AutoSize = True
Me.LinkLabel55.LinkColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
Me.LinkLabel55.Location = New System.Drawing.Point(658, 274)
Me.LinkLabel55.Location = New System.Drawing.Point(658, 324)
Me.LinkLabel55.Name = "LinkLabel55"
Me.LinkLabel55.Size = New System.Drawing.Size(108, 13)
Me.LinkLabel55.TabIndex = 103
@@ -2389,7 +2417,7 @@ Partial Class frmStartOptions
'
Me.LinkLabel54.AutoSize = True
Me.LinkLabel54.LinkColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
Me.LinkLabel54.Location = New System.Drawing.Point(663, 89)
Me.LinkLabel54.Location = New System.Drawing.Point(663, 106)
Me.LinkLabel54.Name = "LinkLabel54"
Me.LinkLabel54.Size = New System.Drawing.Size(157, 13)
Me.LinkLabel54.TabIndex = 102
@@ -3086,6 +3114,19 @@ Partial Class frmStartOptions
Me.Button21.Text = "AAS Sendung 24h"
Me.Button21.UseVisualStyleBackColor = True
'
'cbxOnlyBilledTransactions
'
Me.cbxOnlyBilledTransactions.AutoSize = True
Me.cbxOnlyBilledTransactions.Checked = True
Me.cbxOnlyBilledTransactions.CheckState = System.Windows.Forms.CheckState.Checked
Me.cbxOnlyBilledTransactions.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cbxOnlyBilledTransactions.Location = New System.Drawing.Point(670, 84)
Me.cbxOnlyBilledTransactions.Name = "cbxOnlyBilledTransactions"
Me.cbxOnlyBilledTransactions.Size = New System.Drawing.Size(172, 17)
Me.cbxOnlyBilledTransactions.TabIndex = 121
Me.cbxOnlyBilledTransactions.Text = "nur verrechnete Transaktionen"
Me.cbxOnlyBilledTransactions.UseVisualStyleBackColor = True
'
'frmStartOptions
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -3359,4 +3400,7 @@ Partial Class frmStartOptions
Friend WithEvents Label38 As Label
Friend WithEvents Label37 As Label
Friend WithEvents LinkLabel61 As LinkLabel
Friend WithEvents LinkLabel60 As LinkLabel
Friend WithEvents LinkLabel62 As LinkLabel
Friend WithEvents cbxOnlyBilledTransactions As CheckBox
End Class

View File

@@ -4427,10 +4427,11 @@ Public Class frmStartOptions
Dim totalPages = 0
Dim batchrequestNr = 0
fehler = mse.getNewestTransactions(token, dt, batchrequestNr, totalPages, 0)
fehler = mse.getNewestTransactions(token, dt, batchrequestNr, totalPages, 0, cbxOnlyBilledTransactions.Checked)
If fehler <> "" Then
MsgBox(fehler)
Me.Visible = True
Exit Sub
End If
@@ -4442,6 +4443,7 @@ Public Class frmStartOptions
If fehler <> "" Then
MsgBox(fehler)
Me.Visible = True
Exit Sub
End If
@@ -4474,6 +4476,7 @@ Public Class frmStartOptions
fehler = mse.getInvoices(token, invoice, datVon.Value, datVon.Value)
If fehler <> "" Then
MsgBox(fehler)
Me.Visible = True
Exit Sub
End If
@@ -4498,6 +4501,7 @@ Public Class frmStartOptions
If fehler <> "" Then
MsgBox(fehler)
Me.Visible = True
Exit Sub
End If
Next
@@ -4576,6 +4580,7 @@ Public Class frmStartOptions
If fehler <> "" Then
MsgBox(fehler)
Me.Visible = True
Else
Dim totalPages = 1
@@ -4641,17 +4646,18 @@ Public Class frmStartOptions
Me.Visible = True
End Sub
Private Sub LinkLabel59_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel59.LinkClicked, LinkLabel61.LinkClicked
Private Sub LinkLabel59_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel59.LinkClicked, LinkLabel61.LinkClicked, LinkLabel62.LinkClicked
If sender Is LinkLabel59 Then
If Not IsNumeric(txtTransactionID.Text) Then
MsgBox("ID muss 10stellige Nr sein!")
Me.Visible = True
Exit Sub
End If
If CInt(txtTransactionID.Text) < 100000000 AndAlso CInt(txtTransactionID.Text) > 199999999 Then
MsgBox("falsche ID")
Me.Visible = True
Exit Sub
End If
@@ -4669,6 +4675,7 @@ Public Class frmStartOptions
If fehler <> "" Then
MsgBox(fehler)
Me.Visible = True
Else
@@ -4676,13 +4683,15 @@ Public Class frmStartOptions
If sender Is LinkLabel59 Then
dtTransactionID.Columns.Add("transaction_id", GetType(String))
dtTransactionID.Columns.Add("found", GetType(Boolean))
Dim R As DataRow = dtTransactionID.NewRow
R("transaction_id") = txtTransactionID.Text
R("found") = True
dtTransactionID.Rows.Add(R)
Else
ElseIf sender Is LinkLabel61 Then
dtTransactionID = SQL.loadDgvBySql("select [transaction_id] FROM [VERAG].[dbo].[tblMSESettlements] where [invoice_date] = '" & datVon.Value & "' AND [transaction_id] not in (select [transaction_id] from [VERAG].[dbo].[tblMSETransactions])", "FMZOLL")
dtTransactionID = SQL.loadDgvBySql("select [transaction_id], CAST(1 AS BIT) as found FROM [VERAG].[dbo].[tblMSESettlements] where [invoice_date] = '" & datVon.Value & "' AND [transaction_id] not in (select [transaction_id] from [VERAG].[dbo].[tblMSETransactions])", "FMZOLL")
If dtTransactionID.Rows.Count = 0 Then
MsgBox("Zu diesem Rechnungsdatum gibt es keine Rechnung!")
Me.Visible = True
@@ -4694,6 +4703,21 @@ Public Class frmStartOptions
Exit Sub
End If
ElseIf sender Is LinkLabel62 Then
dtTransactionID = SQL.loadDgvBySql("select bills.[transaction_id], CAST(1 AS BIT) as found FROM [VERAG].[dbo].[tblMSESettlements] as bills
inner join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id] where trans.[transaction_status] <> 'Billed' and [invoice_date] = '" & datVon.Value & " '", "FMZOLL")
If dtTransactionID.Rows.Count = 0 Then
MsgBox("Zu diesem Rechnungsdatum gibt es keine Rechnung!")
Me.Visible = True
Exit Sub
End If
If Not vbYes = MsgBox("Möchten Sie die " & dtTransactionID.Rows.Count & " Transaktionen aktualisieren?" & vbNewLine & "Dieser Vorgang dauert je nach Anzahl der Transaktionen etwas.", vbYesNoCancel) Then
Me.Visible = True
Exit Sub
End If
End If
@@ -4704,11 +4728,83 @@ Public Class frmStartOptions
MsgBox(fehler)
Me.Visible = True
Exit Sub
Else
Dim dv = New DataView(dtTransactionID)
Dim dtMissingTransactions As New DataTable
dv.RowFilter = "found = false"
dtMissingTransactions = dv.ToTable
If dtMissingTransactions.Rows.Count > 0 Then
Dim b = New System.Text.StringBuilder()
For Each resultRow In dtTransactionID.Rows
b.Append(resultRow(0) & vbNewLine)
Next
MsgBox(dtTransactionID.Rows.Count & " nicht gefundene Transaktionen:" & vbNewLine & b.ToString)
Me.Visible = True
End If
End If
End If
Me.Visible = True
End Sub
Private Sub LinkLabel60_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel60.LinkClicked
Me.Visible = False
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = cbxTestsystem.Checked
Dim mse As New cMSEAPI("MSE")
Dim fehler As String = ""
Dim token = mse.createJWT(fehler)
Dim dt As New DataTable
If fehler <> "" Then
MsgBox(fehler)
Else
Dim totalPages = 0
Dim batchrequestNr = 0
fehler = mse.getNewestSettlements(token, dt, batchrequestNr, totalPages, 0)
If fehler <> "" Then
MsgBox(fehler)
Me.Visible = True
Exit Sub
End If
'Newest Settlements werden nicht benötigt, erst beim Abrufen der RECHNUNG sollen die dazugehörigen Settlements abgerufen werden, allerdings müssen diese initial 1x per API abgerufen werden (mittels getNewSettlements , ansonsten können Sie nicht gefunden werden)!
'sollten sie dennoch gespeichert werden, dann fogenden Code aktivieren:
'-------------START----------------------------------------------
'If totalPages > 1 Then
' For i = 2 To totalPages
' If dt.Rows.Count > 0 Then dt.Clear()
' fehler = mse.getSettlementsFromBatchNrAndPage(token, dt, batchrequestNr, totalPages, i)
' If fehler <> "" Then
' MsgBox(fehler)
' Exit Sub
' End If
' i = i + 1
' Next
'End If
'-------------ENDE----------------------------------------------
End If
Me.Visible = True
End Sub
End Class