ActivEarth.Competition.Contests.ContestCreationPage.ValidateEndDate C# (CSharp) Méthode

ValidateEndDate() protected méthode

Used to validate that the end date of a contest is on or after the start date.
protected ValidateEndDate ( object source, ServerValidateEventArgs args ) : void
source object
args ServerValidateEventArgs
Résultat void
        protected void ValidateEndDate(object source, ServerValidateEventArgs args)
        {
            DateTime startDate = DateTime.Parse(txbContestStartDate.Text);
            DateTime endDate = DateTime.Parse(args.Value);
            args.IsValid = (startDate <= endDate);
        }