Пример #1
0
        private void ExitButton_Click(object sender, RoutedEventArgs e)
        {
            WConfirmation wc = new WConfirmation("Are you sure you want to exit?");

            if (wc.ShowDialog() == true)
            {
                Close();
            }
        }
Пример #2
0
        private void Delete_Customer_Click(object sender, RoutedEventArgs e)
        {
            WConfirmation wc = new WConfirmation($"Are you sure you want to delete {mvm.SelectedCustomer.Name}?");

            if (wc.ShowDialog() == true)
            {
                mvm.DeleteCustomer(mvm.SelectedCustomer);
                Display_Customer.IsEnabled = false;
                Update_Customer.IsEnabled  = false;
                Delete_Customer.IsEnabled  = false;
                ChooseCustomer.IsEnabled   = false;
            }
        }