diff --git a/Aviso/frmATEZ_NCTS.Designer.vb b/Aviso/frmATEZ_NCTS.Designer.vb index 1ba9c57..e2dd237 100644 --- a/Aviso/frmATEZ_NCTS.Designer.vb +++ b/Aviso/frmATEZ_NCTS.Designer.vb @@ -84,7 +84,7 @@ Partial Class frmATEZ_NCTS Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.Button1.Location = New System.Drawing.Point(154, 757) + Me.Button1.Location = New System.Drawing.Point(154, 772) Me.Button1.Margin = New System.Windows.Forms.Padding(2) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(159, 42) @@ -134,7 +134,6 @@ Partial Class frmATEZ_NCTS Me.pnlHead.Controls.Add(Me.Label4) Me.pnlHead.Controls.Add(Me.sbBestimmungsZollstelle) Me.pnlHead.Controls.Add(Me.Label3) - Me.pnlHead.Controls.Add(Me.dgvAnhaenge) Me.pnlHead.Controls.Add(Me.Label9) Me.pnlHead.Controls.Add(Me.sbAbgangZollstelle) Me.pnlHead.Controls.Add(Me.txtDyMandant) @@ -143,7 +142,7 @@ Partial Class frmATEZ_NCTS Me.pnlHead.Controls.Add(Me.lblBezugsnummer) Me.pnlHead.Location = New System.Drawing.Point(3, 2) Me.pnlHead.Name = "pnlHead" - Me.pnlHead.Size = New System.Drawing.Size(478, 750) + Me.pnlHead.Size = New System.Drawing.Size(478, 601) Me.pnlHead.TabIndex = 112 ' 'Label2 @@ -863,10 +862,10 @@ Partial Class frmATEZ_NCTS Me.dgvAnhaenge.BackgroundColor = System.Drawing.Color.White Me.dgvAnhaenge.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvAnhaenge.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.columnName}) - Me.dgvAnhaenge.Location = New System.Drawing.Point(13, 589) + Me.dgvAnhaenge.Location = New System.Drawing.Point(3, 609) Me.dgvAnhaenge.Name = "dgvAnhaenge" Me.dgvAnhaenge.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect - Me.dgvAnhaenge.Size = New System.Drawing.Size(463, 158) + Me.dgvAnhaenge.Size = New System.Drawing.Size(478, 158) Me.dgvAnhaenge.TabIndex = 112 ' 'columnName @@ -956,9 +955,10 @@ Partial Class frmATEZ_NCTS Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ClientSize = New System.Drawing.Size(484, 810) + Me.ClientSize = New System.Drawing.Size(484, 819) Me.Controls.Add(Me.pnlHead) Me.Controls.Add(Me.Button1) + Me.Controls.Add(Me.dgvAnhaenge) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Name = "frmATEZ_NCTS" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen diff --git a/Aviso/frmATEZ_NCTS.vb b/Aviso/frmATEZ_NCTS.vb index 1f31f5b..ce0b7f4 100644 --- a/Aviso/frmATEZ_NCTS.vb +++ b/Aviso/frmATEZ_NCTS.vb @@ -1,4 +1,6 @@ -Imports DocumentFormat.OpenXml.Vml.Presentation +Imports System.Web.UI.WebControls +Imports com.esendex.sdk.sent +Imports DocumentFormat.OpenXml.Vml.Presentation Imports GrapeCity.ActiveReports.Design.DdrDesigner.Designers Imports GrapeCity.ActiveReports.ReportsCore.Tools Imports Newtonsoft.Json.Linq @@ -77,10 +79,24 @@ Public Class frmATEZ_NCTS Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Try - If atez_data.status = "Sent" Then + + If Button1.Text = "JSON" Then + If Not atez.setJson(atez_data) Then MsgBox("Fehler beim Erstellen der Daten") + atez.setJsonPDF(atez_data, dgvAnhaenge) + + Dim data As New DataObject() + data.SetData(DataFormats.Text, atez_data.json) + Clipboard.SetDataObject(data) + Me.Cursor = Cursors.Default + MsgBox("JSON-Daten in Zwischenablage gespeichert") + Exit Sub + End If + + If atez_data.status = "Sent" Then Exit Sub End If + If Not checkAttachment() Then Exit Sub End If @@ -116,13 +132,16 @@ Public Class frmATEZ_NCTS .Carrier_Adress_Street = usrCntl_Carrier.txtStrasse.Text .Carrier_EORI = usrCntl_Carrier.txtEORI.Text .Guarantee_GRN = "" 'leer + .erstellerId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID - '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 + If .selectedDocuments <> "" Then .selectedDocuments = "" + + 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() @@ -155,8 +174,21 @@ Public Class frmATEZ_NCTS Dim authResp = atez.authenticate() If authResp <> "200" Then - failreDesc = "Authentifizierung fehlgeschlagen - " & authResp & vbNewLine & "Vorgang abgebrochen!" - lblInfo.Text = failreDesc + + failreDesc = "Authentifizierung fehlgeschlagen" + lblInfo.Text = failreDesc & " - " & authResp & vbNewLine & "Vorgang abgebrochen" & vbNewLine & " Bitte wiederholen!" + Dim resultAuthentifizierung As MsgBoxResult = MsgBox("Fehler beim Authentifizieren" & vbNewLine & failreDesc & vbNewLine & "Soll NCTS als Entwurf gespeichert werden?", vbYesNoCancel) + + If resultAuthentifizierung = vbYes Then + atezData.status = "Draft" + atezData.fehlerbeschreibung = failreDesc + Return atezData.SAVE() + Else + atezData.status = "Failure" + atezData.fehlerbeschreibung = failreDesc + Return atezData.SAVE() + End If + Return False End If @@ -165,7 +197,6 @@ Public Class frmATEZ_NCTS If Not atez.setJsonPDF(atezData, dgvAnhaenge) Then MsgBox("Fehler beim Erstellen der PDF-Daten, kein Anhang ausgewählt!" & vbNewLine & "Vorgang abgebrochen!") - 'MsgBox(atezData.json) Dim azetId = atez.SendRequestWithAuthHeader("application/json", failreDesc) If failreDesc <> "" Then @@ -189,13 +220,11 @@ Public Class frmATEZ_NCTS lblInfo.Text = "Fehler in der API " Else - If azetId = -1 Then - atezData.fehlerbeschreibung = "Request has been sent, but not header received!" - End If + If azetId = -1 Then atezData.fehlerbeschreibung = "Request has been sent, but no header received!" atezData.status = "Sent" - atezData.atezId = IIf(azetId IsNot Nothing, azetId, "") - Return atezData.SAVE() + atezData.atezId = IIf(azetId IsNot Nothing, azetId, "") + Return atezData.SAVE() End If @@ -254,7 +283,7 @@ Public Class frmATEZ_NCTS End Select initSeachboxes() - initAttachment() + cboProzedur.Items.Clear() @@ -271,11 +300,11 @@ Public Class frmATEZ_NCTS If id > 0 Then atez_data = New cATEZ_NCTS_DATA(id) - + initAttachment() If atez_data.atezId <> "" Then lblInfo.Text = "Atez-ID " & atez_data.atezId Else - lblInfo.Text = "Status: " & atez_data.status + lblInfo.Text = "Status: " & IIf(atez_data.fehlerbeschreibung <> "", atez_data.status & "- " & atez_data.fehlerbeschreibung, atez_data.status) End If @@ -310,12 +339,15 @@ Public Class frmATEZ_NCTS Button1.Text = "An ATEZ senden -->" pnlHead.Enabled = True Button1.Enabled = True - initAttachment() + 'initAttachment() Else Button1.Text = "JSON" pnlHead.Enabled = False + dgvAnhaenge.ReadOnly = True Button1.Enabled = True + + End If @@ -325,6 +357,7 @@ Public Class frmATEZ_NCTS Else atez_data = New cATEZ_NCTS_DATA() + initAttachment() Button1.Text = "An ATEZ senden -->" pnlHead.Enabled = True @@ -362,7 +395,7 @@ Public Class frmATEZ_NCTS sbDurchgangszollstelle6.SET_VALUE(If(AVISO.Durchgangszollstelle6, "")) End If - + 'initAttachment() End Sub Sub initAttachment() @@ -394,7 +427,7 @@ Public Class frmATEZ_NCTS Dim col As DataColumn col = dt.Columns.Add("anh_selekt", GetType(Boolean)) col.SetOrdinal(0) - + dgvAnhaenge.Columns.Clear() dgvAnhaenge.DataSource = dt If dgvAnhaenge.RowCount = 0 Then dgvAnhaenge.Columns.Clear() : Exit Sub @@ -409,7 +442,7 @@ Public Class frmATEZ_NCTS .Columns("anh_id").Visible = False 'VermerkID nicht anzeigenconMenuVermerke .Columns("anh_docId").Visible = False 'AvisoID nicht anzeigen - .Columns("anh_selekt").MinimumWidth = 50 + .Columns("anh_selekt").MinimumWidth = 10 .Columns("anh_selekt").HeaderText = "ausgewählt" .Columns("anh_selekt").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter @@ -432,6 +465,18 @@ Public Class frmATEZ_NCTS End With + If atez_data IsNot Nothing AndAlso atez_data.selectedDocuments <> "" Then + + For Each doc As DataGridViewRow In dgvAnhaenge.Rows + + If atez_data.selectedDocuments.Contains(doc.Cells("anh_docId").Value) Then + doc.Cells("anh_selekt").Value = True + End If + + Next + End If + + End Sub diff --git a/Aviso/frmDigicust.Designer.vb b/Aviso/frmDigicust.Designer.vb index 1467d71..89d603f 100644 --- a/Aviso/frmDigicust.Designer.vb +++ b/Aviso/frmDigicust.Designer.vb @@ -26,26 +26,27 @@ Partial Class frmDigicust Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmDigicust)) Me.Button1 = New System.Windows.Forms.Button() Me.pnlHead = New System.Windows.Forms.Panel() + Me.txtVorpapierT = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.txtLWKLand = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.UsrCntl_Consignee = New SDL.usrCntlAdresse() + Me.txtVorpapier = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.lblVorpapier = New System.Windows.Forms.Label() Me.lblInfo = New System.Windows.Forms.Label() Me.Label6 = New System.Windows.Forms.Label() Me.Label8 = New System.Windows.Forms.Label() + Me.cboStammreferenz = New VERAG_PROG_ALLGEMEIN.MyComboBox() + Me.txtLKWId = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.usrCntl_consignor = New SDL.usrCntlAdresse() Me.Label4 = New System.Windows.Forms.Label() + Me.sbBestimmungsZollstelle = New VERAG_PROG_ALLGEMEIN.MySearchBox() Me.Label3 = New System.Windows.Forms.Label() + Me.dgvAnhaenge = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) + Me.columnName = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.txtDyMandant = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.txtDyNiederlassung = New System.Windows.Forms.Label() Me.lblBezugsnummer = New System.Windows.Forms.Label() - Me.lblVorpapier = New System.Windows.Forms.Label() - Me.UsrCntl_Consignee = New SDL.usrCntlAdresse() - Me.txtVorpapier = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.cboStammreferenz = New VERAG_PROG_ALLGEMEIN.MyComboBox() - Me.txtLKWId = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.usrCntl_consignor = New SDL.usrCntlAdresse() - Me.sbBestimmungsZollstelle = New VERAG_PROG_ALLGEMEIN.MySearchBox() - Me.dgvAnhaenge = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) - Me.columnName = New System.Windows.Forms.DataGridViewTextBoxColumn() - Me.txtLWKLand = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.txtVorpapierT = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.cbxAviso = New System.Windows.Forms.CheckBox() Me.pnlHead.SuspendLayout() CType(Me.dgvAnhaenge, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() @@ -70,6 +71,7 @@ Partial Class frmDigicust ' Me.pnlHead.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.pnlHead.BackColor = System.Drawing.Color.White + Me.pnlHead.Controls.Add(Me.cbxAviso) Me.pnlHead.Controls.Add(Me.txtVorpapierT) Me.pnlHead.Controls.Add(Me.txtLWKLand) Me.pnlHead.Controls.Add(Me.UsrCntl_Consignee) @@ -94,99 +96,51 @@ Partial Class frmDigicust Me.pnlHead.Size = New System.Drawing.Size(606, 706) Me.pnlHead.TabIndex = 112 ' - 'lblInfo + 'txtVorpapierT ' - Me.lblInfo.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblInfo.ForeColor = System.Drawing.Color.Red - Me.lblInfo.Location = New System.Drawing.Point(64, 310) - Me.lblInfo.Name = "lblInfo" - Me.lblInfo.Size = New System.Drawing.Size(460, 27) - Me.lblInfo.TabIndex = 148 + Me.txtVorpapierT._DateTimeOnly = False + Me.txtVorpapierT._numbersOnly = False + Me.txtVorpapierT._numbersOnlyKommastellen = "" + Me.txtVorpapierT._numbersOnlyTrennzeichen = True + Me.txtVorpapierT._Prozent = False + Me.txtVorpapierT._ShortDateNew = False + Me.txtVorpapierT._ShortDateOnly = False + Me.txtVorpapierT._TimeOnly = False + Me.txtVorpapierT._TimeOnly_Seconds = False + Me.txtVorpapierT._value = "" + Me.txtVorpapierT._Waehrung = False + Me.txtVorpapierT._WaehrungZeichen = True + Me.txtVorpapierT.ForeColor = System.Drawing.Color.Black + Me.txtVorpapierT.Location = New System.Drawing.Point(410, 86) + Me.txtVorpapierT.MaxLineLength = -1 + Me.txtVorpapierT.MaxLines_Warning = "" + Me.txtVorpapierT.MaxLines_Warning_Label = Nothing + Me.txtVorpapierT.Name = "txtVorpapierT" + Me.txtVorpapierT.Size = New System.Drawing.Size(33, 20) + Me.txtVorpapierT.TabIndex = 155 ' - 'Label6 + 'txtLWKLand ' - Me.Label6.Location = New System.Drawing.Point(10, 337) - Me.Label6.Name = "Label6" - Me.Label6.Size = New System.Drawing.Size(135, 13) - Me.Label6.TabIndex = 147 - Me.Label6.Text = "Dokumente:" - ' - 'Label8 - ' - Me.Label8.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.Label8.AutoSize = True - Me.Label8.Location = New System.Drawing.Point(14, 58) - Me.Label8.Name = "Label8" - Me.Label8.Size = New System.Drawing.Size(57, 13) - Me.Label8.TabIndex = 146 - Me.Label8.Text = "Stammref.:" - Me.Label8.TextAlign = System.Drawing.ContentAlignment.TopRight - ' - 'Label4 - ' - Me.Label4.Location = New System.Drawing.Point(14, 85) - Me.Label4.Name = "Label4" - Me.Label4.Size = New System.Drawing.Size(78, 20) - Me.Label4.TabIndex = 114 - Me.Label4.Text = "Bes-Zollstelle:" - ' - 'Label3 - ' - Me.Label3.Location = New System.Drawing.Point(319, 61) - Me.Label3.Name = "Label3" - Me.Label3.Size = New System.Drawing.Size(50, 15) - Me.Label3.TabIndex = 113 - Me.Label3.Text = "LKW-KZ:" - ' - 'txtDyMandant - ' - Me.txtDyMandant.BackColor = System.Drawing.Color.White - Me.txtDyMandant.Location = New System.Drawing.Point(2, 2) - Me.txtDyMandant.Name = "txtDyMandant" - Me.txtDyMandant.Size = New System.Drawing.Size(44, 13) - Me.txtDyMandant.TabIndex = 109 - Me.txtDyMandant.Text = "VERG" - Me.txtDyMandant.TextAlign = System.Drawing.ContentAlignment.TopRight - ' - 'Label1 - ' - Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.Label1.AutoSize = True - Me.Label1.BackColor = System.Drawing.Color.White - Me.Label1.Location = New System.Drawing.Point(318, 2) - Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(82, 13) - Me.Label1.TabIndex = 106 - Me.Label1.Text = "Bezugsnummer:" - ' - 'txtDyNiederlassung - ' - Me.txtDyNiederlassung.BackColor = System.Drawing.Color.White - Me.txtDyNiederlassung.Location = New System.Drawing.Point(52, 3) - Me.txtDyNiederlassung.Name = "txtDyNiederlassung" - Me.txtDyNiederlassung.Size = New System.Drawing.Size(45, 12) - Me.txtDyNiederlassung.TabIndex = 108 - Me.txtDyNiederlassung.Text = "SUB" - ' - 'lblBezugsnummer - ' - Me.lblBezugsnummer.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.lblBezugsnummer.BackColor = System.Drawing.Color.White - Me.lblBezugsnummer.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblBezugsnummer.Location = New System.Drawing.Point(406, 2) - Me.lblBezugsnummer.Name = "lblBezugsnummer" - Me.lblBezugsnummer.Size = New System.Drawing.Size(193, 23) - Me.lblBezugsnummer.TabIndex = 107 - Me.lblBezugsnummer.Text = "4800/000000/17 AAA" - Me.lblBezugsnummer.TextAlign = System.Drawing.ContentAlignment.MiddleRight - ' - 'lblVorpapier - ' - Me.lblVorpapier.Location = New System.Drawing.Point(319, 89) - Me.lblVorpapier.Name = "lblVorpapier" - Me.lblVorpapier.Size = New System.Drawing.Size(67, 13) - Me.lblVorpapier.TabIndex = 149 - Me.lblVorpapier.Text = "Vorpapier" + Me.txtLWKLand._DateTimeOnly = False + Me.txtLWKLand._numbersOnly = False + Me.txtLWKLand._numbersOnlyKommastellen = "" + Me.txtLWKLand._numbersOnlyTrennzeichen = True + Me.txtLWKLand._Prozent = False + Me.txtLWKLand._ShortDateNew = False + Me.txtLWKLand._ShortDateOnly = False + Me.txtLWKLand._TimeOnly = False + Me.txtLWKLand._TimeOnly_Seconds = False + Me.txtLWKLand._value = "" + Me.txtLWKLand._Waehrung = False + Me.txtLWKLand._WaehrungZeichen = True + Me.txtLWKLand.ForeColor = System.Drawing.Color.Black + Me.txtLWKLand.Location = New System.Drawing.Point(533, 58) + Me.txtLWKLand.MaxLineLength = -1 + Me.txtLWKLand.MaxLines_Warning = "" + Me.txtLWKLand.MaxLines_Warning_Label = Nothing + Me.txtLWKLand.Name = "txtLWKLand" + Me.txtLWKLand.Size = New System.Drawing.Size(37, 20) + Me.txtLWKLand.TabIndex = 154 ' 'UsrCntl_Consignee ' @@ -221,6 +175,42 @@ Partial Class frmDigicust Me.txtVorpapier.Size = New System.Drawing.Size(121, 20) Me.txtVorpapier.TabIndex = 150 ' + 'lblVorpapier + ' + Me.lblVorpapier.Location = New System.Drawing.Point(319, 89) + Me.lblVorpapier.Name = "lblVorpapier" + Me.lblVorpapier.Size = New System.Drawing.Size(67, 13) + Me.lblVorpapier.TabIndex = 149 + Me.lblVorpapier.Text = "Vorpapier" + ' + 'lblInfo + ' + Me.lblInfo.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblInfo.ForeColor = System.Drawing.Color.Red + Me.lblInfo.Location = New System.Drawing.Point(64, 310) + Me.lblInfo.Name = "lblInfo" + Me.lblInfo.Size = New System.Drawing.Size(460, 27) + Me.lblInfo.TabIndex = 148 + ' + 'Label6 + ' + Me.Label6.Location = New System.Drawing.Point(10, 337) + Me.Label6.Name = "Label6" + Me.Label6.Size = New System.Drawing.Size(135, 13) + Me.Label6.TabIndex = 147 + Me.Label6.Text = "Dokumente:" + ' + 'Label8 + ' + Me.Label8.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.Label8.AutoSize = True + Me.Label8.Location = New System.Drawing.Point(14, 58) + Me.Label8.Name = "Label8" + Me.Label8.Size = New System.Drawing.Size(57, 13) + Me.Label8.TabIndex = 146 + Me.Label8.Text = "Stammref.:" + Me.Label8.TextAlign = System.Drawing.ContentAlignment.TopRight + ' 'cboStammreferenz ' Me.cboStammreferenz._allowedValuesFreiText = Nothing @@ -268,6 +258,14 @@ Partial Class frmDigicust Me.usrCntl_consignor.Size = New System.Drawing.Size(284, 132) Me.usrCntl_consignor.TabIndex = 143 ' + 'Label4 + ' + Me.Label4.Location = New System.Drawing.Point(14, 85) + Me.Label4.Name = "Label4" + Me.Label4.Size = New System.Drawing.Size(78, 20) + Me.Label4.TabIndex = 114 + Me.Label4.Text = "Bes-Zollstelle:" + ' 'sbBestimmungsZollstelle ' Me.sbBestimmungsZollstelle._allowFreitext = False @@ -293,6 +291,14 @@ Partial Class frmDigicust Me.sbBestimmungsZollstelle.TabIndex = 115 Me.sbBestimmungsZollstelle.usrcntl = Nothing ' + 'Label3 + ' + Me.Label3.Location = New System.Drawing.Point(319, 61) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(50, 15) + Me.Label3.TabIndex = 113 + Me.Label3.Text = "LKW-KZ:" + ' 'dgvAnhaenge ' Me.dgvAnhaenge.AKTUALISIERUNGS_INTERVALL = -1 @@ -316,51 +322,59 @@ Partial Class frmDigicust Me.columnName.Name = "columnName" Me.columnName.ReadOnly = True ' - 'txtLWKLand + 'txtDyMandant ' - Me.txtLWKLand._DateTimeOnly = False - Me.txtLWKLand._numbersOnly = False - Me.txtLWKLand._numbersOnlyKommastellen = "" - Me.txtLWKLand._numbersOnlyTrennzeichen = True - Me.txtLWKLand._Prozent = False - Me.txtLWKLand._ShortDateNew = False - Me.txtLWKLand._ShortDateOnly = False - Me.txtLWKLand._TimeOnly = False - Me.txtLWKLand._TimeOnly_Seconds = False - Me.txtLWKLand._value = "" - Me.txtLWKLand._Waehrung = False - Me.txtLWKLand._WaehrungZeichen = True - Me.txtLWKLand.ForeColor = System.Drawing.Color.Black - Me.txtLWKLand.Location = New System.Drawing.Point(533, 58) - Me.txtLWKLand.MaxLineLength = -1 - Me.txtLWKLand.MaxLines_Warning = "" - Me.txtLWKLand.MaxLines_Warning_Label = Nothing - Me.txtLWKLand.Name = "txtLWKLand" - Me.txtLWKLand.Size = New System.Drawing.Size(37, 20) - Me.txtLWKLand.TabIndex = 154 + Me.txtDyMandant.BackColor = System.Drawing.Color.White + Me.txtDyMandant.Location = New System.Drawing.Point(2, 2) + Me.txtDyMandant.Name = "txtDyMandant" + Me.txtDyMandant.Size = New System.Drawing.Size(44, 13) + Me.txtDyMandant.TabIndex = 109 + Me.txtDyMandant.Text = "VERG" + Me.txtDyMandant.TextAlign = System.Drawing.ContentAlignment.TopRight ' - 'txtVorpapierT + 'Label1 ' - Me.txtVorpapierT._DateTimeOnly = False - Me.txtVorpapierT._numbersOnly = False - Me.txtVorpapierT._numbersOnlyKommastellen = "" - Me.txtVorpapierT._numbersOnlyTrennzeichen = True - Me.txtVorpapierT._Prozent = False - Me.txtVorpapierT._ShortDateNew = False - Me.txtVorpapierT._ShortDateOnly = False - Me.txtVorpapierT._TimeOnly = False - Me.txtVorpapierT._TimeOnly_Seconds = False - Me.txtVorpapierT._value = "" - Me.txtVorpapierT._Waehrung = False - Me.txtVorpapierT._WaehrungZeichen = True - Me.txtVorpapierT.ForeColor = System.Drawing.Color.Black - Me.txtVorpapierT.Location = New System.Drawing.Point(410, 86) - Me.txtVorpapierT.MaxLineLength = -1 - Me.txtVorpapierT.MaxLines_Warning = "" - Me.txtVorpapierT.MaxLines_Warning_Label = Nothing - Me.txtVorpapierT.Name = "txtVorpapierT" - Me.txtVorpapierT.Size = New System.Drawing.Size(33, 20) - Me.txtVorpapierT.TabIndex = 155 + Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.Label1.AutoSize = True + Me.Label1.BackColor = System.Drawing.Color.White + Me.Label1.Location = New System.Drawing.Point(318, 2) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(82, 13) + Me.Label1.TabIndex = 106 + Me.Label1.Text = "Bezugsnummer:" + ' + 'txtDyNiederlassung + ' + Me.txtDyNiederlassung.BackColor = System.Drawing.Color.White + Me.txtDyNiederlassung.Location = New System.Drawing.Point(52, 3) + Me.txtDyNiederlassung.Name = "txtDyNiederlassung" + Me.txtDyNiederlassung.Size = New System.Drawing.Size(45, 12) + Me.txtDyNiederlassung.TabIndex = 108 + Me.txtDyNiederlassung.Text = "SUB" + ' + 'lblBezugsnummer + ' + Me.lblBezugsnummer.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.lblBezugsnummer.BackColor = System.Drawing.Color.White + Me.lblBezugsnummer.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblBezugsnummer.Location = New System.Drawing.Point(406, 2) + Me.lblBezugsnummer.Name = "lblBezugsnummer" + Me.lblBezugsnummer.Size = New System.Drawing.Size(193, 23) + Me.lblBezugsnummer.TabIndex = 107 + Me.lblBezugsnummer.Text = "4800/000000/17 AAA" + Me.lblBezugsnummer.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'cbxAviso + ' + Me.cbxAviso.AutoSize = True + Me.cbxAviso.Checked = True + Me.cbxAviso.CheckState = System.Windows.Forms.CheckState.Checked + Me.cbxAviso.Location = New System.Drawing.Point(409, 35) + Me.cbxAviso.Name = "cbxAviso" + Me.cbxAviso.Size = New System.Drawing.Size(150, 17) + Me.cbxAviso.TabIndex = 156 + Me.cbxAviso.Text = "Daten aus Aviso schicken" + Me.cbxAviso.UseVisualStyleBackColor = True ' 'frmDigicust ' @@ -402,4 +416,5 @@ Partial Class frmDigicust Friend WithEvents lblVorpapier As Label Friend WithEvents txtVorpapierT As VERAG_PROG_ALLGEMEIN.MyTextBox Friend WithEvents txtLWKLand As VERAG_PROG_ALLGEMEIN.MyTextBox + Friend WithEvents cbxAviso As CheckBox End Class diff --git a/Aviso/frmDigicust.vb b/Aviso/frmDigicust.vb index 9d283e4..eb05af9 100644 --- a/Aviso/frmDigicust.vb +++ b/Aviso/frmDigicust.vb @@ -124,7 +124,7 @@ Public Class frmDigicust - sendDigicustData(dig_sendung, api, settings) + sendDigicustData(dig_sendung, api, settings, cbxAviso.Checked) Me.Cursor = Cursors.Default @@ -136,7 +136,7 @@ Public Class frmDigicust End Sub - Private Sub sendDigicustData(dig As cDigicustSendungen, api As cDigicustAPI, settings As cDigicustSettings) + Private Sub sendDigicustData(dig As cDigicustSendungen, api As cDigicustAPI, settings As cDigicustSettings, withAvisoData As Boolean) Dim failreDesc As String @@ -147,7 +147,7 @@ Public Class frmDigicust Exit Sub End If - If api.uploadingCase(dig, settings, dgvAnhaenge) Then + If api.uploadingCase(dig, settings, dgvAnhaenge, withAvisoData) Then dig.SAVE() Me.Close() End If diff --git a/Aviso/frmSendungsdetailsNEU.vb b/Aviso/frmSendungsdetailsNEU.vb index 6bfd33d..3dda6e0 100644 --- a/Aviso/frmSendungsdetailsNEU.vb +++ b/Aviso/frmSendungsdetailsNEU.vb @@ -6415,15 +6415,20 @@ Public Class frmSendungsdetailsNEU Private Sub dgvATEZNCTS_KeyUp(sender As Object, e As KeyEventArgs) Handles dgvATEZNCTS.KeyUp If e.KeyCode = Keys.Delete Then If dgvATEZNCTS.SelectedRows.Count > 0 Then - If Not IsDBNull(dgvATEZNCTS.SelectedRows(0).Cells("Status").Value) AndAlso dgvATEZNCTS.SelectedRows(0).Cells("Status").Value <> "Sent" Or IsDBNull(dgvATEZNCTS.SelectedRows(0).Cells("Status").Value) Then + If Not IsDBNull(dgvATEZNCTS.SelectedRows(0).Cells("Status").Value) Or IsDBNull(dgvATEZNCTS.SelectedRows(0).Cells("Status").Value) Then + If dgvATEZNCTS.SelectedRows(0).Cells("Status").Value = "Sent" Then + MsgBox("Bereits gesendete Request können nicht gelöscht werden!") + Exit Sub + End If 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() initdgvATEZ() End If End If + End If - End If + End If End Sub Private Sub Button19_Click(sender As Object, e As EventArgs) Handles Button19.Click diff --git a/Aviso/usrcntlAktDetailsATILLANeu.vb b/Aviso/usrcntlAktDetailsATILLANeu.vb index 863c66f..69c6294 100644 --- a/Aviso/usrcntlAktDetailsATILLANeu.vb +++ b/Aviso/usrcntlAktDetailsATILLANeu.vb @@ -1690,7 +1690,11 @@ 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 Then - If Not IsDBNull(dgvATEZNCTS.SelectedRows(0).Cells("Status").Value) AndAlso dgvATEZNCTS.SelectedRows(0).Cells("Status").Value <> "Sent" Or IsDBNull(dgvATEZNCTS.SelectedRows(0).Cells("Status").Value) Then + If Not IsDBNull(dgvATEZNCTS.SelectedRows(0).Cells("Status").Value) Or IsDBNull(dgvATEZNCTS.SelectedRows(0).Cells("Status").Value) Then + If dgvATEZNCTS.SelectedRows(0).Cells("Status").Value = "Sent" Then + MsgBox("Bereits gesendete Request können nicht gelöscht werden!") + Exit Sub + End If 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()