Änderungen an Fehlersystem
This commit is contained in:
@@ -137,7 +137,26 @@ Partial Class Customers_Default3
|
||||
Protected Sub btn_b_Click(sender As Object, e As EventArgs)
|
||||
dt = Nothing
|
||||
If valdaterage_1.IsValid And valdaterange_2.IsValid Then
|
||||
|
||||
If String.IsNullOrEmpty(Kdnrtext) = False Then
|
||||
If Not String.IsNullOrEmpty(txt_Absender.Text) Then
|
||||
txt_Absender.ValidateRequestMode = UI.ValidateRequestMode.Enabled
|
||||
regex_txt_Absender.Enabled = True
|
||||
regex_txt_Absender.Validate()
|
||||
Try
|
||||
If regex_txt_Absender.IsValid = True Then
|
||||
Absender = txt_Absender.Text
|
||||
Else
|
||||
VERAG_VARIABLES.seterrorcount()
|
||||
lbl_status.Text = VERAG_VARIABLES.geterrornumb + ": Fehler bei der Zuweisung"
|
||||
End If
|
||||
Catch ex As Exception
|
||||
VERAG_VARIABLES.seterrorcount()
|
||||
lbl_status.Text = VERAG_VARIABLES.geterrornumb + ": "
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
lbl_status.Text = "The time chosen is newer then today or older than april 2001. Please correct."
|
||||
End If
|
||||
MsgBox("Test")
|
||||
End Sub
|
||||
@@ -168,14 +187,14 @@ Partial Class Customers_Default3
|
||||
End Sub
|
||||
|
||||
Protected Sub valdaterage_1_ServerValidate(source As Object, args As ServerValidateEventArgs)
|
||||
If Date.ParseExact(pickdate1.Text, "dd.MM.yyyy", provider) < Date.ParseExact("01.04.2001", "dd.MM.yyyy", provider) Then
|
||||
If Date.Parse(pickdate1.Text) < Date.ParseExact("01.04.2001", "dd.MM.yyyy", provider) Then
|
||||
lbl_status.Text = "Der zeitpunkt " + pickdate1.Text + "zu weit zurückliegend."
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub valdaterange_2_ServerValidate(source As Object, args As ServerValidateEventArgs)
|
||||
|
||||
If Date.ParseExact(pickdate2.Text, "dd.MM.yyyy", provider) > Date.ParseExact(Date.Now.ToShortDateString, "dd.MM.yyyy", provider) Then
|
||||
If Date.Parse(pickdate2.Text) > Date.ParseExact(Date.Now.ToShortDateString, "dd.MM.yyyy", provider) Then
|
||||
lbl_status.Text = "Der Zeitpunkt " + pickdate2.Text + " ist zu weit in der Zukunft."
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user