ms Änderungen RS Marvin
This commit is contained in:
@@ -25,6 +25,9 @@ Public Class frmPrintOptions
|
||||
SQL = "SELECT * FROM TBKOMMCOLLI_SDG_LHM where SENDUNGNR = " & CURRENT_SENDUNG
|
||||
Dim DTKOMMCOLLI_SDG_LHM As DataTable = ClassDatabase.Return_Datatable(SQL)
|
||||
If DTKOMMCOLLI_SDG_LHM.Rows.Count > 0 Then
|
||||
SQL = "SELECT COUNT(*) FROM TBKOMMCOLLI_SDG_LHM where SENDUNGNR = " & CURRENT_SENDUNG
|
||||
Dim PS = ClassDatabase.Execute_Scalar(SQL, True)
|
||||
|
||||
For Each row As DataRow In DTKOMMCOLLI_SDG_LHM.Rows
|
||||
Dim NAME1 = DTSENDUNG.Rows(0).Item("NAME1").ToString.Trim
|
||||
Dim STRASSE = DTSENDUNG.Rows(0).Item("STRASSE").ToString.Trim
|
||||
@@ -32,6 +35,7 @@ Public Class frmPrintOptions
|
||||
Dim LKZ = DTSENDUNG.Rows(0).Item("LKZ").ToString.Trim
|
||||
Dim ORT = DTSENDUNG.Rows(0).Item("ORT").ToString.Trim
|
||||
Dim NVE = row.Item("NVE")
|
||||
'Dim PS = row.Item("PACKSTUECKANZAHL")
|
||||
If IsDBNull(NVE) Then
|
||||
MsgBox("Es wurden noch keine NVE's erzeugt. Schliessen Sie die Sendung ab!")
|
||||
Dim result As MsgBoxResult = MsgBox("Wollen Sie ein Beispieletikett drucken?", MsgBoxStyle.YesNo, "Bitte bestätigen")
|
||||
@@ -40,7 +44,7 @@ Public Class frmPrintOptions
|
||||
PrintViaIP(CURR_IP_PRINTER, NAME1, STRASSE, PLZ, LKZ, ORT, "123456789101112", 1)
|
||||
End If
|
||||
Else
|
||||
PrintViaIP(CURR_IP_PRINTER, NAME1, STRASSE, PLZ, LKZ, ORT, NVE, Me.txtAnzahl.Text)
|
||||
PrintViaIP(CURR_IP_PRINTER, NAME1, STRASSE, PLZ, LKZ, ORT, NVE, Me.txtAnzahl.Text, PS)
|
||||
End If
|
||||
|
||||
Next
|
||||
@@ -53,7 +57,8 @@ Public Class frmPrintOptions
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Sub PrintViaIP(IP As String, empname As String, empStrasse As String, empPLZ As String, empLKZ As String, empOrt As String, _NVE As String, Optional Anz As Integer = 1)
|
||||
Sub PrintViaIP(IP As String, empname As String, empStrasse As String, empPLZ As String, empLKZ As String, empOrt As String, _NVE As String,
|
||||
Optional Anz As Integer = 1, Optional Packstueck As Integer = 1)
|
||||
Try
|
||||
Dim ipAddress As String = IP
|
||||
Dim port As Integer = 9100
|
||||
@@ -82,7 +87,7 @@ Public Class frmPrintOptions
|
||||
|
||||
pText.AppendLine("^FO405,600^GB1,500,3^FS")
|
||||
pText.AppendLine("^AT^^FO360,610^CI27^^FDAnzahl Packstücke:^FS")
|
||||
pText.AppendLine("^AT^^FO360,950^FD99^FS") 'Anzahl Packstücke Linie
|
||||
pText.AppendLine("^AT^^FO360,950^FD" & Packstueck.ToString & "^FS") 'Anzahl Packstücke Linie
|
||||
pText.AppendLine("^FO330,600^GB1,500,3^FS")
|
||||
pText.AppendLine("^AT^FO290,610^CI27^^FDEmpfänger:^FS")
|
||||
pText.AppendLine("^AU^FO230,610^CI27^^FD" & empname & "^FS")
|
||||
@@ -130,4 +135,15 @@ Public Class frmPrintOptions
|
||||
report.CreateDocument(False)
|
||||
DocumentViewerEx1.Source = report
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
If txtNVE.Text <> "" Then
|
||||
PrintViaIP(CURR_IP_PRINTER, "Hans Mustermann", "Musermannstrasse 1", "12345", "DE", "Musterstadt", txtNVE.Text, 1)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub txtAnzahl_TextChanged(sender As Object, e As EventArgs) Handles txtAnzahl.TextChanged
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user