private void btnDeleteCustomer_Click(object sender, EventArgs e)
        {
            Customer temp = (Customer)cbDeleteCustomer.SelectedItem;

            management.Delete(temp.CustomerID);
            MessageBox.Show("Deletion successful!");
            RefreshAll();
        }
Пример #2
0
        public void DeleteClient()
        {
            Console.WriteLine("Write client's index:");
            int index = Convert.ToInt32(Console.ReadLine());

            try
            {
                clientManagement.Delete(index);
            }
            catch
            {
                Console.WriteLine("Index out of range!");
                Console.WriteLine("You can't delete client");
            }
        }