/// <summary> /// Handles the Init event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void Page_Init(object sender, EventArgs e) { if (!Visible) { return; } if (ContextService.HasContext("AddFilterStateInfo")) { _State = ContextService.GetContext("AddFilterStateInfo") as AddFilterStateInfo; } if (_State == null) { _State = new AddFilterStateInfo { EntityID = EntityContext.EntityID.ToString() }; AddDistinctGroupItemsToList(); AddDistinctStageItemsToList(); } PopulateListBoxControl(lbxPriority, "Lead Priority"); PopulateListBoxControl(lbxStatus, "Target Status"); lbxGroups.SelectedIndex = _State.groupFilter; lbxPriority.SelectedIndex = _State.priorityFilter; lbxStages.SelectedIndex = _State.stageFilter; lbxStatus.SelectedIndex = _State.statusFilter; }