Esempio n. 1
0
        protected override void Delete()
        {
            if (ListViewBasic.SelectedItems.Count != 0)
            {
                // Get RefBrand from the ListView
                int RefBrand = int.Parse(ListViewBasic.SelectedItems[0].Text);

                if (ControllerManagement.DeleteBrand(RefBrand))
                {
                    ControllerManagement.RefreshListViewBrand();
                    MessageBox.Show("Succesfully deleted the brand !");
                }
                else
                {
                    MessageBox.Show("Error : Fail to delete the brand ! ");
                }
            }
            else
            {
                MessageBox.Show("Error : Choose a brand before trying  to delete it !");
            }
        }