Esempio n. 1
0
        private void BRemoveBrand_Click(object sender, EventArgs e)
        {
            List <BrandRawData> removeList = new List <BrandRawData>();

            for (int i = 0; i < BrandList.Items.Count; i++)
            {
                if (BrandList.GetItemChecked(i))
                {
                    BrandRawData tempData = new BrandRawData();
                    tempData.RefactorString(BrandList.Items[i].ToString());
                    removeList.Add(tempData);
                }
            }

            for (int i = 0; i < removeList.Count; i++)
            {
                bool DONE = controller.RemoveBrand(removeList[i].ID);
                if (DONE)
                {
                    MessageBox.Show(removeList[i].ToString() + " Removed");
                }
                else
                {
                    MessageBox.Show(removeList[i].ToString() + " Remove Failed");
                }
            }

            BRefreshBrandList_Click(sender, e);
        }