Bugfix ATEZ und Digicust

This commit is contained in:
2023-09-12 12:19:29 +02:00
parent b48531626d
commit 629be8e387
5 changed files with 281 additions and 206 deletions

View File

@@ -1,4 +1,5 @@
Imports DocumentFormat.OpenXml.Vml.Presentation
Imports DAKOSY_Worker.DEERRE
Imports DocumentFormat.OpenXml.Vml.Presentation
Imports GrapeCity.ActiveReports.Design.DdrDesigner.Designers
Imports GrapeCity.ActiveReports.ReportsCore.Tools
Imports Newtonsoft.Json.Linq
@@ -10,7 +11,7 @@ Public Class frmDigicust
Dim api As cDigicustAPI
Dim dig_sendung As New cDigicustSendungen
Dim ART As String = ""
Dim FilialenNr As Integer
@@ -21,18 +22,15 @@ Public Class frmDigicust
Public CopyFromZA_Id As Integer = -1
Dim FIRMA_DY = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
Dim ZOLL_SYSTEM = "DAKOSY"
Dim DY As DAKOSY_Worker.cDakosy_Zollanmeldungen = Nothing
Public ATT As List(Of String)
Dim AVISO As New cAviso
Dim zusatz As String
Dim cDy_ART As String = If(FIRMA_DY = "ATILLA", "T2", "T1")
Dim VermerkeDAL As New cVermerkeDAL
Dim NCTS As DAKOSY_Worker.cDakosyNCTSOut = Nothing
Dim openExisting As Boolean = False
Dim id As Integer = -1
Dim dgv As DataGridView = Nothing
Dim atez_data As cATEZ_NCTS_DATA
Dim atez = New cATEZ_NCTS_IN
Property BezugsNr As String = ""
Property SENDUNG As VERAG_PROG_ALLGEMEIN.cSendungen
@@ -81,9 +79,9 @@ Public Class frmDigicust
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Try
If atez_data.status = "Sent" Then
'If atez_data.status = "Sent" Then
End If
'End If
If Not checkAttachment() Then
@@ -98,40 +96,42 @@ Public Class frmDigicust
Me.Cursor = Cursors.WaitCursor
Dim settings = New cDigicustSettings(cboStammreferenz._value)
lblInfo.Text = ""
With dig_sendung
'With atez_data
' .AvisoId = AVISO.AvisoID
.avisoId = AVISO.AvisoID
' .SendungsId = SENDUNG.tblSnd_SendungID
' .VERAG_LRN = lblBezugsnummer.Text
' .LicensePlateContainerNo = txtLKWId.Text
' .DAKOSY_TemplateCode = cboStammreferenz._value
' .DAKOSY_IOPartner = txtDyMandant.Text
' .DAKOSY_Division3 = txtDyNiederlassung.Text
' .DestinationCustomsOffice = sbBestimmungsZollstelle._value
' .Carrier_Name = usrCntl_Carrier.kdFirma.Text
' .Carrier_Adress_City = usrCntl_Carrier.txtOrt.Text
' .Carrier_Adress_Country = usrCntl_Carrier.sbLand._value
' .Carrier_Adress_Postcode = usrCntl_Carrier.txtPlz.Text
' .Carrier_Adress_Street = usrCntl_Carrier.txtStrasse.Text
' .Carrier_EORI = usrCntl_Carrier.txtEORI.Text
' .Guarantee_GRN = "" 'leer
.reference = lblBezugsnummer.Text
' ' .LicensePlateContainerNo = txtLKWId.Text
' ' .DAKOSY_TemplateCode = cboStammreferenz._value
' ' .DAKOSY_IOPartner = txtDyMandant.Text
' ' .DAKOSY_Division3 = txtDyNiederlassung.Text
' ' .DestinationCustomsOffice = sbBestimmungsZollstelle._value
' ' .Carrier_Name = usrCntl_Carrier.kdFirma.Text
' ' .Carrier_Adress_City = usrCntl_Carrier.txtOrt.Text
' ' .Carrier_Adress_Country = usrCntl_Carrier.sbLand._value
' ' .Carrier_Adress_Postcode = usrCntl_Carrier.txtPlz.Text
' ' .Carrier_Adress_Street = usrCntl_Carrier.txtStrasse.Text
' ' .Carrier_EORI = usrCntl_Carrier.txtEORI.Text
' ' .Guarantee_GRN = "" 'leer
' For Each doc As DataGridViewRow In dgvAnhaenge.Rows
' Dim isSelected = IIf(DBNull.Value Is doc.Cells("anh_selekt").Value, False, doc.Cells("anh_selekt").Value)
' If isSelected Then
' .selectedDocuments &= doc.Cells("anh_docId").Value & ", "
' End If
' Next
' 'For Each doc As DataGridViewRow In dgvAnhaenge.Rows
' ' Dim isSelected = IIf(DBNull.Value Is doc.Cells("anh_selekt").Value, False, doc.Cells("anh_selekt").Value)
' ' If isSelected Then
' ' .selectedDocuments &= doc.Cells("anh_docId").Value & ", "
' ' End If
' 'Next
' .SAVE()
'.SAVE()
'End With
End With
'sendAtezData(atez_data, atez)
sendDigicustData(dig_sendung, api, settings)
Me.Cursor = Cursors.Default
@@ -142,47 +142,52 @@ Public Class frmDigicust
End Sub
Private Sub sendAtezData(atezData As cATEZ_NCTS_DATA, atez As cATEZ_NCTS_IN)
Private Sub sendDigicustData(dig As cDigicustSendungen, api As cDigicustAPI, settings As cDigicustSettings)
Dim failreDesc As String
Dim authResp = atez.authenticate()
Dim authResp = api.authenticate(rtfToken.Text)
If authResp <> "200" Then
failreDesc = "Authentifizierung fehlgeschlagen - " & authResp & vbNewLine & "Vorgang abgebrochen!"
lblInfo.Text = failreDesc
Exit Sub
End If
Dim token = rtfToken.Text
If Not atez.setJson(atezData) Then MsgBox("Fehler beim Erstellen der Daten" & vbNewLine & "Vorgang abgebrochen!")
If Not atez.setJsonPDF(atezData, dgvAnhaenge) Then MsgBox("Fehler beim Erstellen der PDF-Daten, kein Anhang ausgewählt!" & vbNewLine & "Vorgang abgebrochen!")
Dim azetId = atez.SendRequestWithAuthHeader("application/json", failreDesc)
If failreDesc <> "" Then
If atezData.status = "Draft" Then
MsgBox("Fehler beim Senden" & vbNewLine & failreDesc)
atezData.fehlerbeschreibung = failreDesc
atezData.SAVE()
Exit Sub
End If
Dim result As MsgBoxResult = MsgBox("Fehler beim Senden" & vbNewLine & failreDesc & vbNewLine & "Soll NCTS als Entwurf gespeichert werden?", vbYesNoCancel)
If result = vbYes Then
atezData.status = "Draft"
atezData.fehlerbeschreibung = failreDesc
atezData.SAVE()
If api.uploadingCase(dig, settings, dgvAnhaenge) Then
dig.SAVE()
End If
lblInfo.Text = "Fehler in der API "
'If Not atez.setJson(atezData) Then MsgBox("Fehler beim Erstellen der Daten" & vbNewLine & "Vorgang abgebrochen!")
Else
atezData.status = "Sent"
atezData.atezId = IIf(azetId IsNot Nothing, azetId, "")
atezData.SAVE()
Me.Close()
End If
'If Not atez.setJsonPDF(atezData, dgvAnhaenge) Then MsgBox("Fehler beim Erstellen der PDF-Daten, kein Anhang ausgewählt!" & vbNewLine & "Vorgang abgebrochen!")
'Dim azetId = atez.SendRequestWithAuthHeader("application/json", failreDesc)
'If failreDesc <> "" Then
' If atezData.status = "Draft" Then
' MsgBox("Fehler beim Senden" & vbNewLine & failreDesc)
' atezData.fehlerbeschreibung = failreDesc
' atezData.SAVE()
' Exit Sub
' End If
' Dim result As MsgBoxResult = MsgBox("Fehler beim Senden" & vbNewLine & failreDesc & vbNewLine & "Soll NCTS als Entwurf gespeichert werden?", vbYesNoCancel)
' If result = vbYes Then
' atezData.status = "Draft"
' atezData.fehlerbeschreibung = failreDesc
' atezData.SAVE()
' End If
' lblInfo.Text = "Fehler in der API "
'Else
' atezData.status = "Sent"
' atezData.atezId = IIf(azetId IsNot Nothing, azetId, "")
' atezData.SAVE()
' Me.Close()
'End If
End Sub
@@ -195,7 +200,7 @@ Public Class frmDigicust
If dgv IsNot Nothing AndAlso dgv.Rows.Count > 0 Then
BezugsNr = BezugsNrTmp & "/" & zusatz
For Each r As DataGridViewRow In dgv.Rows
If r.Cells("BezugsNr").Value = BezugsNr Then
If r.Cells("reference").Value = BezugsNr Then
If zusatz.Length = 1 Then
zusatz = Chr(Asc(zusatz.ToString) + 1)
@@ -240,7 +245,10 @@ Public Class frmDigicust
initAttachment()
'If openExisting Then
cboStammreferenz.fillWithSQL("SELECT [id],[description] FROM [tblDigicust_Settings] WHERE companyId = " & VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA_ID & " and valid =1", False, "FMZOLL", True)
cboStammreferenz.changeItem("")
If openExisting Then
' If id > 0 Then
' atez_data = New cATEZ_NCTS_DATA(id)
@@ -293,28 +301,27 @@ Public Class frmDigicust
' Button1.Enabled = False
' End If
'Else
Else
' atez_data = New cATEZ_NCTS_DATA()
' Button1.Text = "An ATEZ senden -->"
' pnlHead.Enabled = True
' cboStammreferenz.fillWithSQL("SELECT [dySr_Stammreferenz],[dySr_Bezeichnung] FROM [tblDakosy_Stammreferenzen] WHERE dySr_Land='DE' AND dySr_Verfahren='NCTS' and dySr_dy_Mandant='" & txtDyMandant.Text & "' and dySr_dy_Niederlassung IN ('','" & txtDyNiederlassung.Text & "') and dySr_visible=1", False, "FMZOLL", True)
' cboStammreferenz.changeItem("")
' getBezugsnr(BezugsNr)
' txtLKWId.Text = AVISO.LKW_Nr
getBezugsnr(BezugsNr)
txtLKWId.Text = AVISO.LKW_Nr
' cbxTemperatur.Checked = IIf(AVISO.TransportTemperatur <> "", True, False)
' txtTransporttemp.Text = AVISO.TransportTemperatur
' If AVISO.Frächter_KdNr IsNot Nothing AndAlso IsNumeric(AVISO.Frächter_KdNr) AndAlso AVISO.Frächter_KdNr > 0 Then
' usrCntl_Carrier.kdFirma.initKdBox(Me)
' usrCntl_Carrier.kdFirma.KdNr = AVISO.Frächter_KdNr
' End If
If AVISO.Frächter_KdNr IsNot Nothing AndAlso IsNumeric(AVISO.Frächter_KdNr) AndAlso AVISO.Frächter_KdNr > 0 Then
usrCntl_Carrier.kdFirma.initKdBox(Me)
usrCntl_Carrier.kdFirma.KdNr = AVISO.Frächter_KdNr
End If
' If AVISO.Grenzstelle.Replace("???", "") = "" Then
'If AVISO.Grenzstelle.Replace("???", "") = "" Then
' sbAbgangZollstelle.SET_VALUE(AVISO.Zollstelle)
' Else
'Else
' Dim GRZ As New VERAG_PROG_ALLGEMEIN.cGrenzstelle(AVISO.Grenzstelle)
' If GRZ IsNot Nothing AndAlso GRZ.hasEntry Then
@@ -324,7 +331,7 @@ Public Class frmDigicust
' End If
' End If
'End If
End If
End Sub
@@ -332,26 +339,26 @@ Public Class frmDigicust
Sub initAttachment()
Dim hSQL As String = " SELECT [anh_id],anh_Datum,[anh_Name],[anh_docId],
CASE WHEN [anh_Art] = 'ATR-EUR1' then 'EUR'
when [anh_Art] = 'Rechnung' then 'INVOICE'
when [anh_Art] = 'eFatura' then 'INVOICE'
when [anh_Art] = 'CMR' then 'CMR'
when [anh_Art] = 'Ausfuhr' then 'OTHER'
when [anh_Art] = 'Vorpapier' then 'OTHER'
when [anh_Art] = 'Packliste' then 'PACK'
when [anh_Art] = 'Auftrag' then 'OTHER'
when [anh_Art] = 'Auftrag' then 'OTHER'
when [anh_Art] = 'Dispoliste' then 'OTHER'
when [anh_Art] = 'Vorkasse' then 'OTHER'
when [anh_Art] = 'Überweisungsbeleg' then 'OTHER'
when [anh_Art] = 'Vollmacht' then 'OTHER'
when [anh_Art] = 'ATB' then 'OTHER'
when [anh_Art] = 'ATA' then 'CarnetATA'
when [anh_Art] = 'Sonstiges' then 'OTHER'
when [anh_Art] ='' then 'OTHER' End
CASE WHEN [anh_Art] = 'ATR-EUR1' then 'EUR1'
when [anh_Art] = 'Rechnung' then 'invoice'
when [anh_Art] = 'eFatura' then 'invoice'
when [anh_Art] = 'CMR' then 'waybill'
when [anh_Art] = 'Ausfuhr' then 'exportDeclaration'
when [anh_Art] = 'Vorpapier' then 'transitDeclaration'
when [anh_Art] = 'Packliste' then 'packingList'
when [anh_Art] = 'Auftrag' then 'UserInput'
when [anh_Art] = 'Dispoliste' then 'UserInput'
when [anh_Art] = 'Vorkasse' then 'UserInput'
when [anh_Art] = 'Überweisungsbeleg' then 'UserInput'
when [anh_Art] = 'Vollmacht' then 'UserInput'
when [anh_Art] = 'ATB' then 'UserInput'
when [anh_Art] = 'ATA' then 'UserInput'
when [anh_Art] = 'Sonstiges' then 'UserInput'
when [anh_Art] ='' then 'UserInput' End
[anh_Art],[anh_Typ] FROM [tblAvisoAnhaenge]
WHERE [anh_AvisoId]='" & AVISO.AvisoID & "' AND isnull(anh_SendungsId,0) <= 0 And anh_Typ = 'PDF'
WHERE [anh_AvisoId]='" & AVISO.AvisoID & "' AND (anh_SendungsId is null OR anh_SendungsId <=0 OR anh_SendungsId=" & SENDUNG.tblSnd_SendungID & ")
Order BY [anh_Reihenfolge], anh_Datum desc, [anh_id]"
'AND isnull(anh_SendungsId,0) <= 0
Dim dt = VermerkeDAL.Anzeigen_Vermerke(hSQL)
@@ -421,6 +428,13 @@ Public Class frmDigicust
Public Function checkMandatoryField() As Boolean
lblInfo.Text = ""
If cboStammreferenz._value = "" Then
lblInfo.Text = "Stammref. auswählen!"
Return False
End If
'TODO
Return True
@@ -438,9 +452,9 @@ Public Class frmDigicust
Private Sub btnCreateToken_Click(sender As Object, e As EventArgs) Handles btnCreateToken.Click
Label2.Text = "Status: " & api.authenticate(rtfToken.Text)
If rtfToken.Text <> "" Then
Label1.Text = "Token (valid 24hrs) until: " & Now().AddHours(24)
Label1.Text = "Token (valid 1h) until: " & Now().AddHours(1)
Else
Label1.Text = "Token (valid 24hrs)"
Label1.Text = "Token (valid 1h)"
End If
End Sub

