protected void Page_Load(object sender, EventArgs e) { if (this.CurrentProfile == null) { Navigator.RedirectToDefaultPage(this.Response); } if (_exception != null) { UIHelper.SetMessage(MessageImage, MessageLabel, MessageType.Error, _exception.Message); return; } if (!this.IsPostBack) { BindInfrastructure(); SetPageState(INFRASTUCTURE_PAGE_STATE); UIHelper.SetMessage(MessageImage, MessageLabel, MessageType.Warning, MESSAGE_01); this.PlatformStackName = null; InitFilters(); } else // if (this.IsPostBack) { if (StacksRadioButtonList.SelectedIndex >= 0) { this.PlatformStackName = StacksRadioButtonList.SelectedValue; } } }
protected void Page_Load(object sender, EventArgs e) { if (this.CurrentProfile == null) { Navigator.RedirectToDefaultPage(this.Response); } if (_exception != null) { UIHelper.SetMessage(MessageImage, MessageLabel, MessageType.Error, _exception.Message); return; } if (!this.IsPostBack) { ITICLabel.Text = this.CurrentProfile.ITICCode.Code; InfrastructureLabel.Text = this.CurrentProfile.ITICCode.Infrastructure.Name; CapabilityLabel.Text = this.CurrentProfile.ITICCode.Capability.Name; LogicalSystemGroupLabel.Text = this.CurrentProfile.ITICCode.LogicalSystemGroup.Name; FilenameLabel.Text = this.CurrentProfile.Context.Name; ImagesRepeater.DataSource = _items; StacksRadioButtonList.DataSource = _items; StacksRadioButtonList.DataTextField = "Code"; StacksRadioButtonList.DataValueField = "Code"; DataBind(); StacksRadioButtonList.SelectedIndex = GetIndex(this.CurrentProfile.ActiveProvisioningPlan.PlatformStack.Code); UIHelper.SetMessage(MessageImage, MessageLabel, MessageType.None, null); } }
protected void Page_Load(object sender, EventArgs e) { if (this.CurrentProfile == null) { Navigator.RedirectToDefaultPage(this.Response); } if (!this.IsPostBack) { // Init Controls ITICLabel.Text = this.CurrentProfile.ITICCode.Code; InfrastructureLabel.Text = this.CurrentProfile.ITICCode.Infrastructure.Name; CapabilityLabel.Text = this.CurrentProfile.ITICCode.Capability.Name; LogicalSystemGroupLabel.Text = this.CurrentProfile.ITICCode.LogicalSystemGroup.Name; FilenameLabel.Text = this.CurrentProfile.Context.Name; // Update Stacks & Scans & Workflows foreach (string item in this.CurrentProfile.ActiveProvisioningPlan.CustomStacks) { StacksListBox.Items.Add( new ListItem(item)); } foreach (string item in this.CurrentProfile.ActiveProvisioningPlan.CustomScans) { ScansListBox.Items.Add( new ListItem(item)); } // Set initial State UIHelper.SetMessage(MessageImage, MessageLabel, MessageType.None, null); } }
protected void Page_Load(object sender, EventArgs e) { if (this.CurrentProfile == null) { Navigator.RedirectToDefaultPage(this.Response); } if (_exception != null) { UIHelper.SetMessage(MessageImage, MessageLabel, MessageType.Error, _exception.Message); return; } if (!this.IsPostBack) { // Init Controls ITICLabel.Text = this.CurrentProfile.ITICCode.Code; InfrastructureLabel.Text = this.CurrentProfile.ITICCode.Infrastructure.Name; CapabilityLabel.Text = this.CurrentProfile.ITICCode.Capability.Name; LogicalSystemGroupLabel.Text = this.CurrentProfile.ITICCode.LogicalSystemGroup.Name; FilenameLabel.Text = this.CurrentProfile.Context.Name; // Bindings WorkflowsRepeater.DataSource = _items; WorkflowsRepeater.DataBind(); // Check CheckBoxes foreach (RepeaterItem item in WorkflowsRepeater.Items) { string code = item.Controls.OfType <HiddenField>().First().Value; PlanActionLookup lookup = this.CurrentProfile.ActiveProvisioningPlan.AdvancedConfigurationActions.FirstOrDefault((a) => a.Code == code); if (lookup != null) { if (lookup.IsTextBox) { item.Controls.OfType <TextBox>().First().Text = lookup.Value; item.Controls.OfType <CheckBox>().First().Checked = true; } else // if(lookup.IsCheckBox) { item.Controls.OfType <CheckBox>().First().Checked = lookup.IsSelected; } } } // Set initial State UIHelper.SetMessage(MessageImage, MessageLabel, MessageType.None, null); } }
protected void Page_Load(object sender, EventArgs e) { if (this.CurrentProfile == null) { Navigator.RedirectToDefaultPage(this.Response); } if (!this.IsPostBack) { // Init Controls ITICLabel.Text = this.CurrentProfile.ITICCode.Code; InfrastructureLabel.Text = this.CurrentProfile.ITICCode.Infrastructure.Name; CapabilityLabel.Text = this.CurrentProfile.ITICCode.Capability.Name; LogicalSystemGroupLabel.Text = this.CurrentProfile.ITICCode.LogicalSystemGroup.Name; FilenameLabel.Text = this.CurrentProfile.Context.Name; // Check CheckBoxes if (this.CurrentProfile.LocalProperties.Count == 0) { OptionsRadioButtonList.SelectedIndex = 0; LocalPropertiesContext.Initialize(this.Session); } else if (this.CurrentProfile.LocalProperties.Count > 0 && this.CurrentProfile.LocalProperties.All((lp) => String.IsNullOrWhiteSpace(lp.DatacentreSuffix))) { OptionsRadioButtonList.SelectedIndex = 1; LocalPropertiesContext.Initialize(this.Session); } else { OptionsRadioButtonList.SelectedIndex = 2; if (this.CurrentProfile.LocalProperties.Count == 0) { this.CurrentProfile.LocalProperties = LocalPropertiesContext.Load(); } LocalPropertiesContext.Initialize(this.Session, this.CurrentProfile.LocalProperties); } SetState(); // Set initial State UIHelper.SetMessage(MessageImage, MessageLabel, MessageType.None, null); } }
protected void Page_Load(object sender, EventArgs e) { if (this.CurrentProfile == null) { Navigator.RedirectToDefaultPage(this.Response); } if (!this.IsPostBack) { ITICLabel.Text = this.CurrentProfile.ITICCode.Code; InfrastructureLabel.Text = this.CurrentProfile.ITICCode.Infrastructure.Name; CapabilityLabel.Text = this.CurrentProfile.ITICCode.Capability.Name; LogicalSystemGroupLabel.Text = this.CurrentProfile.ITICCode.LogicalSystemGroup.Name; ProfileNameLabel.Text = this.CurrentProfile.Context.Name; AdvancedPlanPropertiesRepeater.DataSource = this.CurrentProfile.ActiveProvisioningPlan.Properties; AdvancedPlanPropertiesRepeater.DataBind(); } UIHelper.SetMessage(MessageImage, MessageLabel, MessageType.None, null); }
protected void Page_Load(object sender, EventArgs e) { if (this.CurrentProfile == null) { Navigator.RedirectToDefaultPage(this.Response); } if (!this.IsPostBack) { this.CurrentProfile.ActiveProvisioningPlan.PopulatePlanActions(); BindProvisioningPlan(); ITICLabel.Text = this.CurrentProfile.ITICCode.Code; InfrastructureLabel.Text = this.CurrentProfile.ITICCode.Infrastructure.Name; CapabilityLabel.Text = this.CurrentProfile.ITICCode.Capability.Name; LogicalSystemGroupLabel.Text = this.CurrentProfile.ITICCode.LogicalSystemGroup.Name; ProfileNameLabel.Text = this.CurrentProfile.Context.Name; FilenameLabel.Text = this.CurrentProfile.FileName; VersionTextBox.Text = this.CurrentProfile.Context.ProfileVersion; } UIHelper.SetMessage(MessageImage, MessageLabel, MessageType.None, null); }
protected void Page_Load(object sender, EventArgs e) { if (this.CurrentProfile == null) { Navigator.RedirectToDefaultPage(this.Response); } if (_exception != null) { UIHelper.SetMessage(MessageImage, MessageLabel, MessageType.Error, _exception.Message); return; } if (!IsPostBack) { // Init Controls ITICLabel.Text = this.CurrentProfile.ITICCode.Code; InfrastructureLabel.Text = this.CurrentProfile.ITICCode.Infrastructure.Name; CapabilityLabel.Text = this.CurrentProfile.ITICCode.Capability.Name; LogicalSystemGroupLabel.Text = this.CurrentProfile.ITICCode.LogicalSystemGroup.Name; FilenameLabel.Text = this.CurrentProfile.Context.Name; // Bindings InitailWorkflowsRepeater.DataSource = _initialWorkflows; CommonPlanActionsRepeater.DataSource = _commonPlanActions; FinalWorkflowsRepeater.DataSource = _finalWorkflows; DataBind(); // Check CheckBoxes UpdateCheckBoxList(InitialWorkflowsCheckBoxes, this.CurrentProfile.ActiveProvisioningPlan.InitialWorkflows); UpdateCheckBoxList(CommonPlanActionsCheckBoxes, this.CurrentProfile.ActiveProvisioningPlan.CommonPlanActions); UpdateCheckBoxList(FinalWorkflowsCheckBoxes, this.CurrentProfile.ActiveProvisioningPlan.FinalWorkflows); // Set initial State UIHelper.SetMessage(MessageImage, MessageLabel, MessageType.None, null); } }
protected void Page_Load(object sender, EventArgs e) { if (this.CurrentProfile == null) { Navigator.RedirectToDefaultPage(this.Response); } if (_exception != null) { UIHelper.SetMessage(MessageImage, MessageLabel, MessageType.Error, _exception.Message); return; } if (!IsPostBack) { // Init Controls ITICLabel.Text = this.CurrentProfile.ITICCode.Code; InfrastructureLabel.Text = this.CurrentProfile.ITICCode.Infrastructure.Name; CapabilityLabel.Text = this.CurrentProfile.ITICCode.Capability.Name; LogicalSystemGroupLabel.Text = this.CurrentProfile.ITICCode.LogicalSystemGroup.Name; FilenameLabel.Text = this.CurrentProfile.Context.Name; // Bindings BindCoarseFilter(); StacksRepeater.DataSource = _hierarchy.Stacks; DataBind(); // Check CheckBoxes foreach (CheckBox checkBox in this.StackCheckBoxes) { checkBox.Checked = this.CurrentProfile.ActiveProvisioningPlan.ApplicationStacks.Any((s) => s.Name == checkBox.Text); } // Set initial State this.PageState = COARSE_FILTER_PAGE_STATE; SetPageState(COARSE_FILTER_PAGE_STATE); UIHelper.SetMessage(MessageImage, MessageLabel, MessageType.Warning, MESSAGE_03); } else { // Update Profile Act( (checkBox, stack) => { if (checkBox.Checked) { // add if (stack == null) { stack = _hierarchy.Stacks.First((s) => s.Name == checkBox.Text); this.CurrentProfile.ActiveProvisioningPlan.ApplicationStacks.Add(stack); } } else // if (!checkBox.Checked) { // delete if (stack != null) { this.CurrentProfile.ActiveProvisioningPlan.ApplicationStacks.Remove(stack); } } }); // Rebuid CheckBoxes FilterLookup majorFilter = _hierarchy.FindMajorFilterByCode(CoarseFilterDropDownList.SelectedItem.Value); FilterLookup minorFilter = _hierarchy.FindMinorFilterByCode(FineFilterDropDownList.SelectedItem.Value); StacksRepeater.DataSource = RunThrough(_hierarchy.Stacks, majorFilter, minorFilter).ToList <Stack>(); DataBind(); } }
protected void GoHomeButton_Click(object sender, EventArgs e) { Navigator.RedirectToDefaultPage(this.Response); }