Utils: Replace Utils.Today with DateTime.Today and adapt DeliveryService filters
Test / Run tests (push) Successful in 2m51s
Test / Run tests (push) Successful in 2m51s
This commit is contained in:
@@ -108,7 +108,7 @@ namespace Elwig.Windows {
|
||||
public MailWindow(int? year = null) {
|
||||
InitializeComponent();
|
||||
using (var ctx = new AppDbContext()) {
|
||||
Year = year ?? ctx.Seasons.OrderByDescending(s => s.Year).FirstOrDefault()?.Year ?? Utils.Today.Year;
|
||||
Year = year ?? ctx.Seasons.OrderByDescending(s => s.Year).FirstOrDefault()?.Year ?? DateTime.Today.Year;
|
||||
Title = $"Rundschreiben - Lese {Year} - Elwig";
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace Elwig.Windows {
|
||||
PostalSender1.Text = App.Client.Sender1;
|
||||
PostalSender2.Text = App.Client.Sender2;
|
||||
PostalLocation.Text = App.BranchLocation;
|
||||
PostalDate.Text = $"{Utils.Today:dd.MM.yyyy}";
|
||||
PostalDate.Text = $"{DateTime.Today:dd.MM.yyyy}";
|
||||
EmailSubjectInput.Text = App.Client.TextEmailSubject ?? "Rundschreiben";
|
||||
EmailBodyInput.Text = App.Client.TextEmailBody ?? "Sehr geehrtes Mitglied,\n\nim Anhang finden Sie das aktuelle Rundschreiben.\n\nIhre Winzergenossenschaft\n";
|
||||
}
|
||||
@@ -438,7 +438,7 @@ namespace Elwig.Windows {
|
||||
|
||||
private void Date_LostFocus(object sender, RoutedEventArgs evt) {
|
||||
var res = Validator.CheckDate((TextBox)sender, true);
|
||||
if (!res.IsValid) ((TextBox)sender).Text = $"{Utils.Today:dd.MM.yyyy}";
|
||||
if (!res.IsValid) ((TextBox)sender).Text = $"{DateTime.Today:dd.MM.yyyy}";
|
||||
}
|
||||
|
||||
private async Task UpdateRecipients(AppDbContext ctx) {
|
||||
|
||||
Reference in New Issue
Block a user