View File

@@ -30,10 +30,10 @@ Partial Class frmSendungsdetailsNEU
Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Me.pnl = New System.Windows.Forms.Panel()
Me.Panel4 = New System.Windows.Forms.Panel()
Me.TabControl1 = New System.Windows.Forms.TabControl()
@@ -123,6 +123,8 @@ Partial Class frmSendungsdetailsNEU
Me.Panel23 = New System.Windows.Forms.Panel()
Me.Button20 = New System.Windows.Forms.Button()
Me.tbDigicust = New System.Windows.Forms.TabPage()
Me.dgvDigicust = New System.Windows.Forms.DataGridView()
Me.Panel24 = New System.Windows.Forms.Panel()
Me.Button19 = New System.Windows.Forms.Button()
Me.Panel14 = New System.Windows.Forms.Panel()
Me.pnlDetails = New System.Windows.Forms.Panel()
@@ -426,8 +428,8 @@ Partial Class frmSendungsdetailsNEU
Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ToolStripMenuItem14 = New System.Windows.Forms.ToolStripMenuItem()
Me.NurÖffnenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.dgvDigicust = New System.Windows.Forms.DataGridView()
Me.Panel24 = New System.Windows.Forms.Panel()
Me.cntDigicust = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.StatusAbrufenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.pnl.SuspendLayout()
Me.Panel4.SuspendLayout()
Me.TabControl1.SuspendLayout()
@@ -453,6 +455,8 @@ Partial Class frmSendungsdetailsNEU
CType(Me.dgvATEZNCTS, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel23.SuspendLayout()
Me.tbDigicust.SuspendLayout()
CType(Me.dgvDigicust, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel24.SuspendLayout()
Me.pnlDetails.SuspendLayout()
Me.tbcntr.SuspendLayout()
Me.TabPage4.SuspendLayout()
@@ -491,8 +495,7 @@ Partial Class frmSendungsdetailsNEU
Me.ctxtWeitereFormulare.SuspendLayout()
Me.ContextMenuStrip1.SuspendLayout()
Me.ContextMenuStrip2.SuspendLayout()
CType(Me.dgvDigicust, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel24.SuspendLayout()
Me.cntDigicust.SuspendLayout()
Me.SuspendLayout()
'
'pnl
@@ -1609,6 +1612,52 @@ Partial Class frmSendungsdetailsNEU
Me.tbDigicust.Text = "Digicust"
Me.tbDigicust.UseVisualStyleBackColor = True
'
'dgvDigicust
'
Me.dgvDigicust.AllowUserToAddRows = False
Me.dgvDigicust.AllowUserToDeleteRows = False
Me.dgvDigicust.AllowUserToResizeRows = False
DataGridViewCellStyle7.BackColor = System.Drawing.Color.Azure
DataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvDigicust.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
Me.dgvDigicust.BackgroundColor = System.Drawing.Color.White
DataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle8.BackColor = System.Drawing.Color.LightBlue
DataGridViewCellStyle8.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!)
DataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvDigicust.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle8
Me.dgvDigicust.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing
Me.dgvDigicust.Dock = System.Windows.Forms.DockStyle.Fill
Me.dgvDigicust.Location = New System.Drawing.Point(0, 45)
Me.dgvDigicust.MultiSelect = False
Me.dgvDigicust.Name = "dgvDigicust"
Me.dgvDigicust.ReadOnly = True
Me.dgvDigicust.RowHeadersVisible = False
Me.dgvDigicust.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing
DataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvDigicust.RowsDefaultCellStyle = DataGridViewCellStyle9
Me.dgvDigicust.RowTemplate.Height = 20
Me.dgvDigicust.RowTemplate.ReadOnly = True
Me.dgvDigicust.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.[False]
Me.dgvDigicust.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
Me.dgvDigicust.ShowCellErrors = False
Me.dgvDigicust.ShowRowErrors = False
Me.dgvDigicust.Size = New System.Drawing.Size(1206, 243)
Me.dgvDigicust.TabIndex = 107
Me.dgvDigicust.TabStop = False
'
'Panel24
'
Me.Panel24.Controls.Add(Me.Button19)
Me.Panel24.Dock = System.Windows.Forms.DockStyle.Top
Me.Panel24.Location = New System.Drawing.Point(0, 0)
Me.Panel24.Name = "Panel24"
Me.Panel24.Size = New System.Drawing.Size(1206, 45)
Me.Panel24.TabIndex = 108
'
'Button19
'
Me.Button19.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -5451,51 +5500,17 @@ Partial Class frmSendungsdetailsNEU
Me.NurÖffnenToolStripMenuItem.Size = New System.Drawing.Size(255, 30)
Me.NurÖffnenToolStripMenuItem.Text = "nur öffnen"
'
'dgvDigicust
'cntDigicust
'
Me.dgvDigicust.AllowUserToAddRows = False
Me.dgvDigicust.AllowUserToDeleteRows = False
Me.dgvDigicust.AllowUserToResizeRows = False
DataGridViewCellStyle7.BackColor = System.Drawing.Color.Azure
DataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvDigicust.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
Me.dgvDigicust.BackgroundColor = System.Drawing.Color.White
DataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle8.BackColor = System.Drawing.Color.LightBlue
DataGridViewCellStyle8.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!)
DataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvDigicust.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle8
Me.dgvDigicust.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing
Me.dgvDigicust.Dock = System.Windows.Forms.DockStyle.Fill
Me.dgvDigicust.Location = New System.Drawing.Point(0, 45)
Me.dgvDigicust.MultiSelect = False
Me.dgvDigicust.Name = "dgvDigicust"
Me.dgvDigicust.ReadOnly = True
Me.dgvDigicust.RowHeadersVisible = False
Me.dgvDigicust.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing
DataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvDigicust.RowsDefaultCellStyle = DataGridViewCellStyle9
Me.dgvDigicust.RowTemplate.Height = 20
Me.dgvDigicust.RowTemplate.ReadOnly = True
Me.dgvDigicust.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.[False]
Me.dgvDigicust.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
Me.dgvDigicust.ShowCellErrors = False
Me.dgvDigicust.ShowRowErrors = False
Me.dgvDigicust.Size = New System.Drawing.Size(1206, 243)
Me.dgvDigicust.TabIndex = 107
Me.dgvDigicust.TabStop = False
Me.cntDigicust.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.StatusAbrufenToolStripMenuItem})
Me.cntDigicust.Name = "cntDigicust"
Me.cntDigicust.Size = New System.Drawing.Size(181, 48)
'
'Panel24
'StatusAbrufenToolStripMenuItem
'
Me.Panel24.Controls.Add(Me.Button19)
Me.Panel24.Dock = System.Windows.Forms.DockStyle.Top
Me.Panel24.Location = New System.Drawing.Point(0, 0)
Me.Panel24.Name = "Panel24"
Me.Panel24.Size = New System.Drawing.Size(1206, 45)
Me.Panel24.TabIndex = 108
Me.StatusAbrufenToolStripMenuItem.Name = "StatusAbrufenToolStripMenuItem"
Me.StatusAbrufenToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
Me.StatusAbrufenToolStripMenuItem.Text = "Status abrufen"
'
'frmSendungsdetailsNEU
'
@@ -5545,6 +5560,8 @@ Partial Class frmSendungsdetailsNEU
CType(Me.dgvATEZNCTS, System.ComponentModel.ISupportInitialize).EndInit()
Me.Panel23.ResumeLayout(False)
Me.tbDigicust.ResumeLayout(False)
CType(Me.dgvDigicust, System.ComponentModel.ISupportInitialize).EndInit()
Me.Panel24.ResumeLayout(False)
Me.pnlDetails.ResumeLayout(False)
Me.tbcntr.ResumeLayout(False)
Me.TabPage4.ResumeLayout(False)
@@ -5595,8 +5612,7 @@ Partial Class frmSendungsdetailsNEU
Me.ctxtWeitereFormulare.ResumeLayout(False)
Me.ContextMenuStrip1.ResumeLayout(False)
Me.ContextMenuStrip2.ResumeLayout(False)
CType(Me.dgvDigicust, System.ComponentModel.ISupportInitialize).EndInit()
Me.Panel24.ResumeLayout(False)
Me.cntDigicust.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
@@ -5995,4 +6011,6 @@ Partial Class frmSendungsdetailsNEU
Friend WithEvents Button19 As Button
Friend WithEvents dgvDigicust As DataGridView
Friend WithEvents Panel24 As Panel
Friend WithEvents cntDigicust As ContextMenuStrip
Friend WithEvents StatusAbrufenToolStripMenuItem As ToolStripMenuItem
End Class

