Private Sub DteServiceBeginTextEdit_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles DteServiceBeginTextEdit.Validated
Me.DteServiceBeginTextEdit.ErrorText = ""
End Sub
Private Sub DteServiceBeginTextEdit_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles DteServiceBeginTextEdit.Validating
If Me.DteServiceBeginTextEdit.Text <> "//" Then
If CustomValidator.IsValidPersianDate(Me.DteServiceBeginTextEdit.Text) Then
Else
e.Cancel = True
Me.DteServiceBeginTextEdit.Select(0, Me.DteServiceBeginTextEdit.Text.Length)
Me.DteServiceBeginTextEdit.ErrorText = "این یک تاریخ معتبر فارسی نیست"
' Me.ErrorProvider1.SetError(Me.DteServiceBeginTextEdit, "این یک تاریخ معتبر فارسی نیست")
End If
End If
End Sub
|