Imports GrapeCity.ActiveReports 
Imports GrapeCity.ActiveReports.Document

Public Class rptSDLBenachrichtigungUTA
    Public sdlNr As Integer = -1
    Public sdlText As String = ""
    Public KdNr As Integer = -1
    Public fahrer As Boolean = False
    Public KUNDE As cKundenFMZOLL
    Public cSqlDb As New cSqlDb
    Public von As Date
    Public bis As Date
    Public sachbearbeiter As String
    Public Sprache As String = "DE"
    Public ds = Nothing
    Private Sub rptAuswertung_ReportStart(sender As System.Object, e As System.EventArgs) Handles MyBase.ReportStart
        If KdNr <= 0 Then MsgBox("Keine Kunden-Nr angegeben!") : Exit Sub
        ' If sdlNr <= 0 Then Exit Sub
        Dim kundenSQL As New kundenSQL
        Me.DataSource = ds


        KUNDE = kundenSQL.getKundeFMZOLLByKdNr(KdNr)

        lblFirma.Text = KUNDE.Name_1 & vbNewLine &
                        IIf(KUNDE.Name_2 <> "", KUNDE.Name_2 & vbNewLine, "") &
                        KUNDE.Straße & vbNewLine & vbNewLine &
                        KUNDE.LandKz & " " & KUNDE.PLZ & " " & KUNDE.Ort

        lblAnspr.Text = KUNDE.Ansprechpartner

        lblUnterschrift.Text = "i.A. " & sachbearbeiter
        Label12.Text = sachbearbeiter

        If KUNDE.Telefax <> "" Then : lblFAX.Text = "FAX-Nr.: " & KUNDE.Telefax
        ElseIf KUNDE.E_Mail <> "" Then : lblFAX.Text = "E-Mail: " & KUNDE.E_Mail
        End If

        Dim gueltig = InputBox("Bitte geben Sie das gültigkeitsdatum an:", "Gültig bis", "")

        Select Case Sprache
            Case "DE"
            Case "TR"
                If False Then
                    Label8.Text = "Sayin Yetkili," & vbNewLine & vbNewLine & "Soförleriniz Cek Otomatik Cihazini alabilmesi icin, asagida belirtmis oldugum Kodu ile " & vbNewLine & "Müracaat ederek, yeni Cihazini almasi ve Otomatik Maut icin dahil olmasi gerekmektedir!"
                    Label13.Text = ""
                    lblBetreff.Text = "Konu: CEK Premid-Box cihazi icin Barkod"
                    Label1.Text = Label1.Text.Replace("2777 - 0", "2777 - 56")
                    Label1.Text = Label1.Text.Replace("yu@verag.ag", "maut.tr@verag.ag")
                    Label1.Text = Label1.Text.Replace("3386", "33155")
                    Label14.Text = "PLAKA"
                    lblMfg.Text = "Mit freundlichen Grüßen / Saygilarimla"
                End If
            Case "YU"
                Label8.Text = "Postovane dame i gospodo," & vbNewLine & vbNewLine & "stigle su Vam nove UTA-kartice!! Stare vrijede samo jos do :  " & gueltig & "  " & "! Nove kartice su aktivne i mogu vec da se koriste!!! Molim Vas da hitno zamjente kartice i unistite stare!"
                'Label8.Text = "Postovane dame i gospodo," & vbNewLine & vbNewLine & "sljedeci kamioni su registrirani za cesku putarinu (PREMID):"
                ' Label13.Text = "Vozac moze da preuzme POST-PAY-kutiju kod svakog PREMID-distributora!"
                ' lblBetreff.Text = "Betr.: REGISTRACIJA CZ-PUTARINE"
                Label1.Text = Label1.Text.Replace("2777 - 0", "2777 - 16")
                Label1.Text = Label1.Text.Replace("yu@verag.ag", "z.batinic@verag.ag")
                Label1.Text = Label1.Text.Replace("3386", "33155")
                ' Label14.Text = "PLATE NUMBER"
                ' lblMfg.Text = "Srdacan pozdrav"
            Case "RO"
                Label8.Text = "Stimate doamne, stimati domni," & vbNewLine & vbNewLine & "Cartele dvs de alimentare UTA-card noi , se pot ridica la centrala firmei VERAG din Suben." &
                    vbNewLine & vbNewLine & "pentru ca cardurile vechii sunt valabile doar pana la data de:  " & gueltig

                Label13.Text = "Soferii dvs pot ridica aceste carduri  in timpul programului de lucru din Suben." & vbNewLine &
                                  "Program de lucru:" & vbTab & "LU-VI	 intre orele  6 - 22" &
                                  vbNewLine & vbTab & vbTab & vbTab & "SA	 intre orele   6- 13"
                lblBetreff.Text = "REF: CARTELE ALIMENTARE UTA-Card!!!!"
                Label16.Text = "Va rugam sa redirectionati codurile pin de la cartela VECHE!!!!!"
                Label1.Text = Label1.Text.Replace("2777 - 0", "2777 - 41")
                Label1.Text = Label1.Text.Replace("yu@verag.ag", "ma@verag.ag")
                Label17.Text = "A T E N T I E !!!"
                Label11.Text = "In cazul in care ati setat boxele de BE /SLO in sistemul de taxare automat POST-PAY prin cartela de taxe UTA,  sa nu ezitati sa o activati pe cea noua inante de a expira cea veche ." &
                            vbNewLine & "Altfel, o sa aveti supriza ca boxele dvs  sau blocat " & vbNewLine & vbNewLine &
                            "BELGIA:" & vbNewLine &
                            "Activarea cartelelor noi UTA pentru boxele SATELIC in sistem automat POST-PAY se face doar in portalul –SATELLIC. Mai antai trebuie sa va inregistrati in acest portal , dupa care va schimbati doar numarul cartelei UTA, altfel boxele dvs sa vor bloca."

                Label14.Text = "NUMERU DE CAMION"
                lblMfg.Text = "Cu salutari cordiale"
        End Select
    End Sub

    Dim dummycount As Integer = 0
    Private Sub Detail1_Format(sender As System.Object, e As System.EventArgs) Handles Detail.Format
        dummycount += 1

        lblKennzeichen.Text = cSqlDb.checkNullStr(Fields.Item("KfzKennzeichen").Value)
        'lblMSENr.Text = cSqlDb.checkNullStr(Fields.Item("MSE-Kd-Nr").Value)

        'Abwechselnd grauen und weißen Hintergrund
        If (dummycount Mod 2) = 0 Then
            Shape.BackColor = System.Drawing.Color.White
        Else
            Shape.BackColor = System.Drawing.Color.WhiteSmoke
        End If
    End Sub



End Class