View File

@@ -2508,6 +2508,9 @@
fjuTNv9i/tQzLEixxaJZiCHx/5vo8E9z4BWUwHZVTQAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="cntDigicust.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAgIAAAAEAIAAoCAEAFgAAACgAAACAAAAAAAEAAAEAIAAAAAAAAAgBABMLAAATCwAAAAAAAAAA

View File

@@ -6428,8 +6428,9 @@ Public Class frmSendungsdetailsNEU
Try
If SENDUNG_LIST IsNot Nothing AndAlso SENDUNG_LIST.Count > 0 Then
Dim SND As VERAG_PROG_ALLGEMEIN.cSendungen = SENDUNG_LIST(CURRENT_INDEX)
Dim frm = New frmDigicust(AVISO, SND, Now.ToString("yy"), dgvATEZNCTS)
Dim frm = New frmDigicust(AVISO, SND, Now.ToString("yy"), dgvDigicust)
frm.Show(Me)
initdgvDigicust()
End If
Catch ex As Exception
@@ -6443,21 +6444,60 @@ Public Class frmSendungsdetailsNEU
With dgvDigicust
.Columns.Clear()
.ReadOnly = False
.DataSource = SQL.loadDgvBySql("select * FROM [tblDigicust_Sessions]", "FMZOLL")
.DataSource = SQL.loadDgvBySql("select * FROM [tblDigicust_Sendungen] WHERE AvisoId='" & AvisoId & "'", "FMZOLL")
If .Columns.Count <= 0 Then Exit Sub
'Ä.Columns("txtStatus").ReadOnly = False
.Columns("session_Id").Visible = True
.Columns("Id").Visible = False
.Columns("AvisoId").Visible = False
.Columns("token").HeaderText = "Token"
.Columns("token").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("reference").HeaderText = "Referenz"
.Columns("reference").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("datetime").HeaderText = "Erstellt"
.Columns("datetime").Width = 100
.Columns("datetime").DefaultCellStyle.Format = "dd.MM.yy HH:mm"
.Columns("datetime").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
.Columns("digicustId").HeaderText = "Digicust ID"
.Columns("digicustId").Width = 300
.Columns("status").HeaderText = "Status"
.Columns("status").Width = 100
.Columns("createdAt").HeaderText = "Erstellt"
.Columns("createdAt").Width = 150
.Columns("createdAt").DefaultCellStyle.Format = "dd.MM.yy HH:mm"
.Columns("createdAt").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
.Columns("modifiedAt").HeaderText = "Geändert"
.Columns("modifiedAt").Width = 150
.Columns("modifiedAt").DefaultCellStyle.Format = "dd.MM.yy HH:mm"
.Columns("modifiedAt").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
.Columns("uploadedDocuments").HeaderText = "Dokumente"
.Columns("uploadedDocuments").Width = 100
.Columns("companyId").Visible = False
.Columns("projectId").Visible = False
.ReadOnly = False
End With
End Sub
Private Sub dgvDigicust_CellMouseDown(sender As Object, e As DataGridViewCellMouseEventArgs) Handles dgvDigicust.CellMouseDown
If e.Button = Windows.Forms.MouseButtons.Right AndAlso e.RowIndex > -1 Then
Dim rowClicked As DataGridView.HitTestInfo
rowClicked = dgvDigicust.HitTest(e.X, e.Y)
dgvDigicust.ClearSelection()
Me.dgvDigicust.Rows(e.RowIndex).Selected = True
cntDigicust.Show(MousePosition.X, MousePosition.Y)
End If
End Sub
Private Sub StatusAbrufenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles StatusAbrufenToolStripMenuItem.Click
Dim digiSendung As New cDigicustSendungen(dgvDigicust.SelectedRows(0).Cells("Id").Value)
Dim API = New cDigicustAPI()
API.fetchingCase(digiSendung)
initdgvDigicust()
End Sub
End Class

View File

@@ -1689,7 +1689,7 @@ Public Class usrcntlAktDetailsATILLANeu
Private Sub dgvATEZNCTS_KeyUp(sender As Object, e As KeyEventArgs) Handles dgvATEZNCTS.KeyUp
If e.KeyCode = Keys.Delete Then
If dgvATEZNCTS.SelectedRows.Count > 0 AndAlso dgvATEZNCTS.SelectedRows(0).Cells("Status").Value <> "Sent" Then
If dgvATEZNCTS.SelectedRows.Count > 0 AndAlso Not IsDBNull(dgvATEZNCTS.SelectedRows(0).Cells("Status").Value) AndAlso dgvATEZNCTS.SelectedRows(0).Cells("Status").Value <> "Sent" Then
If vbYes = MsgBox("Möchten Sie diesen Request wirklich löschen?", vbYesNoCancel) Then
Dim atez As New cATEZ_NCTS_DATA(dgvATEZNCTS.SelectedRows(0).Cells("Id").Value)
atez.delete()