From 7baca4061db66b1c5fde1c200f0d9323ba1be23f Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Wed, 26 Jan 2022 19:29:26 +0200 Subject: Color shade window. GUI. Related Work Items: #5831 --- .../Views/TestResultsView.xaml | 42 ++++++++++++++-------- 1 file changed, 27 insertions(+), 15 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml index 50a2537e1..b8a4b7f28 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml @@ -265,20 +265,16 @@ - - - - Conclusion: - - - - - Comments: - - - - - + + + + + + + + + + @@ -631,7 +627,23 @@ - + + + + + + + + + + + Conclusion: + + + Comments: + + + -- cgit v1.3.1 From bfc9623f1b20c0a17e54bfbcdc59c43104afec78 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Sun, 30 Jan 2022 14:50:12 +0200 Subject: Added Data grid displaying all available recorded files for download. Related Work Items: #5820 --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 22675456 -> 22675456 bytes .../Tango.MachineStudio.ThreadExtensions.csproj | 9 + .../ViewModels/TestResultViewVM.cs | 119 ++++++++++++- .../ViewModels/TestResultsViewVM.cs | 11 +- .../Views/TestResultsView.xaml | 121 +++++++++---- .../packages.config | 2 + .../RMLExtensionTestResultsCollectionBuilder.cs | 10 ++ .../Tango.BL/DTO/RmlExtensionTestResultsFileDTO.cs | 14 ++ .../DTO/RmlExtensionTestResultsFileDTOBase.cs | 49 +++++ .../Entities/RmlExtensionTestResultBase.cs | 38 ++++ .../Entities/RmlExtensionTestResultsFile.cs | 16 ++ .../Entities/RmlExtensionTestResultsFileBase.cs | 182 +++++++++++++++++++ .../Visual_Studio/Tango.BL/ObservablesContext.cs | 8 + .../ObservablesEntitiesAdapterExtension.cs | 38 ++++ .../ObservablesStaticCollectionsExtension.cs | 38 ++++ Software/Visual_Studio/Tango.BL/Tango.BL.csproj | 6 +- .../DB/RML_EXTENSION_TEST_RESULTS.cs | 3 + .../DB/RML_EXTENSION_TEST_RESULTS_FILES.cs | 26 +++ .../Tango.DAL.Remote/DB/RemoteADO.Context.cs | 1 + .../Tango.DAL.Remote/DB/RemoteADO.edmx | 74 ++++++++ .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 197 +++++++++++---------- .../Tango.DAL.Remote/Tango.DAL.Remote.csproj | 5 +- 23 files changed, 822 insertions(+), 145 deletions(-) create mode 100644 Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultsFileDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultsFileDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultsFile.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultsFileBase.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS_FILES.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 0035ae1d8..a4a0facae 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 5ec2e2d21..e542c9bc0 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.ThreadExtensions/Tango.MachineStudio.ThreadExtensions.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Tango.MachineStudio.ThreadExtensions.csproj index 065dec29e..ae05ca02c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Tango.MachineStudio.ThreadExtensions.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Tango.MachineStudio.ThreadExtensions.csproj @@ -53,6 +53,15 @@ ..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll + + ..\..\..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.0\lib\Microsoft.WindowsAPICodePack.dll + + + ..\..\..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.Shell.dll + + + ..\..\..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.ShellExtensions.dll + ..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs index 41be789ed..68a886f99 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs @@ -1,8 +1,11 @@ using Microsoft.Win32; +using Microsoft.WindowsAPICodePack.Dialogs; using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Data.Entity; +using System.Diagnostics; using System.Text; using System.Threading.Tasks; using Tango.BL; @@ -10,6 +13,7 @@ using Tango.BL.ActionLogs; using Tango.BL.DTO; using Tango.BL.Entities; using Tango.BL.Enumerations; +using Tango.BL.ValueObjects; using Tango.Core.Commands; using Tango.MachineStudio.Common.Notifications; using Tango.MachineStudio.ThreadExtensions.Models; @@ -21,9 +25,9 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels { private INotificationProvider _notification; private IActionLogManager _actionLogManager; - + #region Properties - + private string _threadName; /// /// Gets or sets the name of the thread. Using in print @@ -51,7 +55,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels get { return _isSelected; } set { _isSelected = value; RaisePropertyChangedAuto(); } } - + private RmlExtensionTestResult _testResult; public RmlExtensionTestResult TestResult @@ -59,19 +63,124 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels get { return _testResult; } set { _testResult = value; RaisePropertyChangedAuto(); + RaisePropertyChanged(nameof(TestResultsFiles)); } } - - #endregion + public List TestResultsFiles + { + get + { + return TestResult.RmlExtensionTestResultsFiles.ToList(); + } + } + public RelayCommand DeleteCommand { get; set; } + public RelayCommand DownLoadFileCommand { get; set; } + public RelayCommand UploadCommand { get; set; } + public RelayCommand DownLoadAllCommand { get; set; } + #endregion + public TestResultViewVM(INotificationProvider notification, IActionLogManager actionLogManager) { _notification = notification; _actionLogManager = actionLogManager; + + UploadCommand = new RelayCommand(UploadFiles); + DownLoadFileCommand = new RelayCommand(DownLoadFile); + DeleteCommand = new RelayCommand(DeleteFile); + DownLoadAllCommand = new RelayCommand(DownLoadAllFiles); } + + #region TestResultsFiles + private async void UploadFiles(object obj) + { + OpenFileDialog dlg = new OpenFileDialog(); + dlg.Title = "Select data file"; + dlg.Filter = "CSV Files|*.csv"; + dlg.Multiselect = true; + if (dlg.ShowDialog().Value) + { + try + { + var files = dlg.FileNames.ToList(); + + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + var testResult = await db.RmlExtensionTestResults.Where(x => x.Guid == TestResult.Guid).Include(t1 => t1.RmlExtensionTestResultsFiles).FirstOrDefaultAsync(); + foreach (var strpath in files) + { + var testResultfile = new RmlExtensionTestResultsFile(); + testResultfile.FileName = Path.GetFileName(strpath); + //temporary!!! + testResultfile.FilePath = strpath; + + // TestResult.RmlExtensionTestResultsFiles.Add(testResultfile); + testResult.RmlExtensionTestResultsFiles.Add(testResultfile); + } + if (testResult != null) + { + await db.SaveChangesAsync(); + } + TestResult.RmlExtensionTestResultsFiles = testResult.RmlExtensionTestResultsFiles;///????? + RaisePropertyChanged(nameof(TestResultsFiles)); + } + _notification.ShowInfo("File successfully loaded."); + } + catch (Exception ex) + { + _notification.ShowError($"An error occurred while trying to import the file.\n{ex.FlattenMessage()}"); + } + } + + } + + private void DownLoadFile(RmlExtensionTestResultsFile file) + { + SaveFileDialog dlg = new SaveFileDialog(); + dlg.Title = "Save the csv file"; + dlg.Filter = "CSV Files|*.csv"; + dlg.DefaultExt = ".csv"; + dlg.FileName = file.FileName; + if (dlg.ShowDialog().Value) + { + /// + } + } + + private void DownLoadAllFiles() + { + CommonOpenFileDialog dlg = new CommonOpenFileDialog(); + dlg.Title = "Select folder."; + dlg.IsFolderPicker = true; + if (dlg.ShowDialog() == CommonFileDialogResult.Ok) + { + var filesPath = TestResult.RmlExtensionTestResultsFiles.Select( x=>x.FilePath).ToList(); + ///// + } + } + + private async void DeleteFile(RmlExtensionTestResultsFile file) + { + if (_notification.ShowQuestion("Are you sure you want to delete the selected file?")) + { + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + var deletefile = db.RmlExtensionTestResultsFiles.FirstOrDefault(x => x.Guid == file.Guid); + if(deletefile != null) + { + db.RmlExtensionTestResultsFiles.Remove(deletefile); + await db.SaveChangesAsync(); + } + } + TestResult.RmlExtensionTestResultsFiles.Remove(file); + RaisePropertyChanged(nameof(TestResultsFiles)); + } + } + #endregion + } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultsViewVM.cs index c1fb4497f..f639eb6e7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultsViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultsViewVM.cs @@ -1,6 +1,8 @@ -using System; +using Microsoft.Win32; +using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -271,7 +273,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels using (_notification.PushTaskItem("Loading Test Results Parameters ...")) { - var testResults = await new RMLExtensionTestResultsCollectionBuilder(_active_context).SetAll().ForRMLExtension(RMLExtemtionGUID).ForMachine(SelectedMachineGUID).WithRubbingAndTensileResults().BuildAsync(); + var testResults = await new RMLExtensionTestResultsCollectionBuilder(_active_context).SetAll().ForRMLExtension(RMLExtemtionGUID).ForMachine(SelectedMachineGUID).WithRubbingAndTensileResults().WithTestResultsFiles().BuildAsync(); SelectedTestResults = testResults.OrderBy(x => x.ResultIndex).ToSynchronizedObservableCollection(); foreach (var result in SelectedTestResults) { @@ -403,6 +405,8 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels #endregion + #region Excel + public async void LoadTestResultsExcel(List testResultsExcelModelList, string machineGUID, string machineSerialNumber) { try @@ -556,5 +560,8 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels IsFree = true; } } + + #endregion + } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml index b8a4b7f28..f6262b52d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml @@ -158,33 +158,12 @@ - + - - + --> + + @@ -266,17 +245,16 @@ + - - - - - + + + @@ -289,8 +267,8 @@ - - Process Parameters @@ -386,7 +364,7 @@ - + Tension through the thread path @@ -627,7 +605,7 @@ - + @@ -637,16 +615,83 @@ - Conclusion: + Conclusion: - Comments: - + Comments: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/packages.config index da5ed8abc..f9bce0fbf 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/packages.config +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/packages.config @@ -6,6 +6,8 @@ + + diff --git a/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionTestResultsCollectionBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionTestResultsCollectionBuilder.cs index 574439852..2b962d56b 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionTestResultsCollectionBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionTestResultsCollectionBuilder.cs @@ -26,6 +26,16 @@ namespace Tango.BL.Builders } }); } + public virtual RMLExtensionTestResultsCollectionBuilder WithTestResultsFiles() + { + return AddStep(3, () => + { + foreach (var result in Entities.ToList()) + { + Context.RmlExtensionTestResultsFiles.Where(x => x.RmlExtensionTestResultsGuid == result.Guid).OrderBy(x => x.FileName).ToList(); + } + }); + } public virtual RMLExtensionTestResultsCollectionBuilder ForRMLExtension(String rmlExtensionGUID) { return AddQueryStep(0, (query) => diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultsFileDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultsFileDTO.cs new file mode 100644 index 000000000..0e06e750e --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultsFileDTO.cs @@ -0,0 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.DTO +{ + public class RmlExtensionTestResultsFileDTO : RmlExtensionTestResultsFileDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultsFileDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultsFileDTOBase.cs new file mode 100644 index 000000000..f06cdb159 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultsFileDTOBase.cs @@ -0,0 +1,49 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class RmlExtensionTestResultsFileDTOBase : ObservableEntityDTO + { + + /// + /// rml extension test results guid + /// + public String RmlExtensionTestResultsGuid + { + get; set; + } + + /// + /// file name + /// + public String FileName + { + get; set; + } + + /// + /// file path + /// + public String FilePath + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs index 561b311d7..7f6804039 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs @@ -93,6 +93,8 @@ namespace Tango.BL.Entities public event EventHandler MachineChanged; + public event EventHandler> RmlExtensionTestResultsFilesChanged; + public event EventHandler> RubbingResultsChanged; protected String _rmlsextensionsguid; @@ -1046,6 +1048,31 @@ namespace Tango.BL.Entities } } + protected SynchronizedObservableCollection _rmlextensiontestresultsfiles; + + /// + /// Gets or sets the rmlextensiontestresultbase rml extension test results files. + /// + + public virtual SynchronizedObservableCollection RmlExtensionTestResultsFiles + { + get + { + return _rmlextensiontestresultsfiles; + } + + set + { + if (_rmlextensiontestresultsfiles != value) + { + _rmlextensiontestresultsfiles = value; + + OnRmlExtensionTestResultsFilesChanged(value); + + } + } + } + protected SynchronizedObservableCollection _rubbingresults; /// @@ -1368,6 +1395,15 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(Machine)); } + /// + /// Called when the RmlExtensionTestResultsFiles has changed. + /// + protected virtual void OnRmlExtensionTestResultsFilesChanged(SynchronizedObservableCollection rmlextensiontestresultsfiles) + { + RmlExtensionTestResultsFilesChanged?.Invoke(this, rmlextensiontestresultsfiles); + RaisePropertyChanged(nameof(RmlExtensionTestResultsFiles)); + } + /// /// Called when the RubbingResults has changed. /// @@ -1385,6 +1421,8 @@ namespace Tango.BL.Entities TensileResults = new SynchronizedObservableCollection(); + RmlExtensionTestResultsFiles = new SynchronizedObservableCollection(); + RubbingResults = new SynchronizedObservableCollection(); } diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultsFile.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultsFile.cs new file mode 100644 index 000000000..5ae38f7f5 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultsFile.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class RmlExtensionTestResultsFile : RmlExtensionTestResultsFileBase + { + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultsFileBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultsFileBase.cs new file mode 100644 index 000000000..37cc8fd4a --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultsFileBase.cs @@ -0,0 +1,182 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; +using Tango.Core; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("RML_EXTENSION_TEST_RESULTS_FILES")] + public abstract class RmlExtensionTestResultsFileBase : ObservableEntity + { + + public event EventHandler FileNameChanged; + + public event EventHandler FilePathChanged; + + public event EventHandler RmlExtensionTestResultsChanged; + + protected String _rmlextensiontestresultsguid; + + /// + /// Gets or sets the rmlextensiontestresultsfilebase rml extension test results guid. + /// + + [Column("RML_EXTENSION_TEST_RESULTS_GUID")] + [ForeignKey("RmlExtensionTestResults")] + + public String RmlExtensionTestResultsGuid + { + get + { + return _rmlextensiontestresultsguid; + } + + set + { + if (_rmlextensiontestresultsguid != value) + { + _rmlextensiontestresultsguid = value; + + } + } + } + + protected String _filename; + + /// + /// Gets or sets the rmlextensiontestresultsfilebase file name. + /// + + [Column("FILE_NAME")] + + public String FileName + { + get + { + return _filename; + } + + set + { + if (_filename != value) + { + _filename = value; + + OnFileNameChanged(value); + + } + } + } + + protected String _filepath; + + /// + /// Gets or sets the rmlextensiontestresultsfilebase file path. + /// + + [Column("FILE_PATH")] + + public String FilePath + { + get + { + return _filepath; + } + + set + { + if (_filepath != value) + { + _filepath = value; + + OnFilePathChanged(value); + + } + } + } + + protected RmlExtensionTestResult _rmlextensiontestresults; + + /// + /// Gets or sets the rmlextensiontestresultsfilebase rml extension test results. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual RmlExtensionTestResult RmlExtensionTestResults + { + get + { + return _rmlextensiontestresults; + } + + set + { + if (_rmlextensiontestresults != value) + { + _rmlextensiontestresults = value; + + if (RmlExtensionTestResults != null) + { + RmlExtensionTestResultsGuid = RmlExtensionTestResults.Guid; + } + + OnRmlExtensionTestResultsChanged(value); + + } + } + } + + /// + /// Called when the FileName has changed. + /// + protected virtual void OnFileNameChanged(String filename) + { + FileNameChanged?.Invoke(this, filename); + RaisePropertyChanged(nameof(FileName)); + } + + /// + /// Called when the FilePath has changed. + /// + protected virtual void OnFilePathChanged(String filepath) + { + FilePathChanged?.Invoke(this, filepath); + RaisePropertyChanged(nameof(FilePath)); + } + + /// + /// Called when the RmlExtensionTestResults has changed. + /// + protected virtual void OnRmlExtensionTestResultsChanged(RmlExtensionTestResult rmlextensiontestresults) + { + RmlExtensionTestResultsChanged?.Invoke(this, rmlextensiontestresults); + RaisePropertyChanged(nameof(RmlExtensionTestResults)); + } + + /// + /// Initializes a new instance of the class. + /// + public RmlExtensionTestResultsFileBase() : base() + { + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs index 382bb0dca..16e44759b 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs @@ -758,6 +758,14 @@ namespace Tango.BL get; set; } + /// + /// Gets or sets the RmlExtensionTestResultsFiles. + /// + public DbSet RmlExtensionTestResultsFiles + { + get; set; + } + /// /// Gets or sets the Rmls. /// diff --git a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs index a95bbd787..b18a39cb6 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs @@ -3329,6 +3329,42 @@ namespace Tango.BL } + private ObservableCollection _rmlextensiontestresultsfiles; + /// + /// Gets or sets the RmlExtensionTestResultsFiles. + /// + public ObservableCollection RmlExtensionTestResultsFiles + { + get + { + return _rmlextensiontestresultsfiles; + } + + set + { + _rmlextensiontestresultsfiles = value; RaisePropertyChanged(nameof(RmlExtensionTestResultsFiles)); + } + + } + + private ICollectionView _rmlextensiontestresultsfilesViewSource; + /// + /// Gets or sets the RmlExtensionTestResultsFiles View Source. + /// + public ICollectionView RmlExtensionTestResultsFilesViewSource + { + get + { + return _rmlextensiontestresultsfilesViewSource; + } + + set + { + _rmlextensiontestresultsfilesViewSource = value; RaisePropertyChanged(nameof(RmlExtensionTestResultsFilesViewSource)); + } + + } + private ObservableCollection _rmls; /// /// Gets or sets the Rmls. @@ -4383,6 +4419,8 @@ namespace Tango.BL RmlExtensionColorShadesTestsDataViewSource = CreateCollectionView(RmlExtensionColorShadesTestsData); + RmlExtensionTestResultsFilesViewSource = CreateCollectionView(RmlExtensionTestResultsFiles); + RmlsViewSource = CreateCollectionView(Rmls); RmlsSpoolsViewSource = CreateCollectionView(RmlsSpools); diff --git a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs index f4ccd1d88..d5f9c0bb9 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs @@ -3329,6 +3329,42 @@ namespace Tango.BL } + private ObservableCollection _rmlextensiontestresultsfiles; + /// + /// Gets or sets the RmlExtensionTestResultsFiles. + /// + public ObservableCollection RmlExtensionTestResultsFiles + { + get + { + return _rmlextensiontestresultsfiles; + } + + set + { + _rmlextensiontestresultsfiles = value; RaisePropertyChanged(nameof(RmlExtensionTestResultsFiles)); + } + + } + + private ICollectionView _rmlextensiontestresultsfilesViewSource; + /// + /// Gets or sets the RmlExtensionTestResultsFiles View Source. + /// + public ICollectionView RmlExtensionTestResultsFilesViewSource + { + get + { + return _rmlextensiontestresultsfilesViewSource; + } + + set + { + _rmlextensiontestresultsfilesViewSource = value; RaisePropertyChanged(nameof(RmlExtensionTestResultsFilesViewSource)); + } + + } + private ObservableCollection _rmls; /// /// Gets or sets the Rmls. @@ -4383,6 +4419,8 @@ namespace Tango.BL RmlExtensionColorShadesTestsDataViewSource = CreateCollectionView(RmlExtensionColorShadesTestsData); + RmlExtensionTestResultsFilesViewSource = CreateCollectionView(RmlExtensionTestResultsFiles); + RmlsViewSource = CreateCollectionView(Rmls); RmlsSpoolsViewSource = CreateCollectionView(RmlsSpools); diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj index bcc6e303e..76f521843 100644 --- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj +++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj @@ -305,6 +305,8 @@ + + @@ -489,6 +491,8 @@ + + @@ -803,7 +807,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS.cs index b1a5ae94f..c530978d8 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS.cs @@ -18,6 +18,7 @@ namespace Tango.DAL.Remote.DB public RML_EXTENSION_TEST_RESULTS() { this.TENSILE_RESULTS = new HashSet(); + this.RML_EXTENSION_TEST_RESULTS_FILES = new HashSet(); this.RUBBING_RESULTS = new HashSet(); } @@ -62,6 +63,8 @@ namespace Tango.DAL.Remote.DB public virtual ICollection TENSILE_RESULTS { get; set; } public virtual MACHINE MACHINE { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RML_EXTENSION_TEST_RESULTS_FILES { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection RUBBING_RESULTS { get; set; } } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS_FILES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS_FILES.cs new file mode 100644 index 000000000..5d51a4c8a --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS_FILES.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 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 RML_EXTENSION_TEST_RESULTS_FILES + { + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string RML_EXTENSION_TEST_RESULTS_GUID { get; set; } + public string FILE_NAME { get; set; } + public string FILE_PATH { get; set; } + + public virtual RML_EXTENSION_TEST_RESULTS RML_EXTENSION_TEST_RESULTS { 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 c89fc2a1f..17f6c87f0 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs @@ -117,6 +117,7 @@ namespace Tango.DAL.Remote.DB public virtual DbSet RML_EXTENSION_COLOR_SHADES { get; set; } public virtual DbSet RML_EXTENSION_COLOR_SHADES_TESTS { get; set; } public virtual DbSet RML_EXTENSION_COLOR_SHADES_TESTS_DATA { get; set; } + public virtual DbSet RML_EXTENSION_TEST_RESULTS_FILES { get; set; } public virtual DbSet RMLS { get; set; } public virtual DbSet RMLS_SPOOLS { get; set; } public virtual DbSet ROLES { 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 ae70f1ed6..09dded898 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -1219,6 +1219,17 @@ + + + + + + + + + + + @@ -2776,6 +2787,20 @@ + + + + + + + + + + + + + + @@ -3435,6 +3460,7 @@ + @@ -3785,6 +3811,10 @@ + + + + @@ -4123,6 +4153,7 @@ + @@ -4523,6 +4554,10 @@ + + + + @@ -4679,6 +4714,7 @@ + @@ -6333,6 +6369,18 @@ + + + + + + + + + + + + @@ -7983,6 +8031,20 @@ + + + + + + + + + + + + + + @@ -9649,6 +9711,18 @@ + + + + + + + + + + + + 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 a72a68e1f..859ff927d 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,104 +5,105 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 10f151494..da4624d61 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj +++ b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj @@ -324,6 +324,9 @@ RemoteADO.tt + + RemoteADO.tt + RemoteADO.tt @@ -479,7 +482,7 @@ - + \ No newline at end of file -- cgit v1.3.1