CA-236104: Do not allow pre and post Ely servers to be selected at the same time when the user browsed for an iso update or supplemental pack.

Changes following code review

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2017-02-28 14:29:59 +00:00
parent 33979bb1f2
commit dab5e3da05

View File

@ -290,7 +290,7 @@ namespace XenAdmin.Wizards.PatchingWizard
var firstCheckedRow = dataGridViewHosts.Rows.Cast<PatchingHostsDataGridViewRow>().FirstOrDefault(row => row.CheckValue > UNCHECKED);
if (firstCheckedRow == null)
return null;
return firstCheckedRow.Tag as Host ?? Helpers.GetMaster(((IXenObject)firstCheckedRow.Tag).Connection);
return firstCheckedRow.Tag as Host ?? Helpers.GetMaster(firstCheckedRow.Tag as Pool);
}
private void disableNotApplicableHosts(PatchingHostsDataGridViewRow row, List<Host> applicableHosts, Host host)
@ -601,7 +601,7 @@ namespace XenAdmin.Wizards.PatchingWizard
{
foreach (PatchingHostsDataGridViewRow row in dataGridViewHosts.Rows)
{
var host = row.IsAHostRow ? row.Tag as Host : Helpers.GetMaster(((IXenObject) row.Tag).Connection);
var host = row.Tag as Host ?? Helpers.GetMaster(row.Tag as Pool);
if (host != null)
EnabledRow(host, SelectedUpdateType, row.Index);
}