neu
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
Imports GrapeCity.ActiveReports
|
||||
Imports GrapeCity.ActiveReports.Document
|
||||
|
||||
Public Class subRptLaufzettelZollDE_ATA
|
||||
|
||||
Dim ATA As New List(Of VERAG_PROG_ALLGEMEIN.cSendHandling)
|
||||
Dim Fremdspedition As Boolean
|
||||
Dim Vorpapier As String
|
||||
Sub New(ATA As List(Of VERAG_PROG_ALLGEMEIN.cSendHandling), Fremdspedition As Boolean, Vorpapier As String)
|
||||
|
||||
' Dieser Aufruf ist f<>r den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
Me.ATA = ATA
|
||||
Me.Fremdspedition = Fremdspedition
|
||||
Me.Vorpapier = Vorpapier
|
||||
' F<>gen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
End Sub
|
||||
|
||||
Private Sub Detail_Format(sender As Object, e As EventArgs) Handles Detail.Format
|
||||
picBarcodeATAMRN.Image = Nothing
|
||||
picBarcodeATAMRN.Visible = False
|
||||
txtATAMRN.Text = ""
|
||||
txtVorpapier.Text = ""
|
||||
|
||||
If Fremdspedition Then
|
||||
lblSieheFremdspedition.Visible = True
|
||||
TextBox3.Visible = False
|
||||
TextBox1.Visible = False
|
||||
txtColli.Visible = False
|
||||
txtGewicht.Visible = False
|
||||
Else
|
||||
'txtVorpapier.Text = Vorpapier
|
||||
'txtVorpapier.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
If Me.DataSource IsNot Nothing AndAlso Me.Fields IsNot Nothing AndAlso Me.Fields.Item("ATA").Value IsNot Nothing Then
|
||||
Dim ATAMRN As String = Me.Fields.Item("ATA").Value
|
||||
ATAMRN = ATAMRN.Replace(" ", "")
|
||||
ATAMRN = ATAMRN.Replace("/", "")
|
||||
ATAMRN = ATAMRN.Replace("-", "")
|
||||
|
||||
txtATAMRN.Text = ATAMRN
|
||||
If ATAMRN <> "" Then
|
||||
Dim barcodeString = ATAMRN
|
||||
Dim ACD = ""
|
||||
Dim monat = ""
|
||||
If barcodeString.StartsWith("ATA") And barcodeString.Length > 11 Then barcodeString = barcodeString.Substring(4, 7) : ACD = "A"
|
||||
If barcodeString.StartsWith("ATC") And barcodeString.Length > 11 Then barcodeString = barcodeString.Substring(5, 6) : ACD = "C"
|
||||
If barcodeString.StartsWith("ATD") And barcodeString.Length > 11 Then barcodeString = barcodeString.Substring(5, 6) : ACD = "D"
|
||||
|
||||
If ATAMRN.Length > 13 Then monat = ATAMRN.Substring(11, 2)
|
||||
|
||||
If ACD <> "" Then 'ATA/C/D
|
||||
txtATNr.Visible = True
|
||||
If IsNumeric(barcodeString) Then barcodeString = CInt(barcodeString).ToString()
|
||||
txtATNr.Value = ACD & " " & barcodeString & " / " & monat
|
||||
picBarcodeATAMRN.Visible = False
|
||||
Else
|
||||
txtATNr.Visible = False
|
||||
Dim barcodeATA As Image = Code128Rendering.MakeBarcodeImage(barcodeString, 1, True, 20)
|
||||
'barcodeATA.RotateFlip(RotateFlipType.Rotate270FlipNone)
|
||||
picBarcodeATAMRN.Image = barcodeATA
|
||||
picBarcodeATAMRN.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
txtColli.Text = ""
|
||||
txtGewicht.Text = ""
|
||||
If Me.Fields.Item("Colli").Value IsNot Nothing Then txtColli.Text = CDbl(Me.Fields.Item("Colli").Value).ToString("N0") & " Pk"
|
||||
If Me.Fields.Item("Gewicht").Value IsNot Nothing Then txtGewicht.Text = CDbl(Me.Fields.Item("Gewicht").Value).ToString("N1") & " kg"
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub rptAuswertung_ReportStart(sender As System.Object, e As System.EventArgs) Handles MyBase.ReportStart
|
||||
Dim dt As New DataTable
|
||||
dt.Columns.Add("ATA", System.Type.GetType("System.String"))
|
||||
dt.Columns.Add("Colli", System.Type.GetType("System.String"))
|
||||
dt.Columns.Add("Gewicht", System.Type.GetType("System.String"))
|
||||
For Each s In ATA
|
||||
dt.Rows.Add({s.sndhdg_nr, s.sndhdg_colli, s.sndhdg_gewicht})
|
||||
Next
|
||||
Me.DataSource = dt
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user