private void BtnRegisterPatron_Click(object sender, System.Windows.RoutedEventArgs e) { if (UIElements == null) { UIElements = ScreenRegisterPatron.Children; } if (!EmptyInputValidator.Validate(UIElements)) { if (!DateTimeValidator.InvalidDates(new List <DatePicker> { txtBirthdate, txtDeath })) { if (!DateTimeValidator.CompareDates(txtBirthdate, txtDeath)) { ExecuteAction(BtnActionPatron.Content.ToString()); } else { MessageControl.InvalidDateRange().ShowMessage(); } } else { MessageControl.InvalidDates().ShowMessage(); } } else { MessageControl.EmptyInput().ShowMessage(); } }