From 9695aef4cf1ac2d85d6905e73c4f4aa079cc7c1d Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 16 Jan 2018 18:23:59 +0200 Subject: Removed Dispensers & Cartridges! Only Dispenser Type & CartridgeType now. --- .../Views/MainView.xaml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml index 5324959e4..8f955beea 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml @@ -189,7 +189,7 @@ + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineVersionDialog.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineVersionDialog.xaml.cs new file mode 100644 index 000000000..3d59d7cda --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineVersionDialog.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.MachineDesigner.Views +{ + /// + /// Interaction logic for MachineVersionDialog.xaml + /// + public partial class MachineVersionDialog : UserControl + { + public MachineVersionDialog() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml index 8f955beea..605b66a05 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml @@ -431,7 +431,7 @@ - + @@ -447,7 +447,14 @@ Machine Version - + + + + + + + + Organization @@ -806,12 +813,24 @@ - + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs index 8ca933397..448625f27 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs @@ -166,6 +166,10 @@ namespace Tango.MachineStudio.UI.Notifications view.Loaded += (x, y) => { VM context = view.DataContext as VM; + if (context == null) + { + context = Activator.CreateInstance(); + } dialog.DataContext = context; Action onAcceptAction = null; diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/ACTION_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/ACTION_TYPES.cs index a0297f529..7ff535d35 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/ACTION_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/ACTION_TYPES.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs index 410d0309c..29a652b80 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_FIRMWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_FIRMWARE_VERSIONS.cs index dca8e82f1..dc5527468 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_FIRMWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_FIRMWARE_VERSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_OS_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_OS_VERSIONS.cs index c05a2410c..1c3af40e0 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_OS_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_OS_VERSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_VERSIONS.cs index c250201d0..bdd0fa8a8 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_VERSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/CARTRIDGE_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/CARTRIDGE_TYPES.cs index 6d8e2d441..ce5c33442 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/CARTRIDGE_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/CARTRIDGE_TYPES.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long CODE { get; set; } public string NAME { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/CAT.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/CAT.cs index c46de78a5..8b610ca97 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/CAT.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/CAT.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string LIQUID_TYPE_GUID { get; set; } public string MACHINE_GUID { get; set; } public byte[] DATA { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/CCT.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/CCT.cs index fc71ebf27..a44251468 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/CCT.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/CCT.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } public string FORWARD_FILE_NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/CONFIGURATION.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/CONFIGURATION.cs index b17564a48..bbefb6dff 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/CONFIGURATION.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/CONFIGURATION.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public System.DateTime CREATION_DATE { get; set; } public string APPLICATION_VERSION_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/DISPENSER_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/DISPENSER_TYPES.cs index 0d8094f81..a2af8f1fe 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/DISPENSER_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/DISPENSER_TYPES.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long CODE { get; set; } public string NAME { get; set; } public double NL_PER_PULSE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_FIRMWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_FIRMWARE_VERSIONS.cs index b4f3c3c85..33e37676e 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_FIRMWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_FIRMWARE_VERSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_SOFTWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_SOFTWARE_VERSIONS.cs index 117295091..e85e5702c 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_SOFTWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_SOFTWARE_VERSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT_TYPES.cs index af7b10d05..5420add49 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT_TYPES.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT_TYPES_ACTIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT_TYPES_ACTIONS.cs index 0e7ba0913..bb751a464 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT_TYPES_ACTIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT_TYPES_ACTIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string EVENT_TYPE_GUID { get; set; } public string ACTION_TYPE_GUID { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SHAPES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SHAPES.cs index 5dd3efc31..304030fc2 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SHAPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SHAPES.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public long CODE { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SYNTHS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SYNTHS.cs index 27a67a9fa..3010e8756 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SYNTHS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SYNTHS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public long CODE { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/HARDWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/HARDWARE_VERSIONS.cs index 62b93a878..eaa862f33 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/HARDWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/HARDWARE_VERSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/IDS_PACKS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/IDS_PACKS.cs index e2a9c4425..8da598c46 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/IDS_PACKS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/IDS_PACKS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string CONFIGURATION_GUID { get; set; } public string DISPENSER_TYPE_GUID { get; set; } public string LIQUID_TYPE_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LINEAR_MASS_DENSITY_UNITS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/LINEAR_MASS_DENSITY_UNITS.cs index c0c5ff8c6..de881b40c 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/LINEAR_MASS_DENSITY_UNITS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LINEAR_MASS_DENSITY_UNITS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public long CODE { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES.cs index 16e069ef1..d16e78826 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long CODE { get; set; } public string NAME { get; set; } public double VERSION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES_RMLS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES_RMLS.cs index 637b61e01..1beb1e217 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES_RMLS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES_RMLS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string LIQUID_TYPE_GUID { get; set; } public string RML_GUID { get; set; } public double MAX_NL_PER_CM { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx index 60f35f27c..9fb01760a 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx @@ -12,7 +12,6 @@ - @@ -40,7 +39,6 @@ - @@ -51,7 +49,6 @@ - @@ -62,7 +59,6 @@ - @@ -73,7 +69,6 @@ - @@ -84,7 +79,6 @@ - @@ -95,7 +89,6 @@ - @@ -107,7 +100,6 @@ - @@ -124,7 +116,6 @@ - @@ -157,7 +148,6 @@ - @@ -170,7 +160,6 @@ - @@ -181,7 +170,6 @@ - @@ -192,7 +180,6 @@ - @@ -204,7 +191,6 @@ - @@ -215,7 +201,6 @@ - @@ -226,7 +211,6 @@ - @@ -237,7 +221,6 @@ - @@ -248,7 +231,6 @@ - @@ -264,7 +246,6 @@ - @@ -275,7 +256,6 @@ - @@ -288,7 +268,6 @@ - @@ -300,7 +279,6 @@ - @@ -312,7 +290,6 @@ - @@ -327,7 +304,6 @@ - @@ -338,7 +314,6 @@ - @@ -352,7 +327,6 @@ - @@ -362,7 +336,6 @@ - @@ -373,7 +346,6 @@ - @@ -384,7 +356,6 @@ - @@ -395,7 +366,6 @@ - @@ -407,7 +377,6 @@ - @@ -419,7 +388,6 @@ - @@ -431,7 +399,6 @@ - @@ -459,7 +426,6 @@ - @@ -471,7 +437,6 @@ - @@ -603,7 +568,6 @@ - @@ -631,7 +595,6 @@ - @@ -642,7 +605,6 @@ - @@ -653,7 +615,6 @@ - @@ -664,7 +625,6 @@ - @@ -675,7 +635,6 @@ - @@ -686,7 +645,6 @@ - @@ -698,7 +656,6 @@ - @@ -715,7 +672,6 @@ - @@ -748,7 +704,6 @@ - @@ -761,7 +716,6 @@ - @@ -772,7 +726,6 @@ - @@ -783,7 +736,6 @@ - @@ -795,7 +747,6 @@ - @@ -806,7 +757,6 @@ - @@ -817,7 +767,6 @@ - @@ -828,7 +777,6 @@ - @@ -839,7 +787,6 @@ - @@ -855,7 +802,6 @@ - @@ -866,7 +812,6 @@ - @@ -879,7 +824,6 @@ - @@ -891,7 +835,6 @@ - @@ -903,7 +846,6 @@ - @@ -918,7 +860,6 @@ - @@ -929,7 +870,6 @@ - @@ -943,7 +883,6 @@ - @@ -953,7 +892,6 @@ - @@ -964,7 +902,6 @@ - @@ -975,7 +912,6 @@ - @@ -986,7 +922,6 @@ - @@ -998,7 +933,6 @@ - @@ -1010,7 +944,6 @@ - @@ -1022,7 +955,6 @@ - @@ -1050,7 +982,6 @@ - @@ -1062,7 +993,6 @@ - @@ -1111,7 +1041,6 @@ - @@ -1140,7 +1069,6 @@ - @@ -1152,7 +1080,6 @@ - @@ -1164,7 +1091,6 @@ - @@ -1176,7 +1102,6 @@ - @@ -1188,7 +1113,6 @@ - @@ -1201,7 +1125,6 @@ - @@ -1219,7 +1142,6 @@ - @@ -1238,7 +1160,6 @@ - @@ -1268,7 +1189,6 @@ - @@ -1280,7 +1200,6 @@ - @@ -1292,7 +1211,6 @@ - @@ -1305,7 +1223,6 @@ - @@ -1317,7 +1234,6 @@ - @@ -1329,7 +1245,6 @@ - @@ -1341,7 +1256,6 @@ - @@ -1353,7 +1267,6 @@ - @@ -1370,7 +1283,6 @@ - @@ -1382,7 +1294,6 @@ - @@ -1396,7 +1307,6 @@ - @@ -1409,7 +1319,6 @@ - @@ -1422,7 +1331,6 @@ - @@ -1438,7 +1346,6 @@ - @@ -1450,7 +1357,6 @@ - @@ -1465,7 +1371,6 @@ - @@ -1476,7 +1381,6 @@ - @@ -1488,7 +1392,6 @@ - @@ -1500,7 +1403,6 @@ - @@ -1512,7 +1414,6 @@ - @@ -1525,7 +1426,6 @@ - @@ -1538,7 +1438,6 @@ - @@ -1551,7 +1450,6 @@ - @@ -1580,7 +1478,6 @@ - @@ -1593,7 +1490,6 @@ - @@ -1605,7 +1501,6 @@ - diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx.diagram index 2d0a148ea..06fe3fd60 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx.diagram @@ -13,38 +13,38 @@ - - - - - - - - + + + + + + + + - - - - + + + + - - - + + + - - - - + + + + diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE.cs index 7bf83f80c..dd46b5ab6 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string SERIAL_NUMBER { get; set; } public string NAME { get; set; } public System.DateTime PRODUCTION_DATE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_CONFIGURATIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_CONFIGURATIONS.cs index 64bff8f15..974094a37 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_CONFIGURATIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_CONFIGURATIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string MACHINE_GUID { get; set; } public string CONFIGURATION_GUID { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_EVENTS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_EVENTS.cs index 2b916274a..c6a009e8a 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_EVENTS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_EVENTS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string MACHINE_GUID { get; set; } public string EVENT_TYPE_GUID { get; set; } public string USER_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE_VERSIONS.cs index 482c5ff01..8507deef3 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE_VERSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public double VERSION { get; set; } public string DEFAULT_CONFIGURATION_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_COLORS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_COLORS.cs index d4da68404..a7619286e 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_COLORS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_COLORS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long COLOR { get; set; } } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_CONDITIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_CONDITIONS.cs index 368913189..46e6e9836 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_CONDITIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_CONDITIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public long CODE { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_MATERIALS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_MATERIALS.cs index fdf51b12e..f04bfa105 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_MATERIALS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_MATERIALS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public long CODE { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_PURPOSES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_PURPOSES.cs index 15ea7c140..19fac3d1b 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_PURPOSES.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_PURPOSES.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public long CODE { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MID_TANK_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MID_TANK_TYPES.cs index 75eb1ba64..ee3ffbcea 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MID_TANK_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MID_TANK_TYPES.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long CODE { get; set; } public string NAME { get; set; } public double LITER_CAPACITY { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/ORGANIZATION.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/ORGANIZATION.cs index 8ff5faa2f..6e42825e4 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/ORGANIZATION.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/ORGANIZATION.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public string CONTACT_GUID { get; set; } public string ADDRESS_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/PERMISSION.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/PERMISSION.cs index 6052bccc0..dc4b2b654 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/PERMISSION.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/PERMISSION.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/RML.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/RML.cs index d84850194..acadec6a9 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/RML.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/RML.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public string MANUFACTURER { get; set; } public string MATERIAL_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/ROLE.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/ROLE.cs index 66f453b4e..7dc8669ca 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/ROLE.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/ROLE.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/ROLES_PERMISSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/ROLES_PERMISSIONS.cs index d63343b82..6a20ac604 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/ROLES_PERMISSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/ROLES_PERMISSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string ROLE_GUID { get; set; } public string PERMISSION_GUID { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Address.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Address.cs index ad1786fed..020c3a3c2 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Address.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Address.cs @@ -10,6 +10,25 @@ namespace Tango.DAL.Observables public partial class Address : ObservableEntity
{ + private Boolean _deleted; + /// + /// Gets or sets the address deleted. + /// + [EntityFieldName("DELETED")] + public Boolean Deleted + { + get + { + return _deleted; + } + + set + { + _deleted = value; RaisePropertyChanged(nameof(Deleted)); + } + + } + private String _addressstring; /// /// Gets or sets the address address string. diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Contact.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Contact.cs index 9f8ec680b..0356d44b5 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Contact.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Contact.cs @@ -10,6 +10,25 @@ namespace Tango.DAL.Observables public partial class Contact : ObservableEntity { + private Boolean _deleted; + /// + /// Gets or sets the contact deleted. + /// + [EntityFieldName("DELETED")] + public Boolean Deleted + { + get + { + return _deleted; + } + + set + { + _deleted = value; RaisePropertyChanged(nameof(Deleted)); + } + + } + private String _firstname; /// /// Gets or sets the contact first name. diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/User.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/User.cs index a7fc315d3..210488ac4 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/User.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/User.cs @@ -10,6 +10,25 @@ namespace Tango.DAL.Observables public partial class User : ObservableEntity { + private Boolean _deleted; + /// + /// Gets or sets the user deleted. + /// + [EntityFieldName("DELETED")] + public Boolean Deleted + { + get + { + return _deleted; + } + + set + { + _deleted = value; RaisePropertyChanged(nameof(Deleted)); + } + + } + private String _email; /// /// Gets or sets the user email. diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/UsersRole.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/UsersRole.cs index 2001d86f1..782c296e3 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/UsersRole.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/UsersRole.cs @@ -10,6 +10,25 @@ namespace Tango.DAL.Observables public partial class UsersRole : ObservableEntity { + private Boolean _deleted; + /// + /// Gets or sets the usersrole deleted. + /// + [EntityFieldName("DELETED")] + public Boolean Deleted + { + get + { + return _deleted; + } + + set + { + _deleted = value; RaisePropertyChanged(nameof(Deleted)); + } + + } + private String _userguid; /// /// Gets or sets the usersrole user guid. diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Enumerations/MidTankTypes.cs b/Software/Visual_Studio/Tango.DAL.Observables/Enumerations/MidTankTypes.cs index a2515c714..a2571f577 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Enumerations/MidTankTypes.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Enumerations/MidTankTypes.cs @@ -10,10 +10,10 @@ namespace Tango.DAL.Observables { /// - /// (2 Liter Tank) + /// (Liter Tank 2) /// - [Description("2 Liter Tank")] - 2LiterTank = 1, + [Description("Liter Tank 2")] + LiterTank2 = 1, } } diff --git a/Software/Visual_Studio/Tango.DAL.Observables/IObservableEntity.cs b/Software/Visual_Studio/Tango.DAL.Observables/IObservableEntity.cs index 027b385c9..71da4fa7c 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/IObservableEntity.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/IObservableEntity.cs @@ -30,12 +30,6 @@ namespace Tango.DAL.Observables [EntityFieldName("LAST_UPDATED")] DateTime LastUpdated { get; set; } - /// - /// Gets or sets a value indicating whether this is deleted. - /// - [EntityFieldName("DELETED")] - bool Deleted { get; set; } - /// /// Saves the changes on this entity to database. /// @@ -48,20 +42,19 @@ namespace Tango.DAL.Observables Task SaveAsync(); /// - /// Deletes this entity from the database (Do no use this). + /// Deletes this entity from the database. /// - [Obsolete("The method delete is not for use as it prevents the synchronization of remote and local database.")] void Delete(); /// - /// Performs a "soft delete" of this entity (Set to true and save). + /// Removed this entity from it's DB SET without saving changes. /// void SoftDelete(); /// - /// Performs a "soft delete" of this entity asynchronously (Set to true and save). + /// Deletes this entity from the database. /// - Task SoftDeleteAsync(); + Task DeleteAsync(); /// /// Gets a collection of entities which are dependent on this entity. diff --git a/Software/Visual_Studio/Tango.DAL.Observables/ObservableEntity.cs b/Software/Visual_Studio/Tango.DAL.Observables/ObservableEntity.cs index 2cc9ad097..e8a99cea6 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/ObservableEntity.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/ObservableEntity.cs @@ -40,11 +40,6 @@ namespace Tango.DAL.Observables /// public abstract DateTime LastUpdated { get; set; } - /// - /// Gets or sets a value indicating whether this is deleted. - /// - public abstract bool Deleted { get; set; } - /// /// Saves the changes on this entity to database. /// @@ -57,26 +52,25 @@ namespace Tango.DAL.Observables internal abstract void Save(List savedEntities); /// - /// Deletes this entity from the database (Do no use this). + /// Deletes this entity from the database. /// public abstract void Delete(); /// - /// Saves the changes on this entity to database asynchronously. + /// Removed this entity from it's DB SET without saving changes. /// - /// - public abstract Task SaveAsync(); + public abstract void SoftDelete(); /// - /// Performs a "soft delete" of this entity (Set to true and save). + /// Deletes this entity from the database /// - public abstract void SoftDelete(); + public abstract Task DeleteAsync(); /// - /// Performs a "soft delete" of this entity asynchronously (Set to true and save). + /// Saves the changes on this entity to database asynchronously. /// /// - public abstract Task SoftDeleteAsync(); + public abstract Task SaveAsync(); /// /// Converts the specified database conventional name to the observables conventional name. @@ -266,17 +260,6 @@ namespace Tango.DAL.Observables set { _lastUpdated = value; RaisePropertyChanged(nameof(LastUpdated)); } } - private bool _deleted; - /// - /// Gets or sets a value indicating whether this is deleted. - /// - [EntityFieldName("DELETED")] - public override bool Deleted - { - get { return _deleted; } - set { _deleted = value; RaisePropertyChanged(nameof(Deleted)); } - } - /// /// Initializes a new instance of the class. /// @@ -324,41 +307,53 @@ namespace Tango.DAL.Observables } /// - /// Deletes this entity from the database (Do no use this). + /// Deletes this entity from the database /// public override void Delete() { - String tabelName = this.GetType().GetDALName(); - DbSet dbSet = typeof(RemoteDB).GetProperty(tabelName).GetValue(ObservablesEntitiesAdapter.Instance.Context) as DbSet; - dbSet.Remove(Entity); - ObservablesEntitiesAdapter.Instance.SaveChanges(); + var delProp = this.GetType().GetProperty("Deleted"); + + if (delProp != null) + { + delProp.SetValue(this, true); + Save(); + } + else + { + String tabelName = this.GetType().GetDALName(); + DbSet dbSet = typeof(RemoteDB).GetProperty(tabelName).GetValue(ObservablesEntitiesAdapter.Instance.Context) as DbSet; + dbSet.Remove(Entity); + ObservablesEntitiesAdapter.Instance.SaveChanges(); + } } /// - /// Performs a "soft delete" of this entity (Set to true and save). + /// Removed this entity from it's DB SET without saving changes. /// public override void SoftDelete() { - if (!SettingsManager.Default.DataBase.DeleteForReal) + var delProp = this.GetType().GetProperty("IsDeleted"); + + if (delProp != null) { - this.Deleted = true; - Save(); + delProp.SetValue(this, true); } else { - Delete(); + String tabelName = this.GetType().GetDALName(); + DbSet dbSet = typeof(RemoteDB).GetProperty(tabelName).GetValue(ObservablesEntitiesAdapter.Instance.Context) as DbSet; + dbSet.Remove(Entity); } } /// - /// Performs a "soft delete" of this entity asynchronously (Set to true and save). + /// Deletes this entity from the database /// - /// - public override Task SoftDeleteAsync() + public override Task DeleteAsync() { - return Task.Factory.StartNew(() => + return Task.Factory.StartNew(() => { - SoftDelete(); + Delete(); }); } diff --git a/Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapter.cs b/Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapter.cs index 384f10dc7..a5ed56530 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapter.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapter.cs @@ -85,9 +85,9 @@ namespace Tango.DAL.Observables { Context.SaveChanges(); } - catch + catch (Exception ex) { - throw; + throw ex; } finally { @@ -151,27 +151,27 @@ namespace Tango.DAL.Observables //Remove Unlinked Configurations.. } - Organizations = Context.ORGANIZATIONS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + Organizations = Context.ORGANIZATIONS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); OrganizationsViewSource = CreateCollectionView(Organizations); - Machines = Context.MACHINES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + Machines = Context.MACHINES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); foreach (var machine in Machines) { machine.MachinesConfigurations = machine.MachinesConfigurations.OrderByDescending(x => x.Configuration.CreationDate).Take(30).ToObservableCollection(); } - MachinesConfigurations = Context.MACHINES_CONFIGURATIONS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + MachinesConfigurations = Context.MACHINES_CONFIGURATIONS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - MachineVersions = Context.MACHINE_VERSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + MachineVersions = Context.MACHINE_VERSIONS.ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); Addresses = Context.ADDRESSES.Where(x => !x.DELETED).ToList().OrderBy(x => x.ADDRESS_STRING).Select(x => ObservableEntity.CreateObservableFromEntity
(x)).ToObservableCollection(); Contacts = Context.CONTACTS.Where(x => !x.DELETED).ToList().OrderBy(x => x.FULL_NAME).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - Roles = Context.ROLES.Where(x => !x.DELETED).ToList().OrderBy(x => x.NAME).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + Roles = Context.ROLES.ToList().OrderBy(x => x.NAME).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - Permissions = Context.PERMISSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.NAME).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + Permissions = Context.PERMISSIONS.ToList().OrderBy(x => x.NAME).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); Users = Context.USERS.Where(x => !x.DELETED).ToList().OrderBy(x => x.CONTACT.FULL_NAME).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); @@ -182,70 +182,70 @@ namespace Tango.DAL.Observables foreach (var role in Roles) { - role.RolesPermissions = role.RolesPermissions.Where(x => !x.Deleted).ToObservableCollection(); + role.RolesPermissions = role.RolesPermissions.ToObservableCollection(); } - Configurations = Context.CONFIGURATIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.LAST_UPDATED).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + Configurations = Context.CONFIGURATIONS.ToList().OrderBy(x => x.LAST_UPDATED).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); foreach (var config in Configurations) { - config.IdsPacks = config.IdsPacks.Where(x => !x.Deleted).ToObservableCollection(); + config.IdsPacks = config.IdsPacks.ToObservableCollection(); } - ApplicationVersions = Context.APPLICATION_VERSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + ApplicationVersions = Context.APPLICATION_VERSIONS.ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - ApplicationOsVersions = Context.APPLICATION_OS_VERSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + ApplicationOsVersions = Context.APPLICATION_OS_VERSIONS.ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - ApplicationFirmwareVersions = Context.APPLICATION_FIRMWARE_VERSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + ApplicationFirmwareVersions = Context.APPLICATION_FIRMWARE_VERSIONS.ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - ApplicationDisplayPanelVersions = Context.APPLICATION_DISPLAY_PANEL_VERSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + ApplicationDisplayPanelVersions = Context.APPLICATION_DISPLAY_PANEL_VERSIONS.ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - EmbeddedFirmwareVersions = Context.EMBEDDED_FIRMWARE_VERSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + EmbeddedFirmwareVersions = Context.EMBEDDED_FIRMWARE_VERSIONS.ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - EmbeddedSoftwareVersions = Context.EMBEDDED_SOFTWARE_VERSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + EmbeddedSoftwareVersions = Context.EMBEDDED_SOFTWARE_VERSIONS.ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - HardwareVersions = Context.HARDWARE_VERSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + HardwareVersions = Context.HARDWARE_VERSIONS.ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - IdsPacks = Context.IDS_PACKS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + IdsPacks = Context.IDS_PACKS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - DispenserTypes = Context.DISPENSER_TYPES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + DispenserTypes = Context.DISPENSER_TYPES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - LiquidTypes = Context.LIQUID_TYPES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + LiquidTypes = Context.LIQUID_TYPES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - CartridgeTypes = Context.CARTRIDGE_TYPES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + CartridgeTypes = Context.CARTRIDGE_TYPES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - MidTankTypes = Context.MID_TANK_TYPES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + MidTankTypes = Context.MID_TANK_TYPES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - ActionTypes = Context.ACTION_TYPES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + ActionTypes = Context.ACTION_TYPES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - EventTypes = Context.EVENT_TYPES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + EventTypes = Context.EVENT_TYPES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); foreach (var eventType in EventTypes) { - eventType.EventTypesActions = eventType.EventTypesActions.Where(x => !x.Deleted).ToObservableCollection(); + eventType.EventTypesActions = eventType.EventTypesActions.ToObservableCollection(); } - MediaMaterials = Context.MEDIA_MATERIALS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + MediaMaterials = Context.MEDIA_MATERIALS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - MediaColors = Context.MEDIA_COLORS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + MediaColors = Context.MEDIA_COLORS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - MediaPurposes = Context.MEDIA_PURPOSES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + MediaPurposes = Context.MEDIA_PURPOSES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - MediaConditions = Context.MEDIA_CONDITIONS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + MediaConditions = Context.MEDIA_CONDITIONS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - LinearMassDensityUnits = Context.LINEAR_MASS_DENSITY_UNITS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + LinearMassDensityUnits = Context.LINEAR_MASS_DENSITY_UNITS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - FiberShapes = Context.FIBER_SHAPES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + FiberShapes = Context.FIBER_SHAPES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - FiberSynths = Context.FIBER_SYNTHS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + FiberSynths = Context.FIBER_SYNTHS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - Rmls = Context.RMLS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + Rmls = Context.RMLS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - LiquidTypesRmls = Context.LIQUID_TYPES_RMLS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + LiquidTypesRmls = Context.LIQUID_TYPES_RMLS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - Ccts = Context.CCTS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + Ccts = Context.CCTS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - Cats = Context.CATS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + Cats = Context.CATS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); InitCollectionSources(); diff --git a/Software/Visual_Studio/Tango.DAL.Observables/ObservablesGenerator.cs b/Software/Visual_Studio/Tango.DAL.Observables/ObservablesGenerator.cs index c0dcf8662..53f27c9ba 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/ObservablesGenerator.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/ObservablesGenerator.cs @@ -34,7 +34,7 @@ namespace Tango.DAL.Observables TableName = table.Name, }; - foreach (var field in table.PropertyType.GenericTypeArguments.First().GetProperties().Skip(4)) + foreach (var field in table.PropertyType.GenericTypeArguments.First().GetProperties().Skip(3)) { EntityCodeFileField codeField = new EntityCodeFileField(); codeField.FieldName = field.Name; @@ -149,12 +149,12 @@ namespace Tango.DAL.Observables - foreach (var field in table.PropertyType.GenericTypeArguments.First().GetProperties().Skip(4).Where(x => !x.Name.Contains("GUID"))) + foreach (var field in table.PropertyType.GenericTypeArguments.First().GetProperties().Skip(3).Where(x => !x.Name.Contains("GUID"))) { EntityCodeFileField codeField = new EntityCodeFileField(); - codeField.FieldName = field.Name.Singularize(false); - codeField.Name = ObservableEntity.DalNameToStandardName(field.Name.Singularize(false)); - codeField.Description = FirstCharacterToLower(ObservableEntity.DalNameToStandardName(field.Name).Singularize(false)); + codeField.FieldName = field.Name; + codeField.Name = ObservableEntity.DalNameToStandardName(field.Name); + codeField.Description = FirstCharacterToLower(ObservableEntity.DalNameToStandardName(field.Name)); if (field.PropertyType.IsGenericType) @@ -163,11 +163,15 @@ namespace Tango.DAL.Observables } else { - if (field.PropertyType.IsClass && field.PropertyType != typeof(String)) + if (field.PropertyType.IsClass && field.PropertyType != typeof(String) && field.PropertyType != typeof(Byte[])) { codeField.Type = ObservableEntity.DalNameToStandardName(field.PropertyType.Name).Singularize(false); codeField.Construct = true; } + else if (field.PropertyType == typeof(Byte[])) + { + codeField.Type = field.PropertyType.Name.ToLower(); + } else { codeField.Type = field.PropertyType.Name == "Int32" ? "int" : field.PropertyType.Name; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Partials/Machine.cs b/Software/Visual_Studio/Tango.DAL.Observables/Partials/Machine.cs new file mode 100644 index 000000000..71c1eeaee --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Observables/Partials/Machine.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DAL.Observables +{ + public partial class Machine + { + /// + /// Deletes this entity from the database + /// + public override void Delete() + { + foreach (var machine_config in MachinesConfigurations) + { + machine_config.SoftDelete(); + machine_config.Configuration.SoftDelete(); + } + + base.SoftDelete(); + + ObservablesEntitiesAdapter.Instance.SaveChanges(); + } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Partials/MachineVersion.cs b/Software/Visual_Studio/Tango.DAL.Observables/Partials/MachineVersion.cs new file mode 100644 index 000000000..95f4b0d69 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Observables/Partials/MachineVersion.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DAL.Observables +{ + public partial class MachineVersion + { + public override void Delete() + { + Configuration.SoftDelete(); + base.SoftDelete(); + + ObservablesEntitiesAdapter.Instance.SaveChanges(); + } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Partials/User.cs b/Software/Visual_Studio/Tango.DAL.Observables/Partials/User.cs index 2781a34be..805c389fc 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Partials/User.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Partials/User.cs @@ -25,7 +25,7 @@ namespace Tango.DAL.Observables ///
public List GetPermissions() { - return UsersRoles.Select(x => x.Role).ToList().SelectMany(x => x.RolesPermissions).Select(x => (Permissions)x.Permission.Code).ToList(); + return UsersRoles.Select(x => x.Role).ToList().SelectMany(x => x.RolesPermissions).Select(x => (Permissions)x.Permission.Code).ToList(); } /// diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Tango.DAL.Observables.csproj b/Software/Visual_Studio/Tango.DAL.Observables/Tango.DAL.Observables.csproj index c17fcbc93..95ed8bc63 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Tango.DAL.Observables.csproj +++ b/Software/Visual_Studio/Tango.DAL.Observables/Tango.DAL.Observables.csproj @@ -87,6 +87,7 @@ + @@ -122,6 +123,7 @@ + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/ACTION_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/ACTION_TYPES.cs index 1c71eb314..6a864f024 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/ACTION_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/ACTION_TYPES.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs index 5d5c329e0..ad55d5d82 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_FIRMWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_FIRMWARE_VERSIONS.cs index 249dcfe2b..e24375a6f 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_FIRMWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_FIRMWARE_VERSIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_OS_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_OS_VERSIONS.cs index 677e7f099..5839f5a8b 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_OS_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_OS_VERSIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_VERSIONS.cs index f5f0d29aa..620be2da0 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_VERSIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/CARTRIDGE_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/CARTRIDGE_TYPES.cs index cfead09a2..57bc2a101 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/CARTRIDGE_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/CARTRIDGE_TYPES.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int CODE { get; set; } public string NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/CAT.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/CAT.cs index 162c39209..a9dafc33a 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/CAT.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/CAT.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string LIQUID_TYPE_GUID { get; set; } public string MACHINE_GUID { get; set; } public byte[] DATA { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/CCT.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/CCT.cs index 9a420020b..87c657d50 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/CCT.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/CCT.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } public string FORWARD_FILE_NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/CONFIGURATION.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/CONFIGURATION.cs index cfe748bc3..173463fff 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/CONFIGURATION.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/CONFIGURATION.cs @@ -26,7 +26,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public System.DateTime CREATION_DATE { get; set; } public string APPLICATION_VERSION_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/DISPENSER_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/DISPENSER_TYPES.cs index 1bf5a8e0e..efe9286f2 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/DISPENSER_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/DISPENSER_TYPES.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int CODE { get; set; } public string NAME { get; set; } public double NL_PER_PULSE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/EMBEDDED_FIRMWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/EMBEDDED_FIRMWARE_VERSIONS.cs index 2ebc41626..df70c3cf2 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/EMBEDDED_FIRMWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/EMBEDDED_FIRMWARE_VERSIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/EMBEDDED_SOFTWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/EMBEDDED_SOFTWARE_VERSIONS.cs index 470cbaa49..6ae24f6a7 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/EMBEDDED_SOFTWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/EMBEDDED_SOFTWARE_VERSIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/EVENT_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/EVENT_TYPES.cs index 1eb478383..550cb87b1 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/EVENT_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/EVENT_TYPES.cs @@ -24,7 +24,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/EVENT_TYPES_ACTIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/EVENT_TYPES_ACTIONS.cs index 003e4293e..3ce891623 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/EVENT_TYPES_ACTIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/EVENT_TYPES_ACTIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string EVENT_TYPE_GUID { get; set; } public string ACTION_TYPE_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SHAPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SHAPES.cs index 4e7bdf298..863a368e2 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SHAPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SHAPES.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public int CODE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SYNTHS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SYNTHS.cs index 885eff2c7..f2d340f47 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SYNTHS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SYNTHS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public int CODE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_VERSIONS.cs index ba114fe3c..12974024e 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_VERSIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs index 24db64501..cddce2f6d 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string CONFIGURATION_GUID { get; set; } public string DISPENSER_TYPE_GUID { get; set; } public string LIQUID_TYPE_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/LINEAR_MASS_DENSITY_UNITS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/LINEAR_MASS_DENSITY_UNITS.cs index ac91c8c3e..5c0fb50fe 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/LINEAR_MASS_DENSITY_UNITS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/LINEAR_MASS_DENSITY_UNITS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public int CODE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES.cs index 71f55585b..0e0b78e21 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES.cs @@ -25,7 +25,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int CODE { get; set; } public string NAME { get; set; } public double VERSION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs index 4a521f980..782f70d6c 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string LIQUID_TYPE_GUID { get; set; } public string RML_GUID { get; set; } public double MAX_NL_PER_CM { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs index bd54bbf4a..8963261a1 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs @@ -25,7 +25,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string SERIAL_NUMBER { get; set; } public string NAME { get; set; } public System.DateTime PRODUCTION_DATE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINES_CONFIGURATIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINES_CONFIGURATIONS.cs index fbd2bfb20..2efe07680 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINES_CONFIGURATIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINES_CONFIGURATIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string MACHINE_GUID { get; set; } public string CONFIGURATION_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINES_EVENTS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINES_EVENTS.cs index 1f24cc1f9..6dae4b687 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINES_EVENTS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINES_EVENTS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string MACHINE_GUID { get; set; } public string EVENT_TYPE_GUID { get; set; } public string USER_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE_VERSIONS.cs index a93d8e5b8..6c354d4bb 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE_VERSIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } public string DEFAULT_CONFIGURATION_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_COLORS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_COLORS.cs index 68a018f3a..c158b1770 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_COLORS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_COLORS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int COLOR { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_CONDITIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_CONDITIONS.cs index 844ece666..52c5edaab 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_CONDITIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_CONDITIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public int CODE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_MATERIALS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_MATERIALS.cs index 80ede3e01..9f08788ac 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_MATERIALS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_MATERIALS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public int CODE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_PURPOSES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_PURPOSES.cs index bd305011c..c540d2469 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_PURPOSES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_PURPOSES.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public int CODE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MID_TANK_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MID_TANK_TYPES.cs index 52da42c25..dafe79a3b 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MID_TANK_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MID_TANK_TYPES.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int CODE { get; set; } public string NAME { get; set; } public double LITER_CAPACITY { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/ORGANIZATION.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/ORGANIZATION.cs index 3dd2c0738..e9837a775 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/ORGANIZATION.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/ORGANIZATION.cs @@ -24,7 +24,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public string CONTACT_GUID { get; set; } public string ADDRESS_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/PERMISSION.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/PERMISSION.cs index c342b49c0..4392a4b22 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/PERMISSION.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/PERMISSION.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs index ab1189e95..6120596e1 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs @@ -24,7 +24,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public string MANUFACTURER { get; set; } public string MATERIAL_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/ROLE.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/ROLE.cs index b2987c5f6..d4be1220c 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/ROLE.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/ROLE.cs @@ -24,7 +24,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/ROLES_PERMISSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/ROLES_PERMISSIONS.cs index b9c5ea451..850f784f8 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/ROLES_PERMISSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/ROLES_PERMISSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string ROLE_GUID { get; set; } public string PERMISSION_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index c1e7d53c4..ea19fea80 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -12,7 +12,6 @@ - @@ -40,7 +39,6 @@ - @@ -51,7 +49,6 @@ - @@ -62,7 +59,6 @@ - @@ -73,7 +69,6 @@ - @@ -84,7 +79,6 @@ - @@ -95,7 +89,6 @@ - @@ -107,7 +100,6 @@ - @@ -124,7 +116,6 @@ - @@ -157,7 +148,6 @@ - @@ -170,7 +160,6 @@ - @@ -181,7 +170,6 @@ - @@ -192,7 +180,6 @@ - @@ -204,7 +191,6 @@ - @@ -215,7 +201,6 @@ - @@ -226,7 +211,6 @@ - @@ -237,7 +221,6 @@ - @@ -248,7 +231,6 @@ - @@ -264,7 +246,6 @@ - @@ -275,7 +256,6 @@ - @@ -288,7 +268,6 @@ - @@ -300,7 +279,6 @@ - @@ -312,7 +290,6 @@ - @@ -327,7 +304,6 @@ - @@ -338,7 +314,6 @@ - @@ -352,7 +327,6 @@ - @@ -362,7 +336,6 @@ - @@ -373,7 +346,6 @@ - @@ -384,7 +356,6 @@ - @@ -395,7 +366,6 @@ - @@ -407,7 +377,6 @@ - @@ -419,7 +388,6 @@ - @@ -431,7 +399,6 @@ - @@ -459,7 +426,6 @@ - @@ -471,7 +437,6 @@ - @@ -714,8 +679,10 @@ - - + + + + @@ -726,8 +693,10 @@ - - + + + + @@ -1157,11 +1126,11 @@ - + - + @@ -1423,11 +1392,11 @@ - + - + @@ -1495,7 +1464,6 @@ - @@ -1526,7 +1494,6 @@ - @@ -1538,7 +1505,6 @@ - @@ -1550,7 +1516,6 @@ - @@ -1562,7 +1527,6 @@ - @@ -1574,7 +1538,6 @@ - @@ -1586,7 +1549,6 @@ - @@ -1600,7 +1562,6 @@ - @@ -1618,7 +1579,6 @@ - @@ -1664,7 +1624,6 @@ - @@ -1678,7 +1637,6 @@ - @@ -1690,7 +1648,6 @@ - @@ -1702,7 +1659,6 @@ - @@ -1716,7 +1672,6 @@ - @@ -1729,7 +1684,6 @@ - @@ -1741,7 +1695,6 @@ - @@ -1753,7 +1706,6 @@ - @@ -1765,7 +1717,6 @@ - @@ -1786,7 +1737,6 @@ - @@ -1798,14 +1748,13 @@ - - + @@ -1814,12 +1763,11 @@ - - - + + @@ -1828,7 +1776,6 @@ - @@ -1842,7 +1789,6 @@ - @@ -1863,7 +1809,6 @@ - @@ -1876,7 +1821,6 @@ - @@ -1893,7 +1837,6 @@ - @@ -1904,7 +1847,6 @@ - @@ -1916,7 +1858,6 @@ - @@ -1928,7 +1869,6 @@ - @@ -1940,7 +1880,6 @@ - @@ -1953,7 +1892,6 @@ - @@ -1969,7 +1907,6 @@ - @@ -1982,7 +1919,6 @@ - @@ -2006,7 +1942,7 @@ - + @@ -2019,7 +1955,6 @@ - @@ -2033,7 +1968,6 @@ - @@ -2421,8 +2355,10 @@ - - + + + + @@ -2433,8 +2369,10 @@ - - + + + + @@ -2631,7 +2569,6 @@ - @@ -2660,7 +2597,6 @@ - @@ -2672,7 +2608,6 @@ - @@ -2684,7 +2619,6 @@ - @@ -2696,7 +2630,6 @@ - @@ -2708,7 +2641,6 @@ - @@ -2721,7 +2653,6 @@ - @@ -2739,7 +2670,6 @@ - @@ -2758,7 +2688,6 @@ - @@ -2788,7 +2717,6 @@ - @@ -2800,7 +2728,6 @@ - @@ -2812,7 +2739,6 @@ - @@ -2825,7 +2751,6 @@ - @@ -2837,7 +2762,6 @@ - @@ -2849,7 +2773,6 @@ - @@ -2861,7 +2784,6 @@ - @@ -2873,7 +2795,6 @@ - @@ -2890,7 +2811,6 @@ - @@ -2902,7 +2822,6 @@ - @@ -2916,7 +2835,6 @@ - @@ -2929,7 +2847,6 @@ - @@ -2942,7 +2859,6 @@ - @@ -2958,7 +2874,6 @@ - @@ -2970,7 +2885,6 @@ - @@ -2985,7 +2899,6 @@ - @@ -2996,7 +2909,6 @@ - @@ -3008,7 +2920,6 @@ - @@ -3020,7 +2931,6 @@ - @@ -3032,7 +2942,6 @@ - @@ -3045,7 +2954,6 @@ - @@ -3058,7 +2966,6 @@ - @@ -3071,7 +2978,6 @@ - @@ -3100,7 +3006,6 @@ - @@ -3113,7 +3018,6 @@ - @@ -3125,7 +3029,6 @@ - diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index 60d141af1..8c11eeccc 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,46 +5,46 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -73,8 +73,8 @@ - - + + diff --git a/Software/Visual_Studio/Web/Tango.MachineService/App_Data/Tango.db b/Software/Visual_Studio/Web/Tango.MachineService/App_Data/Tango.db index 12c88039d..147c930c6 100644 Binary files a/Software/Visual_Studio/Web/Tango.MachineService/App_Data/Tango.db and b/Software/Visual_Studio/Web/Tango.MachineService/App_Data/Tango.db differ -- cgit v1.3.1 From 20482140c124fd1d5caaffcc9b0dfe853b30dd6f Mon Sep 17 00:00:00 2001 From: Roy Date: Sat, 27 Jan 2018 17:18:10 +0200 Subject: Re-factored DAL Observables using EF Code First !!!!!! --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 8388608 -> 8388608 bytes .../EventTypeActionsToStringConverter.cs | 2 +- .../Managers/RegisteredView.cs | 2 + .../ViewModels/EventTypesViewVM.cs | 16 +- .../ViewModels/LiquidTypesViewVM.cs | 12 +- .../ViewModels/RolesViewVM.cs | 10 +- .../ViewModels/UsersViewVM.cs | 27 +- .../Views/DBViews/CatView.xaml | 2 +- .../Views/DBViews/CatsView.xaml | 4 +- .../Views/DBViews/ConfigurationView.xaml | 14 +- .../Views/DBViews/ConfigurationsView.xaml | 14 +- .../Views/DBViews/IdsPackView.xaml | 8 +- .../Views/DBViews/IdsPacksView.xaml | 10 +- .../Views/DBViews/LiquidTypesRmlView.xaml | 2 +- .../Views/DBViews/LiquidTypesRmlsView.xaml | 4 +- .../Views/DBViews/MachineVersionView.xaml | 2 +- .../Views/DBViews/MachineVersionsView.xaml | 2 +- .../Views/DBViews/MachineView.xaml | 2 +- .../Views/DBViews/MachinesView.xaml | 2 +- .../Views/DBViews/ProcessParametersTableView.xaml | 2 +- .../Views/DBViews/ProcessParametersTablesView.xaml | 2 +- .../Views/DBViews/RmlView.xaml | 14 +- .../Views/DBViews/RmlsView.xaml | 14 +- .../ViewModels/MainViewVM.cs | 40 +- .../Views/MainView.xaml | 10 +- .../ViewModels/MainViewVM.cs | 58 +-- .../Views/MachineView.xaml | 40 +- .../Views/MainView.xaml | 48 +-- .../Tango.MachineStudio.UI/MainWindow.xaml | 42 +- .../Tango.CodeGeneration/EntityCodeFile.cs | 6 + .../ObservablesContextCodeFile.cs | 12 + .../Tango.CodeGeneration.csproj | 2 + .../Templates/EntityCodeFile.cshtml | 37 +- .../Templates/ObservablesContextCodeFile.cshtml | 60 +++ .../Tango.DAL.Observables/Entities/ActionType.cs | 43 +- .../Tango.DAL.Observables/Entities/Address.cs | 72 ++-- .../Entities/ApplicationDisplayPanelVersion.cs | 38 +- .../Entities/ApplicationFirmwareVersion.cs | 38 +- .../Entities/ApplicationOsVersion.cs | 38 +- .../Entities/ApplicationVersion.cs | 38 +- .../Tango.DAL.Observables/Entities/BrushStop.cs | 107 +++-- .../Entities/CartridgeType.cs | 38 +- .../Tango.DAL.Observables/Entities/Cat.cs | 58 ++- .../Tango.DAL.Observables/Entities/Cct.cs | 68 ++-- .../Tango.DAL.Observables/Entities/ColorSpace.cs | 43 +- .../Entities/Configuration.cs | 155 ++++--- .../Tango.DAL.Observables/Entities/Contact.cs | 67 ++- .../Entities/DispenserType.cs | 48 +-- .../Entities/EmbeddedFirmwareVersion.cs | 38 +- .../Entities/EmbeddedSoftwareVersion.cs | 38 +- .../Tango.DAL.Observables/Entities/EventType.cs | 47 +-- .../Entities/EventTypesAction.cs | 54 +-- .../Tango.DAL.Observables/Entities/FiberShape.cs | 38 +- .../Tango.DAL.Observables/Entities/FiberSynth.cs | 38 +- .../Entities/HardwareVersion.cs | 38 +- .../Tango.DAL.Observables/Entities/IdsPack.cs | 103 +++-- .../Tango.DAL.Observables/Entities/Job.cs | 95 ++--- .../Tango.DAL.Observables/Entities/JobRun.cs | 48 +-- .../Entities/LinearMassDensityUnit.cs | 38 +- .../Tango.DAL.Observables/Entities/LiquidType.cs | 56 +-- .../Entities/LiquidTypesRml.cs | 53 +-- .../Tango.DAL.Observables/Entities/Machine.cs | 84 ++-- .../Entities/MachineVersion.cs | 53 +-- .../Entities/MachinesConfiguration.cs | 42 +- .../Entities/MachinesEvent.cs | 67 ++- .../Tango.DAL.Observables/Entities/MediaColor.cs | 33 +- .../Entities/MediaCondition.cs | 38 +- .../Entities/MediaMaterial.cs | 38 +- .../Tango.DAL.Observables/Entities/MediaPurpos.cs | 38 +- .../Tango.DAL.Observables/Entities/MidTankType.cs | 43 +- .../Tango.DAL.Observables/Entities/Organization.cs | 55 +-- .../Tango.DAL.Observables/Entities/Permission.cs | 43 +- .../Entities/ProcessParametersTable.cs | 124 +++--- .../Entities/ProcessParametersTablesGroup.cs | 52 +-- .../Tango.DAL.Observables/Entities/Rml.cs | 246 +++++------ .../Tango.DAL.Observables/Entities/Role.cs | 47 +-- .../Entities/RolesPermission.cs | 42 +- .../Tango.DAL.Observables/Entities/Segment.cs | 47 +-- .../Tango.DAL.Observables/Entities/Sensor.cs | 69 ++-- .../Entities/SyncConfiguration.cs | 24 +- .../Tango.DAL.Observables/Entities/User.cs | 74 ++-- .../Tango.DAL.Observables/Entities/UsersRole.cs | 47 +-- .../Entities/WindingMethod.cs | 43 +- .../Tango.DAL.Observables/ExtensionMethods.cs | 5 +- .../ExtensionMethods/ConfigurationExtensions.cs | 6 +- .../ExtensionMethods/ObservableEntityExtensions.cs | 2 +- .../ProcessParametersTablesGroupExtensions.cs | 2 +- .../Tango.DAL.Observables/IObservableEntity.cs | 25 +- .../Tango.DAL.Observables/ObservableEntity.cs | 448 ++++----------------- .../Tango.DAL.Observables/ObservablesContext.cs | 443 ++++++++++++++++++++ .../ObservablesEntitiesAdapter.cs | 117 +++--- .../Tango.DAL.Observables/Partials/Machine.cs | 6 +- .../Partials/MachineVersion.cs | 4 +- .../Tango.DAL.Observables.csproj | 4 +- Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs | 8 +- .../Tango.DAL.Remote/DB/RemoteADO.edmx | 48 ++- .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 90 ++--- .../Tango.UnitTesting/CodeGeneration_TST.cs | 20 +- Software/Visual_Studio/Tango.sln | 3 +- .../ObservablesGenerator.cs | 36 +- .../Web/Tango.MachineService/App_Data/Tango.db | Bin 602112 -> 294912 bytes 102 files changed, 2203 insertions(+), 2470 deletions(-) create mode 100644 Software/Visual_Studio/Tango.CodeGeneration/ObservablesContextCodeFile.cs create mode 100644 Software/Visual_Studio/Tango.CodeGeneration/Templates/ObservablesContextCodeFile.cshtml create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/ObservablesContext.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index b93b255d8..a9a08206b 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 7c79ea466..c220a4591 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/EventTypeActionsToStringConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/EventTypeActionsToStringConverter.cs index 5cdee0153..3f0654247 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/EventTypeActionsToStringConverter.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/EventTypeActionsToStringConverter.cs @@ -23,7 +23,7 @@ namespace Tango.MachineStudio.DB.Converters if (value is IEnumerable) { IEnumerable eventActions = value as IEnumerable; - return String.Join(", ", eventActions.Select(x => x.ActionTypes.Name)); + return String.Join(", ", eventActions.Select(x => x.ActionType.Name)); } else { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/RegisteredView.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/RegisteredView.cs index 7f6d84ecf..bdf2105a6 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/RegisteredView.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/RegisteredView.cs @@ -44,6 +44,7 @@ namespace Tango.MachineStudio.DB.Managers View = view; View.MaxWidth = 1500; + View.MaxHeight = 800; if (action != null) { @@ -81,6 +82,7 @@ namespace Tango.MachineStudio.DB.Managers } view.MaxWidth = 1500; + view.MaxHeight = 800; Header = header; View = view; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesViewVM.cs index 0325e42ee..687c30470 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesViewVM.cs @@ -29,7 +29,7 @@ namespace Tango.MachineStudio.DB.ViewModels foreach (var actionType in SelectedActions) { - if (SelectedEntity.EventTypesActions.ToList().Exists(x => x.ActionTypes == actionType.Entity)) + if (SelectedEntity.EventTypesActions.ToList().Exists(x => x.ActionType == actionType.Entity)) { actionType.IsSelected = true; } @@ -49,22 +49,16 @@ namespace Tango.MachineStudio.DB.ViewModels { base.OnBeforeEntitySave(mode, eventType); + Adapter.Context.EventTypesActions.RemoveRange(eventType.EventTypesActions); + foreach (var actionType in SelectedActions) { - var eventTypeAction = eventType.EventTypesActions.SingleOrDefault(x => x.ActionTypes == actionType.Entity); - - if (eventTypeAction != null && !actionType.IsSelected) - { - eventTypeAction.Delete(); - continue; - } - if (actionType.IsSelected) { eventType.EventTypesActions.Add(new EventTypesAction() { - ActionTypes = actionType.Entity, - EventTypes = eventType, + ActionType = actionType.Entity, + EventType = eventType, ActionTypeGuid = actionType.Entity.Guid, EventTypeGuid = eventType.Guid }); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidTypesViewVM.cs index 49bd18822..05171b09f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidTypesViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidTypesViewVM.cs @@ -49,22 +49,16 @@ namespace Tango.MachineStudio.DB.ViewModels { base.OnBeforeEntitySave(mode, liquid); + Adapter.Context.LiquidTypesRmls.RemoveRange(liquid.LiquidTypesRmls); + foreach (var rml in SelectedRmls) { - var liquidRml = liquid.LiquidTypesRmls.SingleOrDefault(x => x.Rml == rml.Entity); - - if (liquidRml != null && !rml.IsSelected) - { - liquidRml.Delete(); - continue; - } - if (rml.IsSelected) { liquid.LiquidTypesRmls.Add(new LiquidTypesRml() { Rml = rml.Entity, - LiquidTypes = liquid, + LiquidType = liquid, RmlGuid = rml.Entity.Guid, LiquidTypeGuid = liquid.Guid }); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RolesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RolesViewVM.cs index 8ce95f736..50caf4c6d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RolesViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RolesViewVM.cs @@ -50,16 +50,10 @@ namespace Tango.MachineStudio.DB.ViewModels { base.OnBeforeEntitySave(mode, role); + Adapter.Context.RolesPermissions.RemoveRange(role.RolesPermissions); + foreach (var permission in SelectedPermissions) { - var rolePermission = role.RolesPermissions.SingleOrDefault(x => x.Permission == permission.Entity); - - if (rolePermission != null && !permission.IsSelected) - { - rolePermission.Delete(); - continue; - } - if (permission.IsSelected) { role.RolesPermissions.Add(new RolesPermission() diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/UsersViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/UsersViewVM.cs index 044b8a88a..e338746ff 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/UsersViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/UsersViewVM.cs @@ -50,26 +50,19 @@ namespace Tango.MachineStudio.DB.ViewModels { base.OnBeforeEntitySave(mode, user); + Adapter.Context.UsersRoles.RemoveRange(user.UsersRoles); + foreach (var role in SelectedRoles) { - var userRole = user.UsersRoles.SingleOrDefault(x => x.Role == role.Entity); - - if (userRole != null) - { - userRole.Deleted = !role.IsSelected; - } - else + if (role.IsSelected) { - if (role.IsSelected) + user.UsersRoles.Add(new UsersRole() { - user.UsersRoles.Add(new UsersRole() - { - Role = role.Entity, - User = user, - RoleGuid = role.Entity.Guid, - UserGuid = user.Guid - }); - } + Role = role.Entity, + User = user, + RoleGuid = role.Entity.Guid, + UserGuid = user.Guid + }); } } } @@ -80,7 +73,7 @@ namespace Tango.MachineStudio.DB.ViewModels if (EditEntity.Email != null) { - if (Adapter.Users.ToList().Exists(x => x != EditEntity && x.Email.ToLower() == EditEntity.Email.ToLower())) + if (Adapter.Users.ToList().Exists(x => x.Guid != EditEntity.Guid && x.Email.ToLower() == EditEntity.Email.ToLower())) { ValidationErrors.Add("Email already exist"); } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CatView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CatView.xaml index 9cd01cfc4..080591c15 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CatView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CatView.xaml @@ -32,7 +32,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CatsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CatsView.xaml index e72146525..6eb693780 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CatsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CatsView.xaml @@ -23,13 +23,13 @@ - + - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml index afbaf660a..2e34379e5 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml @@ -28,25 +28,25 @@ - + - + - + - + - + - + - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml index 235e49cc3..819dbd1c7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml @@ -16,13 +16,13 @@ - - - - - - - + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml index 543e6b40c..537bdb9f7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml @@ -29,7 +29,7 @@ - + @@ -37,7 +37,7 @@ - + @@ -52,7 +52,7 @@ - + @@ -61,7 +61,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml index e5043e3e2..0837bbf9f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml @@ -25,7 +25,7 @@ - + @@ -35,10 +35,10 @@ - + - + @@ -46,14 +46,14 @@ - + - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlView.xaml index a3b3f5eed..2fbe2365c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlView.xaml @@ -21,7 +21,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlsView.xaml index f96402432..11f781e5b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlsView.xaml @@ -16,9 +16,9 @@ - + - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml index 50a1c790b..a15f9c9e1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml @@ -21,7 +21,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml index 08cac568f..be917634a 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml @@ -16,7 +16,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineView.xaml index 0a7ee4c32..ab880a8a8 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineView.xaml @@ -22,7 +22,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml index ea48667d9..c6febd63c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml @@ -16,7 +16,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTableView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTableView.xaml index 1e3933ce0..75b559bf2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTableView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTableView.xaml @@ -23,7 +23,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml index d9ad83f68..0e20ce5af 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml @@ -21,7 +21,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlView.xaml index adf5310ee..43a17d8e4 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlView.xaml @@ -32,10 +32,10 @@ - + - + @@ -50,19 +50,19 @@ - + - + - + - + - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsView.xaml index 0a02c6821..86a61d400 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsView.xaml @@ -23,23 +23,23 @@ - + - + - - - - - + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 0742ca752..8f3d2a7e3 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -44,7 +44,19 @@ namespace Tango.MachineStudio.Developer.ViewModels public Machine SelectedMachine { get { return _selectedMachine; } - set { _selectedMachine = value; RaisePropertyChangedAuto(); OnMachineChanged(); InvalidateRelayCommands(); } + set + { + _selectedMachine = value; + RaisePropertyChangedAuto(); + OnMachineChanged(); + InvalidateRelayCommands(); + + if (_selectedMachine != null) + { + _selectedMachine.Saved -= SelectedMachine_Saved; + _selectedMachine.Saved += SelectedMachine_Saved; + } + } } private List _liquidTypesRmls; @@ -104,7 +116,13 @@ namespace Tango.MachineStudio.Developer.ViewModels public Rml SelectedRML { get { return _selectedRML; } - set { _selectedRML = value; RaisePropertyChangedAuto(); InvalidateLiquidFactorsAndProcessTables(); InvalidateRelayCommands(); } + set + { + _selectedRML = value; + RaisePropertyChangedAuto(); + InvalidateLiquidFactorsAndProcessTables(); + InvalidateRelayCommands(); + } } private bool _isSideBarOpened; @@ -205,6 +223,20 @@ namespace Tango.MachineStudio.Developer.ViewModels #endregion + #region Event Handlers + + /// + /// Handles the Saved event of the SelectedMachine. + /// + /// The source of the event. + /// The instance containing the event data. + private void SelectedMachine_Saved(object sender, EventArgs e) + { + InvalidateLiquidFactorsAndProcessTables(); + } + + #endregion + #region Virtual Methods /// @@ -278,7 +310,7 @@ namespace Tango.MachineStudio.Developer.ViewModels foreach (var table in RmlProcessParametersTableGroup.ProcessParametersTables) { var newTable = table.CloneEntity(); - newTable.ProcessParametersTablesGroups = group; + newTable.ProcessParametersTablesGroup = group; tables.Add(newTable); } @@ -313,7 +345,7 @@ namespace Tango.MachineStudio.Developer.ViewModels { if (SelectedRML != null && SelectedMachine != null) { - LiquidTypesRmls = SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidTypes).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == SelectedRML.Guid).ToList(); + LiquidTypesRmls = SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidType).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == SelectedRML.Guid).ToList(); RmlProcessParametersTableGroup = SelectedRML.ProcessParametersTablesGroups.SingleOrDefault(x => x.Active); if (RmlProcessParametersTableGroup != null) diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml index a18e4145e..243165cd5 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml @@ -219,7 +219,7 @@ - + @@ -455,7 +455,7 @@ Winding Method - + @@ -736,7 +736,7 @@ - + private void SetVersionConfiguration() { - if (Machine.MachineVersions != null) + if (Machine.MachineVersion != null) { - Configuration = Machine.MachineVersions.Configuration.CloneConfiguration(); + Configuration = Machine.MachineVersion.DefaultConfiguration.CloneConfiguration(); } else { @@ -605,8 +605,8 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels { if (vm.SelectedVersion != null) { - vm.SelectedVersion.Configuration = Configuration.CloneConfiguration(); - vm.SelectedVersion.DefaultConfigurationGuid = vm.SelectedVersion.Configuration.Guid; + vm.SelectedVersion.DefaultConfiguration = Configuration.CloneConfiguration(); + vm.SelectedVersion.DefaultConfigurationGuid = vm.SelectedVersion.DefaultConfiguration.Guid; await vm.SelectedVersion.SaveAsync(); } else @@ -615,8 +615,8 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels newVersion.Version = vm.Version; newVersion.Name = vm.VersionName; - newVersion.Configuration = Configuration.CloneConfiguration(); - newVersion.DefaultConfigurationGuid = newVersion.Configuration.Guid; + newVersion.DefaultConfiguration = Configuration.CloneConfiguration(); + newVersion.DefaultConfigurationGuid = newVersion.DefaultConfiguration.Guid; await newVersion.SaveAsync(); } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml index a7e604352..691fa6987 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml @@ -57,8 +57,8 @@ - - + + @@ -105,7 +105,7 @@ - + @@ -123,7 +123,7 @@ + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs index 6d08a10e0..70e127b6c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs @@ -62,7 +62,7 @@ namespace Tango.MachineStudio.MachineDesigner.Views { SetHighlightRegion(hardwareGrid); } - else if (e.DataContext is ApplicationVersion || e.DataContext is ApplicationOsVersion || e.DataContext is ApplicationDisplayPanelVersion) + else if (e.DataContext is ApplicationVersion || e.DataContext is ApplicationOsVersion || e.DataContext is ApplicationDisplayPanelVersion || e.DataContext is ApplicationFirmwareVersion) { SetHighlightRegion(gridTablet); } @@ -70,7 +70,7 @@ namespace Tango.MachineStudio.MachineDesigner.Views { SetHighlightRegion(gridEmbedded); } - else if (e.DataContext is DispenserType || e.DataContext is CartridgeType || e.DataContext is LiquidType || e.DataContext is MidTankType) + else if (e.DataContext is DispenserType || e.DataContext is CartridgeType || e.DataContext is LiquidType || e.DataContext is MidTankType || e.DataContext is IdsPackFormula) { SetHighlightRegion(gridIds); } @@ -102,6 +102,10 @@ namespace Tango.MachineStudio.MachineDesigner.Views { _vm.DropMidTankType(e.Draggable.DataContext as MidTankType, e.Droppable.DataContext as IdsPack); } + else if (e.Draggable.DataContext is IdsPackFormula) + { + _vm.DropIdsFormula(e.Draggable.DataContext as IdsPackFormula, e.Droppable.DataContext as IdsPack); + } else if (e.Draggable.DataContext is IdsPack) { _vm.DropIdsPack(e.Draggable.DataContext as IdsPack, e.Droppable.DataContext as IdsPack); diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml b/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml index 001a2bb3f..9d5ac4bb1 100644 --- a/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml +++ b/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("@(Model.TableName)")] - public partial class @(Model.Name) : ObservableEntity + public partial class @(Model.Name) : ObservableEntity<@(Model.Name)> { @foreach (var prop in Model.Fields) { diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/ActionType.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/ActionType.cs index ffdde45d3..f3b675bbe 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/ActionType.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/ActionType.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("ACTION_TYPES")] - public partial class ActionType : ObservableEntity + public partial class ActionType : ObservableEntity { private Int32 _code; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Address.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Address.cs index f2ba8d4e4..cb144e7bf 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Address.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Address.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("ADDRESSES")] - public partial class Address : ObservableEntity + public partial class Address : ObservableEntity
{ private Boolean _deleted; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/ApplicationDisplayPanelVersion.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/ApplicationDisplayPanelVersion.cs index 1f56718d1..8848bb59a 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/ApplicationDisplayPanelVersion.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/ApplicationDisplayPanelVersion.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("APPLICATION_DISPLAY_PANEL_VERSIONS")] - public partial class ApplicationDisplayPanelVersion : ObservableEntity + public partial class ApplicationDisplayPanelVersion : ObservableEntity { private Double _version; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/ApplicationFirmwareVersion.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/ApplicationFirmwareVersion.cs index 5c5f44205..e85186be2 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/ApplicationFirmwareVersion.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/ApplicationFirmwareVersion.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("APPLICATION_FIRMWARE_VERSIONS")] - public partial class ApplicationFirmwareVersion : ObservableEntity + public partial class ApplicationFirmwareVersion : ObservableEntity { private Double _version; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/ApplicationOsVersion.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/ApplicationOsVersion.cs index b4cff06e9..5c7cd70b5 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/ApplicationOsVersion.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/ApplicationOsVersion.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("APPLICATION_OS_VERSIONS")] - public partial class ApplicationOsVersion : ObservableEntity + public partial class ApplicationOsVersion : ObservableEntity { private Double _version; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/ApplicationVersion.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/ApplicationVersion.cs index 98f8a1e7f..885f647f0 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/ApplicationVersion.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/ApplicationVersion.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("APPLICATION_VERSIONS")] - public partial class ApplicationVersion : ObservableEntity + public partial class ApplicationVersion : ObservableEntity { private Double _version; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/BrushStop.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/BrushStop.cs index 4646f3178..477aa8efb 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/BrushStop.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/BrushStop.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("BRUSH_STOPS")] - public partial class BrushStop : ObservableEntity + public partial class BrushStop : ObservableEntity { private String _segmentguid; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/CartridgeType.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/CartridgeType.cs index 28dab4039..3b1bba423 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/CartridgeType.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/CartridgeType.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("CARTRIDGE_TYPES")] - public partial class CartridgeType : ObservableEntity + public partial class CartridgeType : ObservableEntity { private Int32 _code; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Cat.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Cat.cs index 0ffaacfd8..89a00cc85 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Cat.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Cat.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("CATS")] - public partial class Cat : ObservableEntity + public partial class Cat : ObservableEntity { private String _name; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Cct.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Cct.cs index 737d3e127..dcca67aab 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Cct.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Cct.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("CCTS")] - public partial class Cct : ObservableEntity + public partial class Cct : ObservableEntity { private String _name; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/ColorSpace.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/ColorSpace.cs index de99fb775..98f745bff 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/ColorSpace.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/ColorSpace.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("COLOR_SPACES")] - public partial class ColorSpace : ObservableEntity + public partial class ColorSpace : ObservableEntity { private Int32 _code; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Configuration.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Configuration.cs index 999491915..323fb7b39 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Configuration.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Configuration.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("CONFIGURATIONS")] - public partial class Configuration : ObservableEntity + public partial class Configuration : ObservableEntity { private String _name; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Contact.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Contact.cs index ad95c490d..c310451ac 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Contact.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Contact.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("CONTACTS")] - public partial class Contact : ObservableEntity + public partial class Contact : ObservableEntity { private Boolean _deleted; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/DispenserType.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/DispenserType.cs index 0d464f0bf..04b3258e3 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/DispenserType.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/DispenserType.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("DISPENSER_TYPES")] - public partial class DispenserType : ObservableEntity + public partial class DispenserType : ObservableEntity { private Int32 _code; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/EmbeddedFirmwareVersion.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/EmbeddedFirmwareVersion.cs index da4bae985..d10426933 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/EmbeddedFirmwareVersion.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/EmbeddedFirmwareVersion.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("EMBEDDED_FIRMWARE_VERSIONS")] - public partial class EmbeddedFirmwareVersion : ObservableEntity + public partial class EmbeddedFirmwareVersion : ObservableEntity { private Double _version; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/EmbeddedSoftwareVersion.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/EmbeddedSoftwareVersion.cs index 2b35dc05d..55a8ca985 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/EmbeddedSoftwareVersion.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/EmbeddedSoftwareVersion.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("EMBEDDED_SOFTWARE_VERSIONS")] - public partial class EmbeddedSoftwareVersion : ObservableEntity + public partial class EmbeddedSoftwareVersion : ObservableEntity { private Double _version; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/EventType.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/EventType.cs index 77b22e35c..a26fe70dc 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/EventType.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/EventType.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("EVENT_TYPES")] - public partial class EventType : ObservableEntity + public partial class EventType : ObservableEntity { private Int32 _code; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/EventTypesAction.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/EventTypesAction.cs index 46219549c..87f552957 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/EventTypesAction.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/EventTypesAction.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("EVENT_TYPES_ACTIONS")] - public partial class EventTypesAction : ObservableEntity + public partial class EventTypesAction : ObservableEntity { private String _eventtypeguid; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/FiberShape.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/FiberShape.cs index 01abfb0a5..4d91a522b 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/FiberShape.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/FiberShape.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("FIBER_SHAPES")] - public partial class FiberShape : ObservableEntity + public partial class FiberShape : ObservableEntity { private String _name; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/FiberSynth.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/FiberSynth.cs index 2251bc36f..3b099b4de 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/FiberSynth.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/FiberSynth.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("FIBER_SYNTHS")] - public partial class FiberSynth : ObservableEntity + public partial class FiberSynth : ObservableEntity { private String _name; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/HardwareVersion.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/HardwareVersion.cs index 49ad1220d..bddc684d3 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/HardwareVersion.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/HardwareVersion.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("HARDWARE_VERSIONS")] - public partial class HardwareVersion : ObservableEntity + public partial class HardwareVersion : ObservableEntity { private Double _version; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/IdsPack.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/IdsPack.cs index dc55d3612..e3a48c422 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/IdsPack.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/IdsPack.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("IDS_PACKS")] - public partial class IdsPack : ObservableEntity + public partial class IdsPack : ObservableEntity { private String _configurationguid; @@ -152,6 +152,26 @@ namespace Tango.DAL.Observables } + private String _idspackformulaguid; + /// + /// Gets or sets the idspack ids pack formula guid. + /// + [Column("IDS_PACK_FORMULA_GUID")] + [ForeignKey("IdsPackFormula")] + public String IdsPackFormulaGuid + { + get + { + return _idspackformulaguid; + } + + set + { + _idspackformulaguid = value; RaisePropertyChanged(nameof(IdsPackFormulaGuid)); + } + + } + private CartridgeType _cartridgetype; /// /// Gets or sets the idspack cartridge types. @@ -209,6 +229,25 @@ namespace Tango.DAL.Observables } + private IdsPackFormula _idspackformula; + /// + /// Gets or sets the idspack ids pack formulas. + /// + + public virtual IdsPackFormula IdsPackFormula + { + get + { + return _idspackformula; + } + + set + { + _idspackformula = value; RaisePropertyChanged(nameof(IdsPackFormula)); + } + + } + private LiquidType _liquidtype; /// /// Gets or sets the idspack liquid types. diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/IdsPackFormula.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/IdsPackFormula.cs new file mode 100644 index 000000000..0ad754233 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/IdsPackFormula.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using Tango.DAL.Remote.DB; + +namespace Tango.DAL.Observables +{ + [Table("IDS_PACK_FORMULAS")] + public partial class IdsPackFormula : ObservableEntity + { + + private Int32 _code; + /// + /// Gets or sets the idspackformula code. + /// + [Column("CODE")] + + public Int32 Code + { + get + { + return _code; + } + + set + { + _code = value; RaisePropertyChanged(nameof(Code)); + } + + } + + private String _name; + /// + /// Gets or sets the idspackformula name. + /// + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + _name = value; RaisePropertyChanged(nameof(Name)); + } + + } + + private String _description; + /// + /// Gets or sets the idspackformula description. + /// + [Column("DESCRIPTION")] + + public String Description + { + get + { + return _description; + } + + set + { + _description = value; RaisePropertyChanged(nameof(Description)); + } + + } + + private Boolean _autocalculated; + /// + /// Gets or sets the idspackformula auto calculated. + /// + [Column("AUTO_CALCULATED")] + + public Boolean AutoCalculated + { + get + { + return _autocalculated; + } + + set + { + _autocalculated = value; RaisePropertyChanged(nameof(AutoCalculated)); + } + + } + + private ObservableCollection _idspacks; + /// + /// Gets or sets the idspackformula ids packs. + /// + + public virtual ObservableCollection IdsPacks + { + get + { + return _idspacks; + } + + set + { + _idspacks = value; RaisePropertyChanged(nameof(IdsPacks)); + } + + } + + /// + /// Initializes a new instance of the class. + /// + public IdsPackFormula() : base() + { + + IdsPacks = new ObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Job.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Job.cs index fb3c20032..37c8e6736 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Job.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Job.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("JOBS")] - public partial class Job : ObservableEntity + public partial class Job : ObservableEntity { private DateTime _creationdate; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/JobRun.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/JobRun.cs index 3d8c1cb48..b15ca1511 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/JobRun.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/JobRun.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("JOB_RUNS")] - public partial class JobRun : ObservableEntity + public partial class JobRun : ObservableEntity { private String _jobguid; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/LinearMassDensityUnit.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/LinearMassDensityUnit.cs index 5767c5533..d0740e583 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/LinearMassDensityUnit.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/LinearMassDensityUnit.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("LINEAR_MASS_DENSITY_UNITS")] - public partial class LinearMassDensityUnit : ObservableEntity + public partial class LinearMassDensityUnit : ObservableEntity { private String _name; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/LiquidType.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/LiquidType.cs index b59a1d0c6..a166d8ec4 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/LiquidType.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/LiquidType.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("LIQUID_TYPES")] - public partial class LiquidType : ObservableEntity + public partial class LiquidType : ObservableEntity { private Int32 _code; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/LiquidTypesRml.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/LiquidTypesRml.cs index 4a4136bf9..3f8fb6bad 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/LiquidTypesRml.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/LiquidTypesRml.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("LIQUID_TYPES_RMLS")] - public partial class LiquidTypesRml : ObservableEntity + public partial class LiquidTypesRml : ObservableEntity { private String _liquidtypeguid; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Machine.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Machine.cs index 7328f411c..3b41da138 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Machine.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Machine.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("MACHINES")] - public partial class Machine : ObservableEntity + public partial class Machine : ObservableEntity { private String _serialnumber; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/MachineVersion.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/MachineVersion.cs index 95dc7d261..a47ee4232 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/MachineVersion.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/MachineVersion.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("MACHINE_VERSIONS")] - public partial class MachineVersion : ObservableEntity + public partial class MachineVersion : ObservableEntity { private Double _version; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/MachinesConfiguration.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/MachinesConfiguration.cs index 9958a0fcd..4ecaa0ad4 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/MachinesConfiguration.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/MachinesConfiguration.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("MACHINES_CONFIGURATIONS")] - public partial class MachinesConfiguration : ObservableEntity + public partial class MachinesConfiguration : ObservableEntity { private String _machineguid; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/MachinesEvent.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/MachinesEvent.cs index 659c0c0ed..28fac4bbe 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/MachinesEvent.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/MachinesEvent.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("MACHINES_EVENTS")] - public partial class MachinesEvent : ObservableEntity + public partial class MachinesEvent : ObservableEntity { private String _machineguid; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/MediaColor.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/MediaColor.cs index bd9b55b10..158edebc5 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/MediaColor.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/MediaColor.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("MEDIA_COLORS")] - public partial class MediaColor : ObservableEntity + public partial class MediaColor : ObservableEntity { private Int32 _color; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/MediaCondition.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/MediaCondition.cs index 1ad80393f..105e046f5 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/MediaCondition.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/MediaCondition.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("MEDIA_CONDITIONS")] - public partial class MediaCondition : ObservableEntity + public partial class MediaCondition : ObservableEntity { private String _name; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/MediaMaterial.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/MediaMaterial.cs index c27a7a91b..f03d2c7a1 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/MediaMaterial.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/MediaMaterial.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("MEDIA_MATERIALS")] - public partial class MediaMaterial : ObservableEntity + public partial class MediaMaterial : ObservableEntity { private String _name; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/MediaPurpos.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/MediaPurpos.cs index d40a87ae9..a09bdd1b8 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/MediaPurpos.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/MediaPurpos.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("MEDIA_PURPOSES")] - public partial class MediaPurpos : ObservableEntity + public partial class MediaPurpos : ObservableEntity { private String _name; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/MidTankType.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/MidTankType.cs index 591f8c3ff..5fef06004 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/MidTankType.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/MidTankType.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("MID_TANK_TYPES")] - public partial class MidTankType : ObservableEntity + public partial class MidTankType : ObservableEntity { private Int32 _code; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Organization.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Organization.cs index 44e4edc4f..28ea5f835 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Organization.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Organization.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("ORGANIZATIONS")] - public partial class Organization : ObservableEntity + public partial class Organization : ObservableEntity { private String _name; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Permission.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Permission.cs index 1a3fcd108..9057ecbd5 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Permission.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Permission.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("PERMISSIONS")] - public partial class Permission : ObservableEntity + public partial class Permission : ObservableEntity { private Int32 _code; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/ProcessParametersTable.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/ProcessParametersTable.cs index 167c2ebef..163d3da53 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/ProcessParametersTable.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/ProcessParametersTable.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("PROCESS_PARAMETERS_TABLES")] - public partial class ProcessParametersTable : ObservableEntity + public partial class ProcessParametersTable : ObservableEntity { private String _name; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/ProcessParametersTablesGroup.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/ProcessParametersTablesGroup.cs index 55f5dba33..ab8ae2ed8 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/ProcessParametersTablesGroup.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/ProcessParametersTablesGroup.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("PROCESS_PARAMETERS_TABLES_GROUPS")] - public partial class ProcessParametersTablesGroup : ObservableEntity + public partial class ProcessParametersTablesGroup : ObservableEntity { private String _rmlguid; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Rml.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Rml.cs index 18e04f9b9..429773e0c 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Rml.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Rml.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("RMLS")] - public partial class Rml : ObservableEntity + public partial class Rml : ObservableEntity { private String _name; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Role.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Role.cs index e0a183544..b9bb8244c 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Role.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Role.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("ROLES")] - public partial class Role : ObservableEntity + public partial class Role : ObservableEntity { private Int32 _code; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/RolesPermission.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/RolesPermission.cs index 8a2195331..3c7d4eb19 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/RolesPermission.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/RolesPermission.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("ROLES_PERMISSIONS")] - public partial class RolesPermission : ObservableEntity + public partial class RolesPermission : ObservableEntity { private String _roleguid; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Segment.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Segment.cs index 8fa4bb4f7..b018f2934 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Segment.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Segment.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("SEGMENTS")] - public partial class Segment : ObservableEntity + public partial class Segment : ObservableEntity { private String _name; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Sensor.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Sensor.cs index 7d09a0cc2..6b581f086 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Sensor.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Sensor.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("SENSORS")] - public partial class Sensor : ObservableEntity + public partial class Sensor : ObservableEntity { private Int32 _code; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/SyncConfiguration.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/SyncConfiguration.cs index 2aac73502..595757139 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/SyncConfiguration.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/SyncConfiguration.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("SYNC_CONFIGURATIONS")] - public partial class SyncConfiguration : ObservableEntity + public partial class SyncConfiguration : ObservableEntity { /// diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/User.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/User.cs index 9739e5b62..1a73b3750 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/User.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/User.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("USERS")] - public partial class User : ObservableEntity + public partial class User : ObservableEntity { private Boolean _deleted; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/UsersRole.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/UsersRole.cs index e96ea1fe4..934bb8822 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/UsersRole.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/UsersRole.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("USERS_ROLES")] - public partial class UsersRole : ObservableEntity + public partial class UsersRole : ObservableEntity { private Boolean _deleted; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/WindingMethod.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/WindingMethod.cs index 296774138..f14cf43cc 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/WindingMethod.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/WindingMethod.cs @@ -9,7 +9,7 @@ using Tango.DAL.Remote.DB; namespace Tango.DAL.Observables { [Table("WINDING_METHODS")] - public partial class WindingMethod : ObservableEntity + public partial class WindingMethod : ObservableEntity { private Int32 _code; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Enumerations/ActionTypes.cs b/Software/Visual_Studio/Tango.DAL.Observables/Enumerations/ActionTypes.cs index 3473559e6..ef45931de 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Enumerations/ActionTypes.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Enumerations/ActionTypes.cs @@ -19,7 +19,7 @@ namespace Tango.DAL.Observables /// (Some action 2 description) /// [Description("Some action 2 description")] - Action2 = 2, + Action2yesss = 2, } } diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Enumerations/IdsPackFormulas.cs b/Software/Visual_Studio/Tango.DAL.Observables/Enumerations/IdsPackFormulas.cs new file mode 100644 index 000000000..595cb176b --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Observables/Enumerations/IdsPackFormulas.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.ComponentModel; + +namespace Tango.DAL.Observables +{ + public enum IdsPackFormulas + { + + /// + /// (Standard Color IDS Pack Formula) + /// + [Description("Standard Color IDS Pack Formula")] + StandardColor = 0, + + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Observables/IObservableEntity.cs b/Software/Visual_Studio/Tango.DAL.Observables/IObservableEntity.cs index 62bfe9e86..a957dacd1 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/IObservableEntity.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/IObservableEntity.cs @@ -44,6 +44,16 @@ namespace Tango.DAL.Observables /// void Save(); + /// + /// Attaches this observable to the proper DbSet. + /// + void Attach(); + + /// + /// Detaches this observable from the proper DbSet. + /// + void Detach(); + /// /// Saves the changes on this entity to database asynchronously. /// diff --git a/Software/Visual_Studio/Tango.DAL.Observables/ObservableEntity.cs b/Software/Visual_Studio/Tango.DAL.Observables/ObservableEntity.cs index 493939ca4..b36577870 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/ObservableEntity.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/ObservableEntity.cs @@ -17,6 +17,7 @@ using Tango.Core.Helpers; using Force.DeepCloner; using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations; +using System.Runtime.CompilerServices; namespace Tango.DAL.Observables { @@ -26,7 +27,7 @@ namespace Tango.DAL.Observables /// /// /// - public abstract class ObservableEntity : ExtendedObject, IObservableEntity + public abstract class ObservableEntity : ExtendedObject, IObservableEntity where T : class, IObservableEntity { private Regex regExDAL; @@ -92,6 +93,22 @@ namespace Tango.DAL.Observables Saved?.Invoke(this, new EventArgs()); } + /// + /// Attaches this entity to the proper DbSet. + /// + public virtual void Attach() + { + GetDbSet().Add(this as T); + } + + /// + /// Detaches this observable from the proper DbSet. + /// + public virtual void Detach() + { + GetDbSet().Remove(this as T); + } + /// /// Saves the changes on this entity to database asynchronously. /// @@ -118,12 +135,8 @@ namespace Tango.DAL.Observables } else { - String tabelName = this.GetType().BaseType.Name.PluralizeMVC(); - var p = typeof(ObservablesContext).GetProperty(tabelName); - var dbSet = p.GetValue(ObservablesEntitiesAdapter.Instance.Context); - var method = dbSet.GetType().GetMethod("Remove"); - method.Invoke(dbSet, new object[] { this }); - ObservablesEntitiesAdapter.Instance.SaveChanges(); + GetDbSet().Remove(this as T); + Save(); } } @@ -132,11 +145,7 @@ namespace Tango.DAL.Observables /// public virtual void DefferedDelete() { - String tabelName = this.GetType().BaseType.Name.PluralizeMVC(); - var p = typeof(ObservablesContext).GetProperty(tabelName); - var dbSet = p.GetValue(ObservablesEntitiesAdapter.Instance.Context); - var method = dbSet.GetType().GetMethod("Remove"); - method.Invoke(dbSet, new object[] { this }); + GetDbSet().Remove(this as T); } /// @@ -151,23 +160,30 @@ namespace Tango.DAL.Observables } /// - /// Converts the specified database conventional name to the observables conventional name. + /// Gets the observable database set. /// - /// DAL name. /// - public static String DalNameToStandardName(String dalName) + public DbSet GetDbSet() { - return String.Join("", dalName.Split('_').Select(x => ToTitleCase(x))); - } + String tabelName = this.GetType().Name.PluralizeMVC(); + var p = typeof(ObservablesContext).GetProperty(tabelName); + if (p != null) + { + var set1 = p.GetValue(ObservablesEntitiesAdapter.Instance.Context) as DbSet; + return set1; + } + else + { + tabelName = this.GetType().BaseType.Name.PluralizeMVC(); + p = typeof(ObservablesContext).GetProperty(tabelName); + if (p != null) + { + var set2 = p.GetValue(ObservablesEntitiesAdapter.Instance.Context) as DbSet; + return set2; + } + } - /// - /// Converts the specified text to title case. - /// - /// The text. - /// - public static string ToTitleCase(string text) - { - return CultureInfo.CurrentCulture.TextInfo.ToTitleCase(text.ToLower()); + return null; } #region Operator Overloading diff --git a/Software/Visual_Studio/Tango.DAL.Observables/ObservablesContext.cs b/Software/Visual_Studio/Tango.DAL.Observables/ObservablesContext.cs index 52310d446..63dc901ba 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/ObservablesContext.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/ObservablesContext.cs @@ -215,6 +215,14 @@ namespace Tango.DAL.Observables get; set; } + /// + /// Gets or sets the IdsPackFormulas. + /// + public DbSet IdsPackFormulas + { + get; set; + } + /// /// Gets or sets the IdsPacks. /// diff --git a/Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapter.cs b/Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapter.cs index eff9e274d..89e43c2a8 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapter.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapter.cs @@ -263,6 +263,8 @@ namespace Tango.DAL.Observables Sensors = Context.Sensors.ToObservableCollection(); + IdsPackFormulas = Context.IdsPackFormulas.ToObservableCollection(); + InitCollectionSources(); //var action = ActionTypes.First(); diff --git a/Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapterExtension.cs b/Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapterExtension.cs index 62c5ef260..3123a453d 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapterExtension.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapterExtension.cs @@ -762,6 +762,42 @@ namespace Tango.DAL.Observables } + private ObservableCollection _idspackformulas; + /// + /// Gets or sets the IdsPackFormulas. + /// + public ObservableCollection IdsPackFormulas + { + get + { + return _idspackformulas; + } + + set + { + _idspackformulas = value; RaisePropertyChanged(nameof(IdsPackFormulas)); + } + + } + + private ICollectionView _idspackformulasViewSource; + /// + /// Gets or sets the IdsPackFormulas View Source. + /// + public ICollectionView IdsPackFormulasViewSource + { + get + { + return _idspackformulasViewSource; + } + + set + { + _idspackformulasViewSource = value; RaisePropertyChanged(nameof(IdsPackFormulasViewSource)); + } + + } + private ObservableCollection _idspacks; /// /// Gets or sets the IdsPacks. @@ -1818,6 +1854,8 @@ namespace Tango.DAL.Observables HardwareVersionsViewSource = CreateCollectionView(HardwareVersions); + IdsPackFormulasViewSource = CreateCollectionView(IdsPackFormulas); + IdsPacksViewSource = CreateCollectionView(IdsPacks); JobRunsViewSource = CreateCollectionView(JobRuns); diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Tango.DAL.Observables.csproj b/Software/Visual_Studio/Tango.DAL.Observables/Tango.DAL.Observables.csproj index ed5cadaa8..f9aa7cc5d 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Tango.DAL.Observables.csproj +++ b/Software/Visual_Studio/Tango.DAL.Observables/Tango.DAL.Observables.csproj @@ -67,6 +67,7 @@ + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs index cddce2f6d..6275098a8 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs @@ -24,10 +24,12 @@ namespace Tango.DAL.Remote.DB public string MID_TANK_TYPE_GUID { get; set; } public string NAME { get; set; } public int PACK_INDEX { get; set; } + public string IDS_PACK_FORMULA_GUID { get; set; } public virtual CARTRIDGE_TYPES CARTRIDGE_TYPES { get; set; } public virtual CONFIGURATION CONFIGURATION { get; set; } public virtual DISPENSER_TYPES DISPENSER_TYPES { get; set; } + public virtual IDS_PACK_FORMULAS IDS_PACK_FORMULAS { get; set; } public virtual LIQUID_TYPES LIQUID_TYPES { get; set; } public virtual MID_TANK_TYPES MID_TANK_TYPES { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACK_FORMULAS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACK_FORMULAS.cs new file mode 100644 index 000000000..e4b4ca1c5 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACK_FORMULAS.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tango.DAL.Remote.DB +{ + using System; + using System.Collections.Generic; + + public partial class IDS_PACK_FORMULAS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public IDS_PACK_FORMULAS() + { + this.IDS_PACKS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public int CODE { get; set; } + public string NAME { get; set; } + public string DESCRIPTION { get; set; } + public bool AUTO_CALCULATED { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection IDS_PACKS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs index df3d26227..65d93da83 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs @@ -46,6 +46,7 @@ namespace Tango.DAL.Remote.DB public virtual DbSet FIBER_SHAPES { get; set; } public virtual DbSet FIBER_SYNTHS { get; set; } public virtual DbSet HARDWARE_VERSIONS { get; set; } + public virtual DbSet IDS_PACK_FORMULAS { get; set; } public virtual DbSet IDS_PACKS { get; set; } public virtual DbSet JOB_RUNS { get; set; } public virtual DbSet JOBS { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index 46919f0ab..191370fdd 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -258,6 +258,18 @@ + + + + + + + + + + + + @@ -272,6 +284,7 @@ + @@ -834,6 +847,18 @@ + + + + + + + + + + + + @@ -1300,6 +1325,7 @@ + @@ -1400,6 +1426,10 @@ + + + + @@ -1567,6 +1597,7 @@ + @@ -1703,6 +1734,10 @@ + + + + @@ -2098,6 +2133,19 @@ + + + + + + + + + + + + + @@ -2112,9 +2160,11 @@ + + @@ -2855,6 +2905,18 @@ + + + + + + + + + + + + @@ -3467,9 +3529,23 @@ + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index 4c973eb66..f7e4c0cc1 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,55 +5,56 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -81,6 +82,7 @@ + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj index 6228a08fb..8300ed567 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj +++ b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj @@ -131,6 +131,9 @@ RemoteADO.tt + + RemoteADO.tt + RemoteADO.tt diff --git a/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs b/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs index af0e1a08d..3973e8ad5 100644 --- a/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs +++ b/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs @@ -11,7 +11,7 @@ using Tango.CodeGeneration; using Tango.DAL.Remote.DB; using Tango.Settings; using Humanizer; -using Tango.DAL.Observables; +using System.Globalization; namespace Tango.DBObservablesGenerator.CLI { @@ -29,32 +29,32 @@ namespace Tango.DBObservablesGenerator.CLI //Generate Entities... foreach (var table in typeof(RemoteDB).GetProperties().Where(x => typeof(IEnumerable).IsAssignableFrom(x.PropertyType))) { - EntityCodeFile codeFile = new EntityCodeFile(ObservableEntity.DalNameToStandardName(table.Name).SingularizeMVC()) + EntityCodeFile codeFile = new EntityCodeFile(DalNameToStandardName(table.Name).SingularizeMVC()) { EntityName = table.Name.SingularizeMVC(), TableName = table.Name, }; - List foreignKeys = table.PropertyType.GenericTypeArguments.First().GetProperties().Skip(3).Where(x => x.PropertyType == typeof(String)).Where(x => x.Name.ToLower().Contains("guid")).Select(x => ObservableEntity.DalNameToStandardName(x.Name).SingularizeMVC().Replace("Guid", "")).ToList(); + List foreignKeys = table.PropertyType.GenericTypeArguments.First().GetProperties().Skip(3).Where(x => x.PropertyType == typeof(String)).Where(x => x.Name.ToLower().Contains("guid")).Select(x => DalNameToStandardName(x.Name).SingularizeMVC().Replace("Guid", "")).ToList(); foreach (var field in table.PropertyType.GenericTypeArguments.First().GetProperties().Skip(3)) { EntityCodeFileField codeField = new EntityCodeFileField(); codeField.FieldName = field.Name; - codeField.Name = ObservableEntity.DalNameToStandardName(field.Name); + codeField.Name = DalNameToStandardName(field.Name); codeField.Description = field.Name.Replace("_", " ").ToLower(); if (field.PropertyType.IsGenericType) { - codeField.Type = String.Format("ObservableCollection<{0}>", ObservableEntity.DalNameToStandardName(field.PropertyType.GenericTypeArguments.Single().Name).SingularizeMVC()); + codeField.Type = String.Format("ObservableCollection<{0}>", DalNameToStandardName(field.PropertyType.GenericTypeArguments.Single().Name).SingularizeMVC()); codeField.Construct = true; } else { if (field.PropertyType.IsClass && field.PropertyType != typeof(String) && field.PropertyType != typeof(byte[])) { - codeField.Type = ObservableEntity.DalNameToStandardName(field.PropertyType.Name).SingularizeMVC(); + codeField.Type = DalNameToStandardName(field.PropertyType.Name).SingularizeMVC(); codeField.Name = codeField.Type; var fk = foreignKeys.SingleOrDefault(x => x.Contains(codeField.Name)); @@ -103,7 +103,7 @@ namespace Tango.DBObservablesGenerator.CLI if (codeProp != null && nameProp != null) { EnumerationFile enumFile = new EnumerationFile(); - enumFile.Name = ObservableEntity.DalNameToStandardName(tableProp.Name); + enumFile.Name = DalNameToStandardName(tableProp.Name); foreach (var row in tableProp.GetValue(db) as IEnumerable) { @@ -135,14 +135,14 @@ namespace Tango.DBObservablesGenerator.CLI //Generate Observables Adapter Extensions... ObservablesAdapterFile adapterFile = new ObservablesAdapterFile(); - adapterFile.Name = nameof(ObservablesEntitiesAdapter); + adapterFile.Name = "ObservablesEntitiesAdapter"; foreach (var table in typeof(RemoteDB).GetProperties().Where(x => typeof(IEnumerable).IsAssignableFrom(x.PropertyType))) { adapterFile.Properties.Add(new Property() { - Name = ObservableEntity.DalNameToStandardName(table.Name), - Type = String.Format("ObservableCollection<{0}>", ObservableEntity.DalNameToStandardName(table.PropertyType.GenericTypeArguments.Single().Name).SingularizeMVC()), + Name = DalNameToStandardName(table.Name), + Type = String.Format("ObservableCollection<{0}>", DalNameToStandardName(table.PropertyType.GenericTypeArguments.Single().Name).SingularizeMVC()), }); } @@ -158,8 +158,8 @@ namespace Tango.DBObservablesGenerator.CLI { contextFile.Properties.Add(new Property() { - Name = ObservableEntity.DalNameToStandardName(table.Name), - Type = String.Format("DbSet<{0}>", ObservableEntity.DalNameToStandardName(table.PropertyType.GenericTypeArguments.Single().Name).SingularizeMVC()), + Name = DalNameToStandardName(table.Name), + Type = String.Format("DbSet<{0}>", DalNameToStandardName(table.PropertyType.GenericTypeArguments.Single().Name).SingularizeMVC()), }); } String contextCode = contextFile.GenerateCode(); @@ -176,7 +176,7 @@ namespace Tango.DBObservablesGenerator.CLI //Generate Entities... foreach (var table in typeof(RemoteDB).GetProperties().Where(x => typeof(IEnumerable).IsAssignableFrom(x.PropertyType))) { - EntityCodeFileJava codeFile = new EntityCodeFileJava(ObservableEntity.DalNameToStandardName(table.Name).Singularize(false)) + EntityCodeFileJava codeFile = new EntityCodeFileJava(DalNameToStandardName(table.Name).Singularize(false)) { EntityName = table.Name.Singularize(false), TableName = table.Name, @@ -188,8 +188,8 @@ namespace Tango.DBObservablesGenerator.CLI { EntityCodeFileField codeField = new EntityCodeFileField(); codeField.FieldName = field.Name; - codeField.Name = ObservableEntity.DalNameToStandardName(field.Name); - codeField.Description = FirstCharacterToLower(ObservableEntity.DalNameToStandardName(field.Name)); + codeField.Name = DalNameToStandardName(field.Name); + codeField.Description = FirstCharacterToLower(DalNameToStandardName(field.Name)); if (field.PropertyType.IsGenericType) @@ -200,7 +200,7 @@ namespace Tango.DBObservablesGenerator.CLI { if (field.PropertyType.IsClass && field.PropertyType != typeof(String) && field.PropertyType != typeof(Byte[])) { - codeField.Type = ObservableEntity.DalNameToStandardName(field.PropertyType.Name).Singularize(false); + codeField.Type = DalNameToStandardName(field.PropertyType.Name).Singularize(false); codeField.Construct = true; } else if (field.PropertyType == typeof(Byte[])) @@ -239,7 +239,7 @@ namespace Tango.DBObservablesGenerator.CLI if (codeProp != null && nameProp != null) { EnumerationFileJava enumFile = new EnumerationFileJava(); - enumFile.Name = ObservableEntity.DalNameToStandardName(tableProp.Name); + enumFile.Name = DalNameToStandardName(tableProp.Name); foreach (var row in tableProp.GetValue(db) as IEnumerable) { @@ -277,8 +277,8 @@ namespace Tango.DBObservablesGenerator.CLI { daoFile.Entities.Add(new TangoDAOJavaFile.TangoDAOEntity() { - Name = ObservableEntity.DalNameToStandardName(table.Name).Singularize(false), - TableName = ObservableEntity.DalNameToStandardName(table.Name), + Name = DalNameToStandardName(table.Name).Singularize(false), + TableName = DalNameToStandardName(table.Name), }); } @@ -301,5 +301,25 @@ namespace Tango.DBObservablesGenerator.CLI return Char.ToLowerInvariant(str[0]) + str.Substring(1); } + + /// + /// Converts the specified database conventional name to the observables conventional name. + /// + /// DAL name. + /// + private static String DalNameToStandardName(String dalName) + { + return String.Join("", dalName.Split('_').Select(x => ToTitleCase(x))); + } + + /// + /// Converts the specified text to title case. + /// + /// The text. + /// + private static string ToTitleCase(string text) + { + return CultureInfo.CurrentCulture.TextInfo.ToTitleCase(text.ToLower()); + } } } diff --git a/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/Tango.DBObservablesGenerator.CLI.csproj b/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/Tango.DBObservablesGenerator.CLI.csproj index fa573208b..87baf3a3f 100644 --- a/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/Tango.DBObservablesGenerator.CLI.csproj +++ b/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/Tango.DBObservablesGenerator.CLI.csproj @@ -72,10 +72,6 @@ {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} Tango.Core - - {0ecd6da8-7aa6-48d9-8b65-279d176ad9af} - Tango.DAL.Observables - {38197109-8610-4d3f-92b9-16d48df94d7c} Tango.DAL.Remote -- cgit v1.3.1 From 303568941753cda00f012d18f89d89e989ed8fe9 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 4 Feb 2018 11:58:41 +0200 Subject: Added main background image. Modified circle vector for brush stop edit fields. --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 8388608 -> 8388608 bytes Software/Graphics/White-Abstract-wallpaper.jpeg | Bin 0 -> 130060 bytes Software/Graphics/White-Abstract.png | Bin 0 -> 375774 bytes Software/Graphics/circle.svg | 51 ++++++++++++++++++++ Software/Graphics/circle.xaml | 53 +++++++++++++++++++++ .../ViewModels/MainViewVM.cs | 2 - .../Views/MainView.xaml | 50 +++++++++---------- .../Views/MainView.xaml | 2 +- .../Resources/MaterialDesign.xaml | 19 ++++++++ .../Images/White-Abstract.png | Bin 0 -> 375774 bytes .../Tango.MachineStudio.UI/MainWindow.xaml | 3 ++ .../Tango.MachineStudio.UI.csproj | 4 +- .../Tango.MachineStudio.UI/Views/LoadingView.xaml | 2 +- .../Tango.MachineStudio.UI/Views/LoginView.xaml | 2 +- .../Tango.MachineStudio.UI/Views/MainView.xaml | 2 +- .../Tango.MachineStudio.UI/Views/ShutdownView.xaml | 2 +- 17 files changed, 159 insertions(+), 33 deletions(-) create mode 100644 Software/Graphics/White-Abstract-wallpaper.jpeg create mode 100644 Software/Graphics/White-Abstract.png create mode 100644 Software/Graphics/circle.svg create mode 100644 Software/Graphics/circle.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/White-Abstract.png (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index f8d930bd3..7bfa73260 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 59a20d106..e78560a39 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Graphics/White-Abstract-wallpaper.jpeg b/Software/Graphics/White-Abstract-wallpaper.jpeg new file mode 100644 index 000000000..f7d4afae9 Binary files /dev/null and b/Software/Graphics/White-Abstract-wallpaper.jpeg differ diff --git a/Software/Graphics/White-Abstract.png b/Software/Graphics/White-Abstract.png new file mode 100644 index 000000000..31bd18c35 Binary files /dev/null and b/Software/Graphics/White-Abstract.png differ diff --git a/Software/Graphics/circle.svg b/Software/Graphics/circle.svg new file mode 100644 index 000000000..b82d2f23f --- /dev/null +++ b/Software/Graphics/circle.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Graphics/circle.xaml b/Software/Graphics/circle.xaml new file mode 100644 index 000000000..4b32992a4 --- /dev/null +++ b/Software/Graphics/circle.xaml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 1d0a52baf..09770e607 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -418,8 +418,6 @@ namespace Tango.MachineStudio.Developer.ViewModels /// public MainViewVM(IMainView view) : base(view, true) { - IsSideBarOpened = true; - if (!this.DesignMode) { Adapter = ObservablesEntitiesAdapter.Instance; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml index 196b20157..22e162c0e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml @@ -21,7 +21,7 @@ xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI" xmlns:local="clr-namespace:Tango.MachineStudio.Developer.Views" mc:Ignorable="d" - d:DesignHeight="1080" d:DesignWidth="1920" Background="White" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> + d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> @@ -1049,16 +1049,16 @@ - - + + - + + + M46.615 402.03c6.549 9.313 13.718 18.176 21.456 26.528l23.472-21.728c-6.767-7.3-13.038-15.045-18.768-23.184 L46.615 402.03z M32.007 254.83c0.178-112.07 83.047-206.811 194.096-221.904l-4.192-31.728C81.787 20.041-16.53 148.91 2.314 289.033 c3.942 29.31 12.932 57.716 26.573 83.957l28.368-14.784C40.563 326.311 31.897 290.828 32.007 254.83z M92.807 452.03c8.765 7.252 17.995 13.923 27.632 19.968l16.976-27.2c-8.448-5.292-16.535-11.139-24.208-17.504 L92.807 452.03z M361.761 21.742c-22.756-10.308-46.898-17.229-71.658-20.544l-4.192 31.728 c122.555 16.88 208.221 129.915 191.341 252.469C462.017 396.001 367.656 478.501 256.007 478.83 c-31.831 0.078-63.306-6.694-92.288-19.856l-13.216 29.152c128.788 58.337 280.484 1.225 338.821-127.563 C547.661 231.775 490.549 80.079 361.761 21.742z + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/White-Abstract.png b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/White-Abstract.png new file mode 100644 index 000000000..31bd18c35 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/White-Abstract.png differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml index 3c6f70e1b..e0f0b1f4f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml @@ -11,6 +11,9 @@ Title="Tango" Height="800" Width="1280" WindowStartupLocation="CenterOwner" WindowState="Maximized" Foreground="#494949" BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}"> + + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj index 5490c2c2b..5a1479c43 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj @@ -322,7 +322,9 @@ - + + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml index 459c8fde8..2478c1155 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml @@ -6,7 +6,7 @@ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Cursor="Wait" DataContext="{Binding LoadingViewVM, Source={StaticResource Locator}}" Background="White"> + d:DesignHeight="720" d:DesignWidth="1280" Cursor="Wait" DataContext="{Binding LoadingViewVM, Source={StaticResource Locator}}" Background="Transparent"> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml index 1531370af..84ba597f2 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml @@ -7,7 +7,7 @@ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" DataContext="{Binding LoginViewVM, Source={StaticResource Locator}}" Background="White"> + d:DesignHeight="720" d:DesignWidth="1280" DataContext="{Binding LoginViewVM, Source={StaticResource Locator}}" Background="Transparent"> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml index 9e3cc337c..7fe900dff 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml @@ -13,7 +13,7 @@ xmlns:db="clr-namespace:Tango.MachineStudio.DB.Views;assembly=Tango.MachineStudio.DB" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1270" Background="White" DataContext="{Binding MainViewVM, Source={StaticResource Locator}}"> + d:DesignHeight="720" d:DesignWidth="1270" Background="Transparent" DataContext="{Binding MainViewVM, Source={StaticResource Locator}}"> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml index 487dfe1f8..dd86238ce 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml @@ -6,7 +6,7 @@ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Cursor="Wait" Background="White" DataContext="{Binding ShutdownViewVM, Source={StaticResource Locator}}"> + d:DesignHeight="720" d:DesignWidth="1280" Cursor="Wait" Background="Transparent" DataContext="{Binding ShutdownViewVM, Source={StaticResource Locator}}"> -- cgit v1.3.1