From e95ade818a640ba17f7da58bc6df58442e591c8a Mon Sep 17 00:00:00 2001 From: Roy Date: Sat, 16 Dec 2017 17:37:29 +0200 Subject: Added all configuration relations ApplicationVersions... VMs to DB Module. Improved notification message box sizing. DB Module tables order by. Implemented dependent entities checking on entity delete. --- .../Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs index b0a261dd0..6c6e1733f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs @@ -155,11 +155,11 @@ namespace Tango.MachineStudio.DB.ViewModels { using (_notification.PushTaskItem("Saving changes to database...")) { - int count = SelectedEntity.GetDependentEntitiesCount(); + var dependenctEntities = SelectedEntity.GetDependentEntitiesNameAndGuid(); - if (count > 0) + if (dependenctEntities.Count > 0) { - _notification.ShowError("The selected entity is being used by " + count + " other entities." + Environment.NewLine + "Please delete any dependencies and try again."); + _notification.ShowError("The selected entity is being used by " + dependenctEntities.Count + " other entities." + Environment.NewLine + "Please delete any dependencies and try again." + Environment.NewLine + Environment.NewLine + String.Join(Environment.NewLine,dependenctEntities.Select(x => x.Key + ", ID: " + x.Value))); return; } -- cgit v1.3.1