PIbd-13_Kulikova_D.R_LabWork04_Simple #4
@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user