Änderung dass es etwas anzeigt fix des vorherigen commit bugs

This commit is contained in:
ja
2021-11-03 11:57:08 +01:00
parent b4006aa491
commit 2a4d657856
5 changed files with 57 additions and 44 deletions

View File

@@ -19,30 +19,30 @@ Partial Class Customers_Default3
If Not Me.Page.User.Identity.IsAuthenticated Then
FormsAuthentication.RedirectToLoginPage()
Else
Try
Kdnrtext = Session.Item("CustomerID")
Catch ex As UnauthorizedAccessException When String.IsNullOrEmpty(Session.Item("CustomerID"))
If String.IsNullOrEmpty(Request.QueryString("P1")) = False Then
Kdnrtext = Request.QueryString("P1")
Else
lbl_status.Text = "Dieser Bereich ist nicht gestattet! Ein Fehler ist bei der Validierung der ID aufgetreten! Bitte erneut versuchen!"
End Try
End If
DataBind()
tbl_Header_row.TableSection = TableRowSection.TableHeader
tbl_Header_row.TableSection = TableRowSection.TableHeader
If (Page.IsPostBack And normaltable.EnableViewState = False) Then
Page.MaintainScrollPositionOnPostBack = True
normaltable.EnableViewState = True
If valreq_pickdate1.IsValid And valreq_pickdate2.IsValid Then
datevon = Date.Parse(pickdate1.Text)
datebis = Date.Parse(pickdate2.Text)
Else
Dim erster = New Date(Now().Year, Now().Month, 1)
datevon = erster
datebis = Date.Parse(Now.ToShortDateString)
pickdate1.Text = erster.ToShortDateString()
pickdate2.Text = Date.Now.ToShortDateString()
If (Page.IsPostBack And normaltable.EnableViewState = False) Then
Page.MaintainScrollPositionOnPostBack = True
normaltable.EnableViewState = True
If valreq_pickdate1.IsValid And valreq_pickdate2.IsValid Then
datevon = Date.Parse(pickdate1.Text)
datebis = Date.Parse(pickdate2.Text)
Else
Dim erster = New Date(Now().Year, Now().Month, 1)
datevon = erster
datebis = Date.Parse(Now.ToShortDateString)
pickdate1.Text = erster.ToShortDateString()
pickdate2.Text = Date.Now.ToShortDateString()
End If
End If
End If
End If
End Sub
Protected Sub initcells(tr As TableRow, t1 As TableCell, t2 As TableCell, t3 As TableCell, t4 As TableCell, t5 As TableCell, t6 As TableCell, t7 As TableCell, t8 As TableCell, th1 As TableHeaderCell, th2 As TableHeaderCell, th3 As TableHeaderCell, th4 As TableHeaderCell, th5 As TableHeaderCell, th6 As TableHeaderCell, th7 As TableHeaderCell, th8 As TableHeaderCell)
@@ -136,11 +136,11 @@ Partial Class Customers_Default3
Protected Sub btn_b_Click(sender As Object, e As EventArgs)
dt = Nothing
Try
Kdnrtext = Session.Item("CustomerID")
Catch ex As UnauthorizedAccessException When String.IsNullOrEmpty(Session.Item("CustomerID"))
If String.IsNullOrEmpty(Request.QueryString("P1")) = False Then
Kdnrtext = Request.QueryString("P1")
Else
lbl_status.Text = "Dieser Bereich ist nicht gestattet! Ein Fehler ist bei der Validierung der ID aufgetreten! Bitte erneut versuchen!"
End Try
End If
If valdaterage_1.IsValid And valdaterange_2.IsValid Then
If String.IsNullOrEmpty(Kdnrtext) = False Then
If Not String.IsNullOrEmpty(txt_Absender.Text) Then
@@ -159,7 +159,7 @@ Partial Class Customers_Default3
lbl_status.Text = VERAG_VARIABLES.geterrornumb + ": Error Sender Validation"
End Try
End If
If Not String.IsNullOrEmpty(txt_Empfaenger.Text) = True Then
If String.IsNullOrEmpty(txt_Empfaenger.Text) = False Then
txt_Empfaenger.ValidateRequestMode = UI.ValidateRequestMode.Enabled
regex_txt_Empfaenger.Enabled = True
regex_txt_Empfaenger.Validate()
@@ -175,7 +175,7 @@ Partial Class Customers_Default3
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error Reciever Validation"
End Try
End If
If Not String.IsNullOrEmpty(txt_KdNrAuftrag.Text) = True Then
If String.IsNullOrEmpty(txt_KdNrAuftrag.Text) = False Then
txt_KdNrAuftrag.ValidateRequestMode = UI.ValidateRequestMode.Enabled
regex_txt_KdNrAuftrag.Enabled = True
regex_txt_KdNrAuftrag.Validate()
@@ -191,7 +191,7 @@ Partial Class Customers_Default3
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error Customer Order number Validation"
End Try
End If
If Not String.IsNullOrEmpty(txt_LKW.Text) = True Then
If String.IsNullOrEmpty(txt_LKW.Text) = False Then
txt_LKW.ValidateRequestMode = UI.ValidateRequestMode.Enabled
regex_txt_LKW.Enabled = True
regex_txt_LKW.Validate()
@@ -207,7 +207,7 @@ Partial Class Customers_Default3
lbl_status.Text = VERAG_VARIABLES.geterrornumb() + "Error LKW Number plate Validation"
End Try
End If
If Not String.IsNullOrEmpty(txt_ReNr.Text) = True Then
If String.IsNullOrEmpty(txt_ReNr.Text) = False Then
txt_ReNr.ValidateRequestMode = UI.ValidateRequestMode.Enabled
regex_txt_ReNr.Enabled = True
regex_txt_ReNr.Validate()
@@ -224,7 +224,7 @@ Partial Class Customers_Default3
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error invoice number validation"
End Try
End If
If Not String.IsNullOrEmpty(txt_Absender_M.Text) = True Then
If String.IsNullOrEmpty(txt_Absender_M.Text) = False Then
txt_Absender_M.ValidateRequestMode = UI.ValidateRequestMode.Enabled
regex_txt_Absender_M.Enabled = True
regex_txt_Absender_M.Validate()
@@ -240,7 +240,7 @@ Partial Class Customers_Default3
lbl_status.Text = VERAG_VARIABLES.geterrornumb + ": Error Sender Validation"
End Try
End If
If Not String.IsNullOrEmpty(txt_Empfaenger_M.Text) = True Then
If String.IsNullOrEmpty(txt_Empfaenger_M.Text) = False Then
txt_Empfaenger_M.ValidateRequestMode = UI.ValidateRequestMode.Enabled
regex_txt_Empaenger_M.Enabled = True
regex_txt_Empaenger_M.Validate()
@@ -256,7 +256,7 @@ Partial Class Customers_Default3
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error Reciever Validation"
End Try
End If
If Not String.IsNullOrEmpty(txt_KdNrAuftrag_M.Text) = True Then
If String.IsNullOrEmpty(txt_KdNrAuftrag_M.Text) = False Then
txt_KdNrAuftrag_M.ValidateRequestMode = UI.ValidateRequestMode.Enabled
regex_txt_KdNrAuftrag_M.Enabled = True
regex_txt_KdNrAuftrag_M.Validate()
@@ -272,7 +272,7 @@ Partial Class Customers_Default3
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error Customer Order number Validation"
End Try
End If
If Not String.IsNullOrEmpty(txt_LKW_M.Text) Then
If String.IsNullOrEmpty(txt_LKW_M.Text) = False Then
txt_LKW_M.ValidateRequestMode = UI.ValidateRequestMode.Enabled
regex_txt_LKW_M.Enabled = True
regex_txt_LKW_M.Validate()
@@ -288,7 +288,7 @@ Partial Class Customers_Default3
lbl_status.Text = VERAG_VARIABLES.geterrornumb() + "Error LKW Number plate Validation"
End Try
End If
If Not String.IsNullOrEmpty(txt_ReNr_M.Text) Then
If String.IsNullOrEmpty(txt_ReNr_M.Text) = False Then
txt_ReNr_M.ValidateRequestMode = UI.ValidateRequestMode.Enabled
regex_txt_ReNr_M.Enabled = True
regex_txt_ReNr_M.Validate()