Änderung regex validierungen

This commit is contained in:
ja
2021-11-03 13:38:39 +01:00
parent be99a1e707
commit 33523ec7a3
2 changed files with 31 additions and 5 deletions

View File

@@ -152,10 +152,12 @@ Partial Class Customers_Default3
Absender = txt_Absender.Text
Else
VERAG_VARIABLES.seterrorcount(1)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + ": Error with the Sender"
End If
Catch ex As Exception
VERAG_VARIABLES.seterrorcount(2)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + ": Error Sender Validation"
End Try
End If
@@ -168,10 +170,12 @@ Partial Class Customers_Default3
Empfaenger = txt_Empfaenger.Text
Else
VERAG_VARIABLES.seterrorcount(3)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error with the Reciever"
End If
Catch ex As Exception
VERAG_VARIABLES.seterrorcount(4)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error Reciever Validation"
End Try
End If
@@ -184,10 +188,12 @@ Partial Class Customers_Default3
KDNAFNR = txt_KdNrAuftrag.Text
Else
VERAG_VARIABLES.seterrorcount(5)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error with the Customer Order number validation"
End If
Catch ex As Exception
VERAG_VARIABLES.seterrorcount(11)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error Customer Order number Validation"
End Try
End If
@@ -200,10 +206,12 @@ Partial Class Customers_Default3
LKWNR = txt_LKW.Text
Else
VERAG_VARIABLES.seterrorcount(6)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error at Validation in LKW number plate field"
End If
Catch Ex As Exception
VERAG_VARIABLES.seterrorcount(12)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb() + "Error LKW Number plate Validation"
End Try
End If
@@ -217,10 +225,12 @@ Partial Class Customers_Default3
Else
reNr = "-1"
VERAG_VARIABLES.seterrorcount(7)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error at the Validation in the invoice number field"
End If
Catch ex As Exception
VERAG_VARIABLES.seterrorcount(13)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error invoice number validation"
End Try
End If
@@ -233,10 +243,12 @@ Partial Class Customers_Default3
Absender = txt_Absender_M.Text
Else
VERAG_VARIABLES.seterrorcount(1)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + ": Error with the Sender"
End If
Catch ex As Exception
VERAG_VARIABLES.seterrorcount(2)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + ": Error Sender Validation"
End Try
End If
@@ -249,10 +261,12 @@ Partial Class Customers_Default3
Empfaenger = txt_Empfaenger_M.Text
Else
VERAG_VARIABLES.seterrorcount(3)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error with the Reciever"
End If
Catch ex As Exception
VERAG_VARIABLES.seterrorcount(4)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error Reciever Validation"
End Try
End If
@@ -265,10 +279,12 @@ Partial Class Customers_Default3
KDNAFNR = txt_KdNrAuftrag_M.Text
Else
VERAG_VARIABLES.seterrorcount(5)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error with the Customer Order number validation"
End If
Catch ex As Exception
VERAG_VARIABLES.seterrorcount(11)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error Customer Order number Validation"
End Try
End If
@@ -281,10 +297,12 @@ Partial Class Customers_Default3
LKWNR = txt_LKW_M.Text
Else
VERAG_VARIABLES.seterrorcount(6)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error at Validation in LKW number plate field"
End If
Catch Ex As Exception
VERAG_VARIABLES.seterrorcount(12)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb() + "Error LKW Number plate Validation"
End Try
End If
@@ -298,10 +316,12 @@ Partial Class Customers_Default3
Else
reNr = "-1"
VERAG_VARIABLES.seterrorcount(7)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error at the Validation in the invoice number field"
End If
Catch ex As Exception
VERAG_VARIABLES.seterrorcount(13)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error invoice number validation"
End Try
End If
@@ -315,6 +335,7 @@ Partial Class Customers_Default3
pickdate2.Text = datebis.ToShortDateString
Catch ex As Exception
VERAG_VARIABLES.seterrorcount(14)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error in date time conversions"
End Try
Else
@@ -323,6 +344,7 @@ Partial Class Customers_Default3
datebis = CDate(pickdate2.Text)
Catch ex As Exception
VERAG_VARIABLES.seterrorcount(14)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error in date time conversions"
End Try
End If
@@ -334,6 +356,7 @@ Partial Class Customers_Default3
valreq_pickdate2.Validate()
If valreq_pickdate1.IsValid AndAlso valreq_pickdate2.IsValid Then
VERAG_VARIABLES.seterrorcount(15)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error in form validation. Please fill in all fields"
End If
End If
@@ -401,6 +424,7 @@ Partial Class Customers_Default3
End If
Else
VERAG_VARIABLES.seterrorcount(16)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error in getting Customer-ID from login"
End If
Else
@@ -408,7 +432,7 @@ Partial Class Customers_Default3
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "The time chosen is newer then today or older than april 2001. Please correct"
End If
MsgBox("Test")
'MsgBox("Test")
End Sub
Protected Sub btn_resetForm_Click(sender As Object, e As EventArgs)
@@ -439,6 +463,7 @@ Partial Class Customers_Default3
Protected Sub valdaterage_1_ServerValidate(source As Object, args As ServerValidateEventArgs)
If Date.Parse(pickdate1.Text) < Date.ParseExact("01.04.2001", "dd.MM.yyyy", provider) Then
VERAG_VARIABLES.seterrorcount(9)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "The chosen time " + pickdate1.Text + " is too early"
End If
End Sub
@@ -447,6 +472,7 @@ Partial Class Customers_Default3
If Date.Parse(pickdate2.Text) > Date.ParseExact(Date.Now.ToShortDateString, "dd.MM.yyyy", provider) Then
VERAG_VARIABLES.seterrorcount(10)
lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "The chosen time " + pickdate2.Text + " is too far in the future"
End If
End Sub