private void btnDelete_Click(object sender, EventArgs e) { TableMemberInfos deletings = new TableMemberInfos(rewriteParent: false); foreach (TreeListNode node in treeExist.Selection) { TableMemberInfo info = treeExist.GetDataRecordByNode(node) as TableMemberInfo; if (info != null && info.Item != null) { DBInterface.DestroyInstance(info.Item); UnuseInitTable(info); EraseExistDate(info); deletings.Add(info); } } // Удаление записей foreach (TableMemberInfo infoInter in deletings) { MemberExists.RemoveEx(infoInter); } }
protected override void DestroyInstance(object instance) { DBInterface dbInterface = FindDBInterface(); if (instance is DBInterfaceItemBase) { dbInterface.DestroyInstance(instance as DBInterfaceItemBase); } base.DestroyInstance(instance); }