diff --git a/Customers/Invoices.aspx.vb b/Customers/Invoices.aspx.vb index 9bc9656..963a17d 100644 --- a/Customers/Invoices.aspx.vb +++ b/Customers/Invoices.aspx.vb @@ -319,15 +319,15 @@ Partial Class Customers_Default3 End Try Else Try - datevon = Date.Parse(pickdate1.Text) - datebis = Date.Parse(pickdate2.Text) + datevon = CDate(pickdate1.Text) + datebis = CDate(pickdate2.Text) Catch ex As Exception VERAG_VARIABLES.seterrorcount(14) lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error in date time conversions" End Try End If - If String.IsNullOrEmpty(Kdnrtext) = False And String.IsNullOrEmpty(datevon.ToShortDateString) = False AndAlso String.IsNullOrEmpty(datebis.ToShortDateString) = False Then + If String.IsNullOrEmpty(Kdnrtext) = False AndAlso String.IsNullOrEmpty(datevon.ToShortDateString) = False AndAlso String.IsNullOrEmpty(datebis.ToShortDateString) = False Then dt = VERAG_PROG_ALLGEMEIN.cRechnungsausgang.GET_LIST_WEB(Integer.Parse(Kdnrtext), datevon, datebis, Integer.Parse(reNr), Absender, Empfaenger, LKWNR, KDNAFNR) Else valreq_pickdate1.Validate() @@ -338,7 +338,7 @@ Partial Class Customers_Default3 End If End If - If dt IsNot Nothing AndAlso Not dt.Count = 0 Then + If Not dt.Count = 0 Then Dim i As Integer = 0 For Each d In dt Dim tr As TableRow = New TableRow