aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs15
1 files changed, 7 insertions, 8 deletions
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 bc8d54ce9..a3d3e2486 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
@@ -156,21 +156,20 @@ namespace Tango.MachineStudio.DB.ViewModels
{
using (_notification.PushTaskItem("Saving changes to database..."))
{
- var dependenctEntities = SelectedEntity.GetDependentEntitiesNameAndGuid();
+ //var dependenctEntities = SelectedEntity.GetDependentEntitiesNameAndGuid();
- if (dependenctEntities.Count > 0)
- {
- _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;
- }
+ //if (dependenctEntities.Count > 0)
+ //{
+ // _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;
+ //}
try
{
- await SelectedEntity.SoftDeleteAsync();
+ await SelectedEntity.DeleteAsync();
}
catch (Exception ex)
{
- SelectedEntity.Deleted = false;
Adapter.Invalidate();
_notification.ShowError("Could not delete entity.");
}