Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //OLD VERSION
- var GUIs;
- var VMs;
- if (activeIsSelected) {
- GUIs = (from g in db.GUILicenseGrants
- where g.Grant_History.Job_ID == VMJob.ID
- && g.Grant_History.Hardware_Assoc != null
- select g).ToList();
- VMs = (from n in db.NodeLicenseGrants
- where n.Grant_History.Job_ID == VMJob.ID
- && n.Grant_History.Hardware_Assoc != null
- select n).ToList();
- }
- else {
- GUIs = (from g in db.GUILicenseGrants
- where g.Grant_History.Job_ID == VMJob.ID
- && g.Grant_History.Hardware_Assoc == null
- select g).ToList();
- VMs = (from n in db.NodeLicenseGrants
- where n.Grant_History.Job_ID == VMJob.ID
- && n.Grant_History.Hardware_Assoc == null
- select n).ToList();
- }
- //NEW VERSION
- var GUIs = (from g in db.GUILicenseGrants
- where g.Grant_History.Job_ID == VMJob.ID
- && !(activeIsSelected ^ g.Grant_History.Hardware_Assoc != null)
- select g).ToList();
- var VMs = (from n in db.NodeLicenseGrants
- where n.Grant_History.Job_ID == VMJob.ID
- && !(activeIsSelected ^ n.Grant_History.Hardware_Assoc != null)
- select n).ToList();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement