/// <summary> /// Validates the content of the view. /// </summary> /// <remarks> /// Returns true if the validation passed. /// </remarks> private bool ValidateView() { List <ValidationResult> results = new List <ValidationResult>(); if (_View.EndDate < _View.StartDate) { results.Add(new ValidationResult(ValidationField.EndDate, Strings.EndDateCannotBeBeforeStartDate)); } _View.ShowValidationResults(results); return(results.Count == 0); }
/// <summary> /// Validates the content of the view. /// </summary> /// <remarks> /// Returns true if the validation passed. /// </remarks> private bool ValidateView() { var results = new ValidationResults(isPartialValidation: false); if (_View.EndDate < _View.StartDate) { results.Results.Add(new ValidationResult(ValidationField.EndDate, Strings.EndDateCannotBeBeforeStartDate)); } _View.ShowValidationResults(results); return(!results.HasErrors); }