Fehlende Eingabe der Aufbewahrungsfrist wird jetzt sauberer behandelt
This commit is contained in:
@@ -1,18 +1,6 @@
|
||||
using AidA.Data.ViewModel;
|
||||
using AidA.Service.Anonymization;
|
||||
using DevExpress.Xpf.Core;
|
||||
using DevExpress.Xpf.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
|
||||
namespace AidA.View
|
||||
@@ -34,10 +22,29 @@ namespace AidA.View
|
||||
|
||||
private void VorbereitenButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
VorbereitungProgressbar.Visibility = Visibility.Visible;
|
||||
MainController.AnonymisierungslaufVorbereiten2(Int32.Parse(TextEditAufbewahrungsfrist.Text), VorbereitungProgressbar);
|
||||
|
||||
this.Close();
|
||||
if (String.IsNullOrEmpty(TextEditAufbewahrungsfrist.Text))
|
||||
{
|
||||
// Default von 10 Jahren vom Benutzer bestaetigen lassen
|
||||
var text = "Anonymisierungslauf mit einer Aufbewahrungsfrist von 10 Jahren vorbereiten?";
|
||||
MessageBoxResult messageBoxResult = MessageBox.Show(text, "Aufbewahrungsfrist bitte prüfen", MessageBoxButton.OKCancel);
|
||||
if (messageBoxResult.Equals(MessageBoxResult.OK))
|
||||
{
|
||||
VorbereitungProgressbar.Visibility = Visibility.Visible;
|
||||
MainController.AnonymisierungslaufVorbereiten2(10, VorbereitungProgressbar);
|
||||
this.Close();
|
||||
}
|
||||
else if (messageBoxResult.Equals(MessageBoxResult.Cancel))
|
||||
{
|
||||
TextEditAufbewahrungsfrist.Text = "";
|
||||
TextEditAufbewahrungsfrist.Focus();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
VorbereitungProgressbar.Visibility = Visibility.Visible;
|
||||
MainController.AnonymisierungslaufVorbereiten2(Int32.Parse(TextEditAufbewahrungsfrist.Text), VorbereitungProgressbar);
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user