This commit is contained in:
kirkorovka 2024-04-21 15:43:01 +04:00
parent aee0c3cbc4
commit 73e53fbec6

View File

@ -175,7 +175,19 @@ public partial class FormSAUCollection : Form
private void buttonCollectionDel_Click(object sender, EventArgs e)
{
if (listBoxCollection.SelectedItem == null) return;
if (MessageBox.Show("Вы действительно хотите удалить выбранный элемент?",
"Удаление", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
_storageCollection.DelCollection(listBoxCollection.SelectedItem.ToString());
UpdateListBoxItems();
MessageBox.Show("Компания удалена");
}
else
{
MessageBox.Show("Не удалось удалить компанию");
}
}
private void buttonCreateCompany_Click(object sender, EventArgs e)
@ -208,4 +220,10 @@ public partial class FormSAUCollection : Form
{
}
private void labelCollectionName_Click(object sender, EventArgs e)
{
}
}