aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-01-21 15:56:57 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-01-21 15:56:57 +0200
commit3234e33cc4ba354f0395bb514b8b2fa102cf38ec (patch)
tree064121c6d1b2d7ea428e705d8457f86ca95e4a4b /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters
parent68dca419117f9336d0fe21f9f04903906eeeef02 (diff)
downloadTango-3234e33cc4ba354f0395bb514b8b2fa102cf38ec.tar.gz
Tango-3234e33cc4ba354f0395bb514b8b2fa102cf38ec.zip
Started working on Developer module.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/DbRmlViewToEntityConverter.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/DbRmlViewToEntityConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/DbRmlViewToEntityConverter.cs
new file mode 100644
index 000000000..a2f0023cc
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/DbRmlViewToEntityConverter.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Developer.ViewModels;
+
+namespace Tango.MachineStudio.Developer.Converters
+{
+ public class DbRmlViewToEntityConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value != null)
+ {
+ DBViewContextWrapper<Rml> db = value as DBViewContextWrapper<Rml>;
+ return db;
+ }
+
+ return null;
+
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value != null)
+ {
+ Rml entity = value as Rml;
+ return new DBViewContextWrapper<Rml>(entity);
+ }
+
+ return null;
+ }
+ }
+}