From 5e68543fd93e441e1e76acc3f439594f66c4412a Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 18 Jan 2018 16:20:02 +0200 Subject: Removed Deleted from most of DB Tables !!!!!!!!!!! --- .../Views/MainView.xaml | 35 +++++++++++++++++----- 1 file changed, 27 insertions(+), 8 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 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 @@ - + + + + + + + + -- 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