protected override void DeleteItems(List <ListViewItem> items) { hMailServer.Domain domain = APICreator.GetDomain(_domainID); hMailServer.Accounts accounts = domain.Accounts; foreach (ListViewItem item in items) { int accountID = Convert.ToInt32(item.Tag); accounts.DeleteByDBID(accountID); } Marshal.ReleaseComObject(domain); Marshal.ReleaseComObject(accounts); }
public void DeleteByDBID(int DBID) { _object.DeleteByDBID(DBID); }