/// <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;
 }
    /// <summary>
    /// Gets the state of the select.
    /// </summary>
    /// <returns></returns>
    private IDictionary <string, bool> GetSelectState()
    {
        IDictionary <string, bool> selectState;

        selectState = (IDictionary <string, bool>)ContextService.GetContext("CT_SELECT_STATE");
        if (selectState == null)
        {
            selectState = new Dictionary <string, bool>();
        }
        LoadClientSelects(selectState);
        ContextService.SetContext("CT_SELECT_STATE", selectState);
        return(selectState);
    }
Exemplo n.º 3
0
 /// <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)
 {
     ScriptManager.GetCurrent(Page).Scripts.Add(new ScriptReference("~/SmartParts/Campaign/TargetResponses_ClientScript.js"));
     if (ContextService != null)
     {
         _State = ContextService.GetContext("ResponseFilterStateInfo") as ResponseFilterStateInfo;
         if (_State == null)
         {
             _State = new ResponseFilterStateInfo();
             AssignLeadSourceList();
             PopulateResponseMethods();
             AddDistinctStageItemsToList();
         }
         else
         {
             lbxLeadSource.SelectedIndex = _State.leadSourceFilter;
             lbxMethods.SelectedIndex    = _State.methodFilter;
             lbxStage.SelectedIndex      = _State.stageFilter;
             txtName.Text = _State.nameFilter;
         }
     }
 }