diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-01-19 12:17:41 +0200 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-01-19 12:17:41 +0200 |
| commit | dd33d4340a7971a47d782580535ceed0c8e2c4c7 (patch) | |
| tree | 60aa90d7da3bd6543a5ed84bb397c2e3c8ea83be /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs | |
| parent | 6336e42d8a6753cdfef3612e4cb53e1e4bacf2ff (diff) | |
| download | Tango-dd33d4340a7971a47d782580535ceed0c8e2c4c7.tar.gz Tango-dd33d4340a7971a47d782580535ceed0c8e2c4c7.zip | |
MS. RML Extensions. Add RMLExtension object with import/export RML.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs index 686d95ccc..321d4af04 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs @@ -237,7 +237,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels set { _RMLFilter = value; RaisePropertyChangedAuto(); OnFilterChanged(); } } - private async void OnFilterChanged() + public async void OnFilterChanged() { await LoadRmlExtentions(); } @@ -940,7 +940,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels _allUsers.Add(model); } } - + var q = (from c in db.Rmls.Where(x => x.Name.ToLower().Contains(filter)) join p in db.RmlsExtensions on c.Guid equals p.RmlsGuid into ps from p in ps.DefaultIfEmpty() @@ -953,7 +953,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels Manufacturer = x.RML.Manufacturer, Brand = x.RMLExtesion == null ? "" : (Brands.Where(y => y.Guid == x.RMLExtesion.YarnBrandGuid).Select(z => z.Name).FirstOrDefault()), LinearDensity = (int)x.RML.FiberSize, - CreatedBy = x.RMLExtesion == null ? "" : _allUsers.SingleOrDefault(y => y.Guid == x.RMLExtesion.UsersGuid).Name, + CreatedBy = (x.RMLExtesion == null || x.RMLExtesion.UsersGuid == null || null == _allUsers.SingleOrDefault(y => y.Guid == x.RMLExtesion.UsersGuid)) ? "" : _allUsers.SingleOrDefault(y => y.Guid == x.RMLExtesion.UsersGuid).Name, Created = x.RMLExtesion == null ? DateTime.Now : x.RMLExtesion.Created, LastUpdated = x.RMLExtesion == null ? DateTime.Now : x.RMLExtesion.LastUpdated, Status = x.RMLExtesion == null ? RMLExtensionStatus.New : x.RMLExtesion.RMLStatus, |
