private void btnDeleteCustomer_Click(object sender, EventArgs e)
        {
            DialogResult confirmDelete = MessageBox.Show("Are you sure that you want to delete this user?", "Confirm?", MessageBoxButtons.YesNo);

            if (confirmDelete == DialogResult.Yes)
            {
                bool result = Controller.deleteCustomer(currentCustomerId, currentAddressId, currentCityId, currentCountryId);
                if (result)
                {
                    MessageBox.Show($"User: {currentCustomerId} has been successfully deleted.");
                }
                else
                {
                    MessageBox.Show($"ERROR: User: {currentCustomerId} has NOT been deleted.");
                }

                DeleteCustomer deleteCustomer = new DeleteCustomer();
                deleteCustomer.Show();
                this.Dispose(false);
            }
        }
Esempio n. 2
0
        private void btnDeleteCustomer_Click(object sender, EventArgs e)
        {
            DeleteCustomer deleteCustomer = new DeleteCustomer();

            deleteCustomer.Show();
        }