diff --git a/Customers/Invoices.aspx.vb b/Customers/Invoices.aspx.vb index 9d27d32..13d3287 100644 --- a/Customers/Invoices.aspx.vb +++ b/Customers/Invoices.aspx.vb @@ -270,10 +270,11 @@ Partial Class Customers_Invoices Protected Sub Send_Data_Click(sender As Object, e As EventArgs) dt = Nothing - + pickdate1.ValidateRequestMode = UI.ValidateRequestMode.Enabled + pickdate2.ValidateRequestMode = UI.ValidateRequestMode.Enabled valreq_pickdate1.Validate() valreq_pickdate2.Validate() - If valreq_pickdate1.IsValid AndAlso valreq_pickdate2.IsValid AndAlso Kdnrtext = Not "" Then + If valreq_pickdate1.IsValid And valreq_pickdate2.IsValid And Kdnrtext = Not "" Then If txt_Absender.Text IsNot "" Then regexval_txt_Absender.Enabled = True regexval_txt_Absender.Validate() @@ -285,7 +286,7 @@ Partial Class Customers_Invoices Absender = String.Empty End If Catch ex As FormatException - + MsgBox(ex.Message) End Try End If If txt_Empfaenger.Text IsNot "" Then @@ -299,7 +300,7 @@ Partial Class Customers_Invoices Empfaenger = String.Empty End If Catch ex As FormatException - + MsgBox(ex.Message) End Try End If If txt_KdNrAuftrag.Text IsNot "" Then @@ -313,7 +314,7 @@ Partial Class Customers_Invoices KDNAFNR = String.Empty End If Catch ex As FormatException - + MsgBox(ex.Message) End Try End If If txt_LKWNr.Text IsNot "" Then @@ -327,7 +328,7 @@ Partial Class Customers_Invoices LKWNR = String.Empty End If Catch ex As FormatException - + MsgBox(ex.Message) End Try End If If txt_ReNr.Text IsNot "" Then @@ -341,7 +342,7 @@ Partial Class Customers_Invoices reNr = String.Empty End If Catch ex As FormatException - + MsgBox(ex.Message) End Try End If @@ -350,7 +351,7 @@ Partial Class Customers_Invoices Try Absender = txt_Absender_M.Text Catch ex As FormatException - + MsgBox(ex.Message) End Try End If If txt_Empfaenger_M.Text IsNot "" Then @@ -358,7 +359,7 @@ Partial Class Customers_Invoices Try Empfaenger = txt_Empfaenger_M.Text Catch ex As FormatException - + MsgBox(ex.Message) End Try End If If txt_KdNrAuftrag_M.Text IsNot "" Then @@ -366,7 +367,7 @@ Partial Class Customers_Invoices Try KDNAFNR = txt_KdNrAuftrag_M.Text Catch ex As FormatException - + MsgBox(ex.Message) End Try End If If txt_LKWNr_M.Text IsNot "" Then @@ -374,7 +375,7 @@ Partial Class Customers_Invoices Try LKWNR = txt_LKWNr_M.Text Catch ex As FormatException - + MsgBox(ex.Message) End Try End If If txt_ReNr_M.Text IsNot "" Then @@ -382,11 +383,10 @@ Partial Class Customers_Invoices Try reNr = txt_ReNr_M.Text Catch ex As FormatException - + MsgBox(ex.Message) End Try End If - pickdate1.ValidateRequestMode = UI.ValidateRequestMode.Enabled - pickdate2.ValidateRequestMode = UI.ValidateRequestMode.Enabled + If pickdate1.Text = Nothing Or pickdate2.Text = Nothing Then Try Dim erster = New Date(Now().Year, Now().Month, 1) @@ -409,7 +409,7 @@ Partial Class Customers_Invoices End If Kdnrtext = VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(Request.QueryString("P4")) - MsgBox(Kdnrtext) + 'MsgBox(Kdnrtext) If String.IsNullOrEmpty(Kdnrtext) = False And String.IsNullOrEmpty(datevon.ToString) = False And String.IsNullOrEmpty(datebis.ToString) = False Then dt = VERAG_PROG_ALLGEMEIN.cRechnungsausgang.GET_LIST_WEB(Integer.Parse(Kdnrtext), datevon, datebis, Integer.Parse(reNr), Absender, Empfaenger, LKWNR, KDNAFNR) ElseIf String.IsNullOrEmpty(Kdnrtext) = True Or String.IsNullOrEmpty(datevon.ToString) = True And String.IsNullOrEmpty(datebis.ToString) = True And String.IsNullOrEmpty(reNr) = True And String.IsNullOrEmpty(Absender) = False And String.IsNullOrEmpty(LKWNR) = False And String.IsNullOrEmpty(Empfaenger) = False And String.IsNullOrEmpty(KDNAFNR) = False Then @@ -436,14 +436,12 @@ Partial Class Customers_Invoices tbl_CellIndex.ValidateRequestMode = UI.ValidateRequestMode.Enabled tbl_CellIndex.Text = zahl tr.Cells.Add(tbl_CellIndex) - initcells(tr, tbl_CellIndex, tbl_CellRENr, tbl_CellLKWs, tbl_Cell_Auftragsdatum, tbl_CellKundAuftNr, tbl_CellAbsender, tbl_CellEmpfaenger, tbl_CellInfo, tbl_HeaderCellIndexNr, tbl_HeaderCell_ReNr, tbl_HeaderCell_LKWNr, tbl_HeaderCell_Auftragsdatum, tbl_HeaderCell_KundAuftrNr, tbl_HeaderCell_Absender, tbl_HeaderCell_Empfaenger, tbl_HeaderCell_Info) - tbl_CellLKWs.ValidateRequestMode = UI.ValidateRequestMode.Enabled - tbl_CellLKWs.Text = d.LKW_Kennzeichen.ToString - tr.Cells.Add(tbl_CellLKWs) tbl_CellRENr.ValidateRequestMode = UI.ValidateRequestMode.Enabled tbl_CellRENr.Text = d.RechnungsNr.ToString tr.Cells.Add(tbl_CellRENr) - + tbl_CellLKWs.ValidateRequestMode = UI.ValidateRequestMode.Enabled + tbl_CellLKWs.Text = d.LKW_Kennzeichen.ToString + tr.Cells.Add(tbl_CellLKWs) tbl_Cell_Auftragsdatum.ValidateRequestMode = UI.ValidateRequestMode.Enabled tbl_Cell_Auftragsdatum.Text = d.RechnungsDatum.ToString tr.Cells.Add(tbl_Cell_Auftragsdatum) @@ -465,11 +463,11 @@ Partial Class Customers_Invoices 'btn.Attributes.Add("Text", ) btn.Attributes.Add("href", "pdfviewer.aspx?P1=" + VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(d.FilialenNr).ToString() + "&P2=" + VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(d.AbfertigungsNr).ToString + "&P3=" + VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(d.RK_ID).ToString) btn.Attributes.Add("target", "_blank") - btn.PostBackUrl = "pdfviewer.aspx?P1=" + VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(d.FilialenNr).ToString + "&P2=" + VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(d.AbfertigungsNr).ToString + "&P2=" + VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(d.AbfertigungsNr).ToString + "&P3=" + VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(d.RK_ID).ToString + btn.PostBackUrl = "pdfviewer.aspx?P1=" + VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(d.FilialenNr).ToString + "&P2=" + VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(d.AbfertigungsNr).ToString + "&P3=" + VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(d.RK_ID).ToString tbl_CellInfo.ValidateRequestMode = UI.ValidateRequestMode.Enabled tbl_CellInfo.Controls.Add(btn) tr.Cells.Add(tbl_CellInfo) - + initcells(tr, tbl_CellIndex, tbl_CellRENr, tbl_CellLKWs, tbl_Cell_Auftragsdatum, tbl_CellKundAuftNr, tbl_CellAbsender, tbl_CellEmpfaenger, tbl_CellInfo, tbl_HeaderCellIndexNr, tbl_HeaderCell_ReNr, tbl_HeaderCell_LKWNr, tbl_HeaderCell_Auftragsdatum, tbl_HeaderCell_KundAuftrNr, tbl_HeaderCell_Absender, tbl_HeaderCell_Empfaenger, tbl_HeaderCell_Info) normaltable.Rows.Add(tr) i += 1 @@ -486,9 +484,4 @@ Partial Class Customers_Invoices End If End If End Sub - - - - - End Class