aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ProcessParametersTablesGroupsViewVM.cs
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-01-31 10:11:27 +0200
committerShlomo Hecht <shlomo@twine-s.com>2018-01-31 10:11:27 +0200
commitb55483f9f095b699728e0b587ceebfdf6409a48a (patch)
tree1d424d3fc9f75154ecae30806b952fdfb029fce9 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ProcessParametersTablesGroupsViewVM.cs
parente027cb9fdd17fe3be7bb2c385dc37061a7eea8bb (diff)
parent2fa92ca3654ebb274482f9bad86231028d357e5a (diff)
downloadTango-b55483f9f095b699728e0b587ceebfdf6409a48a.tar.gz
Tango-b55483f9f095b699728e0b587ceebfdf6409a48a.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ProcessParametersTablesGroupsViewVM.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ProcessParametersTablesGroupsViewVM.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ProcessParametersTablesGroupsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ProcessParametersTablesGroupsViewVM.cs
new file mode 100644
index 000000000..87fdecec8
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ProcessParametersTablesGroupsViewVM.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Integration.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class ProcessParametersTablesGroupsViewVM : DbTableViewModel<ProcessParametersTablesGroup>
+ {
+ public ProcessParametersTablesGroupsViewVM(INotificationProvider notification) : base(notification)
+ {
+
+ }
+
+ protected override void OnBeforeEntitySave(DialogOpenMode mode, ProcessParametersTablesGroup entity)
+ {
+ entity.SaveDate = DateTime.UtcNow;
+
+ if (entity.Rml != null && entity.Active)
+ {
+ foreach (var group in entity.Rml.ProcessParametersTablesGroups.Where(x => x != entity))
+ {
+ group.Active = false;
+ }
+ }
+
+ base.OnBeforeEntitySave(mode, entity);
+ }
+ }
+}