/// <summary> /// /// </summary> /// <param name="device"></param> public void RemoveDevice(Device device) { // Verwijder koppel records DevProgCollection devProgCollection = new DevProgCollection(); devProgCollection.GetAllByDeviceID(device.ID); devProgCollection.DeleteAll(); if (_deviceCollection != null) _deviceCollection.Remove(device); }
/// <summary> /// Delete Device /// </summary> public override void Delete() { // Verwijder eerst gekoppelde records, gekoppeld via koppel tabel DevProgCollection devProgCollection = new DevProgCollection(); devProgCollection.GetAllByDeviceID(ID); devProgCollection.DeleteAll(); base.Delete(); // Verwijder; direct gekoppelde records if (Group != null) Group.TryDelete(); }
/// <summary> /// Delete Program /// </summary> public override void Delete() { // Verwijder eerst gekoppelde records, gekoppeld via koppel tabel DevProgCollection devProgCollection = new DevProgCollection(); devProgCollection.GetAllByProgramID(ID); devProgCollection.DeleteAll(); base.Delete(); }