Digicust API
This commit is contained in:
@@ -96,7 +96,8 @@ Public Class frmDigicust
|
||||
|
||||
lblInfo.Text = ""
|
||||
With dig_sendung
|
||||
|
||||
.settingsId = settings.Id
|
||||
.type = settings.type
|
||||
.avisoId = AVISO.AvisoID
|
||||
.reference = lblBezugsnummer.Text
|
||||
.consignor_eori = usrCntl_consignor.txtEORI.Text
|
||||
@@ -115,7 +116,7 @@ Public Class frmDigicust
|
||||
.prepaper_code = txtVorpapierT.Text
|
||||
.licencePlate = txtLKWId.Text
|
||||
.lkwCountryId = txtLWKLand.Text
|
||||
|
||||
.customsOfficeNr = sbBestimmungsZollstelle._value
|
||||
|
||||
'.SAVE()
|
||||
|
||||
@@ -146,7 +147,7 @@ Public Class frmDigicust
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If api.uploadingCase(dig, settings, dgvAnhaenge, withAvisoData) Then
|
||||
If api.uploadingCase(dig, settings, dgvAnhaenge, withAvisoData, cbxAbsender.Checked, cbxEmpfänger.Checked) Then
|
||||
dig.SAVE()
|
||||
Me.Close()
|
||||
End If
|
||||
@@ -296,6 +297,7 @@ Public Class frmDigicust
|
||||
|
||||
Else
|
||||
|
||||
'lblAnh.Visible = True
|
||||
|
||||
getBezugsnr(BezugsNr)
|
||||
|
||||
@@ -324,14 +326,15 @@ Public Class frmDigicust
|
||||
usrCntl_consignor.kdFirma.KdNr = SENDUNG.tblSnd_AbsenderKdNr
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Sub initAttachment()
|
||||
Dim hSQL As String = " SELECT [anh_id],anh_Datum,[anh_Name],[anh_docId],
|
||||
|
||||
case WHEN [anh_size] > 0 Then ROUND([anh_size] / 1000000,2) End as anh_size,
|
||||
CASE WHEN [anh_Art] = 'ATR-EUR1' then 'EUR1'
|
||||
when [anh_Art] = 'Rechnung' then 'invoice'
|
||||
when [anh_Art] = 'eFatura' then 'invoice'
|
||||
@@ -386,6 +389,11 @@ Public Class frmDigicust
|
||||
.Columns("anh_Datum").HeaderText = "Datum"
|
||||
.Columns("anh_Datum").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
|
||||
|
||||
.Columns("anh_size").MinimumWidth = 50
|
||||
.Columns("anh_size").HeaderText = "Größe in MB"
|
||||
.Columns("anh_size").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
|
||||
|
||||
|
||||
.Columns("anh_Art").MinimumWidth = 50
|
||||
.Columns("anh_Art").HeaderText = "Art"
|
||||
.Columns("anh_Art").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
|
||||
@@ -394,8 +402,24 @@ Public Class frmDigicust
|
||||
.Columns("anh_Typ").HeaderText = "Typ"
|
||||
.Columns("anh_Typ").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
|
||||
|
||||
|
||||
End With
|
||||
|
||||
For Each doc As DataGridViewRow In dgvAnhaenge.Rows
|
||||
|
||||
If Not IsDBNull(doc.Cells("anh_size").Value) AndAlso doc.Cells("anh_size").Value > 0 Then
|
||||
Dim size = (doc.Cells("anh_size").Value)
|
||||
If size < 1 Then
|
||||
doc.DefaultCellStyle.BackColor = Color.LightGreen
|
||||
ElseIf size > 1 AndAlso size < 5 Then
|
||||
doc.DefaultCellStyle.BackColor = Color.LightYellow
|
||||
Else
|
||||
doc.DefaultCellStyle.BackColor = Color.IndianRed
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -459,15 +483,32 @@ Public Class frmDigicust
|
||||
sbBestimmungsZollstelle.initSearchBox(Me.FindForm, "[Code] ,[Code] as Nr,Description as Dienststelle,left(Code,2) as Land,[Description] +' (' +left(Code,2)+')' as display FROM [tbl_DY_ZollDE_C0141_Zollstellen]", {" [Code]", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", " left(Code,2),[Description]", "Code", "display", "FMZOLL", , 400, 200, {"display", "Code"})
|
||||
End Sub
|
||||
|
||||
'Private Sub dgvAnhaenge_CellLeave(sender As Object, e As DataGridViewCellEventArgs) Handles dgvAnhaenge.CellLeave
|
||||
|
||||
|
||||
'Private Sub btnCreateToken_Click(sender As Object, e As EventArgs)
|
||||
' Label2.Text = "Status: " & api.authenticate(rtfToken.Text)
|
||||
' If rtfToken.Text <> "" Then
|
||||
' Label1.Text = "Token (valid 1h) until: " & Now().AddHours(1)
|
||||
' Else
|
||||
' Label1.Text = "Token (valid 1h)"
|
||||
' Dim countAnh As Double = 0
|
||||
' If dgvAnhaenge.RowCount > 0 Then
|
||||
|
||||
' If dgvAnhaenge.Columns(e.ColumnIndex).Name = "anh_selekt" Then
|
||||
|
||||
' If Not IsDBNull(dgvAnhaenge.CurrentRow.Cells("anh_selekt").Value) AndAlso dgvAnhaenge.CurrentRow.Cells("anh_selekt").Value = True Then
|
||||
' countAnh += IIf(dgvAnhaenge.CurrentRow.Cells("anh_size").Value IsNot DBNull.Value, dgvAnhaenge.CurrentRow.Cells("anh_size").Value, 0)
|
||||
' End If
|
||||
|
||||
' For Each Row As DataGridViewRow In dgvAnhaenge.Rows
|
||||
' If Row.Cells("anh_selekt").Value IsNot DBNull.Value AndAlso Row.Cells("anh_selekt").Value = True AndAlso Row.Cells("anh_size").Value IsNot DBNull.Value Then
|
||||
' countAnh += IIf(Row.Cells("anh_size").Value IsNot DBNull.Value, Row.Cells("anh_size").Value, 0)
|
||||
' End If
|
||||
' Next
|
||||
|
||||
' lblAnh.Text = "Anhang in MB: " & countAnh.ToString
|
||||
|
||||
' End If
|
||||
|
||||
' End If
|
||||
|
||||
|
||||
|
||||
'End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user