private void ConfirmButton_Click(object sender, RoutedEventArgs e) { if (purchase.ItemsAmount > 0) { PurchaseDB.Add(purchase); PurchaseCreated?.Invoke(purchase); Close(); } else { MessageBox.Show("Goods list is empty!"); } }
protected virtual void OnPurchaseCreated() { CreateNotification(EventActionType.Created); PurchaseCreated?.Invoke(this, new NewNotificationEventArgs(this)); }