DeliveryAdminWindow: Add user confirmation on closing when creating
This commit is contained in:
@ -778,6 +778,12 @@ namespace Elwig.Windows {
|
||||
}
|
||||
|
||||
private async void CancelCreatingButton_Click(object sender, RoutedEventArgs evt) {
|
||||
if (IsCreating && HasChanged) {
|
||||
var r = MessageBox.Show("Soll der Vorgang wirklich abgebrochen werden?", "Abbrechen bestätigen",
|
||||
MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.No);
|
||||
if (r != MessageBoxResult.Yes) return;
|
||||
}
|
||||
|
||||
ControlUtils.RenewItemsSource(AttributesInput, await Context.WineAttributes.OrderBy(a => a.Name).ToListAsync(), i => (i as WineAttr)?.AttrId);
|
||||
ControlUtils.RenewItemsSource(MemberInput, await Context.Members.Where(m => m.IsActive || !IsReceipt).OrderBy(m => m.FamilyName).ThenBy(m => m.GivenName).ToListAsync(), i => (i as Member)?.MgNr);
|
||||
if (DeliveryList.SelectedItem is not Delivery d) {
|
||||
|
Reference in New Issue
Block a user