private void buttonDeleteRecipient_Click(object sender, EventArgs e) { hMailServer.DistributionListRecipients recipients = representedObject.Recipients; foreach (ListViewItem item in listRecipients.SelectedItems) { int id = Convert.ToInt32(item.Tag); recipients.DeleteByDBID(id); } Marshal.ReleaseComObject(recipients); ListRecipients(); }
public void DeleteByDBID(int DBID) { _object.DeleteByDBID(DBID); }