aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2020-05-31 09:12:37 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2020-05-31 09:12:37 +0300
commit96bb8c83a824dfd1dbe12605a55f5549e554ea2b (patch)
tree36f97f008bdcbbc53694aa97426fcf3532f7d86d /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner
parentcac844b87b7a9917fc14548cbcc0beade734c873 (diff)
downloadTango-96bb8c83a824dfd1dbe12605a55f5549e554ea2b.tar.gz
Tango-96bb8c83a824dfd1dbe12605a55f5549e554ea2b.zip
Changed query "give all the sites where the organization equals to the machine's organization"
Related Work Items: #2872
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
index d52daaea2..c4850deb8 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
@@ -615,7 +615,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
_all_sites = await ActiveMachineAdapter.Context.Sites.ToListAsync();
- Sites = ActiveMachine.Organization != null ? _all_sites.Where(x => ActiveMachine.Organization.Sites.All(y => y.OrganizationGuid == x.OrganizationGuid)).ToList() : new List<Site>() ;
+ Sites = ActiveMachine.Organization != null ? _all_sites.Where(x => x.OrganizationGuid == ActiveMachine.OrganizationGuid).ToList() : new List<Site>() ;
Sites.Insert(0, new Site() { Name = "NONE", ID = -1 });
SelectedSite = Sites.SingleOrDefault(x => x.Guid == ActiveMachine.SiteGuid);
@@ -1004,7 +1004,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
private void ActiveMachine_OrganizationChanged(object sender, Organization e)
{
- var sites = ActiveMachine.Organization != null ? _all_sites.Where(x => ActiveMachine.Organization.Sites.All(y => y.OrganizationGuid == x.OrganizationGuid)).ToList() : new List<Site>();
+ var sites = ActiveMachine.Organization != null ? _all_sites.Where(x => x.OrganizationGuid == ActiveMachine.OrganizationGuid).ToList() : new List<Site>();
sites.Insert(0, new Site() { Name = "NONE", ID = -1 });
Sites = sites;
SelectedSite = Sites.SingleOrDefault(x => x.Guid == ActiveMachine.SiteGuid);