diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-23 17:58:59 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-23 17:58:59 +0200 |
| commit | 8ae0f3da19c537eff30e19a1fe99cce51b3116f1 (patch) | |
| tree | 999f8c0ab670b775b4bcde5a4a0d26fb4f287fd5 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ProcessParametersTablesGroupsViewVM.cs | |
| parent | 891b5703fc8722ecc70c7883213b994f8902bb7b (diff) | |
| download | Tango-8ae0f3da19c537eff30e19a1fe99cce51b3116f1.tar.gz Tango-8ae0f3da19c537eff30e19a1fe99cce51b3116f1.zip | |
A lot of work on Developer Module and Jobs related DB tables.
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.cs | 33 |
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..620762a6f --- /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.DAL.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); + } + } +} |
