LabWork4
This commit is contained in:
parent
aee0c3cbc4
commit
73e53fbec6
@ -175,7 +175,19 @@ public partial class FormSAUCollection : Form
|
|||||||
|
|
||||||
private void buttonCollectionDel_Click(object sender, EventArgs e)
|
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)
|
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