private void btnDeleteStorage_Click(object sender, EventArgs e) { if (StorageBox.SelectedIndex != -1) { controler.ListOfStorage.Remove((StorageUnit)StorageBox.SelectedItem); controler.Delete((StorageUnit)StorageBox.SelectedItem); StorageBox.Items.Remove(StorageBox.SelectedItem); StorageBox.SelectedItem = -1; StorageBox.Text = String.Empty; dgwProducts.DataSource = null; dgwProducts.Refresh(); } }
private void DeleteEvent(long identifier) { _ctrl.Delete(identifier); _container.Bind(_ctrl.DirectoryMirrorList); save_button.Enabled = true; }