/// <summary>
        ///  Initializes the IU instance controller.
        /// </summary>
        public void Initialize()
        {
            if (FinalNodeQueryController != null)
            {
                FinalNodeQueryController.Initialize();
            }

            if (Action != null)
            {
                Action.Initialize();
            }

            if (Navigation != null)
            {
                Navigation.Initialize();
            }

            InternalFilters.Initialize();

            foreach (TreeNodeController subNode in SubNodes)
            {
                if (!subNode.NodeId.Equals(FinalNodeID))
                {
                    subNode.Tree = Tree;
                    subNode.Initialize();
                }
            }
        }
示例#2
0
        /// <summary>
        /// Updates the context values from the InteractionToolkit layer.
        /// </summary>
        public override void UpdateContext()
        {
            InternalFilters.UpdateContext();

            // Order criteria selected.
            OrderCriteriaController lOrderCriteriaSelected = OrderCriteriaSelected;

            if (lOrderCriteriaSelected != null)
            {
                Context.OrderCriteriaNameSelected = OrderCriteriaSelected.Name;
            }
            else
            {
                Context.OrderCriteriaNameSelected = string.Empty;
            }

            if (string.IsNullOrEmpty(Context.OrderCriteriaNameSelected) && (Filters.Exist(Context.ExecutedFilter)))
            {
                Context.OrderCriteriaNameSelected = Filters[Context.ExecutedFilter].DefaultOrderCriteria;
            }

            base.UpdateContext();
        }
示例#3
0
        /// <summary>
        /// Initializes the IUPopulation.
        /// </summary>
        public override void Initialize()
        {
            // Configure the  IUPopulation.
            if (OkTrigger != null)
            {
                if (Context.ExchangeInformation.ExchangeType == ExchangeType.SelectionForward)
                {
                    OkTrigger.Visible = true;
                }
                else
                {
                    OkTrigger.Visible = false;
                }
            }

            if (mOrderCriterias.Values.Count > 0)
            {
                IList <KeyValuePair <object, string> > lOrderCriterias = new List <KeyValuePair <object, string> >();

                // To add text value depending on there is preferential Order Criteria in the filter or not
                if (CheckPreferentialOrderCriteriaDefined())
                {
                    lOrderCriterias.Add(new KeyValuePair <object, string>(string.Empty, CultureManager.TranslateString(LanguageConstantKeys.L_FILTERDEFINED, LanguageConstantValues.L_FILTERDEFINED)));
                }
                else
                {
                    lOrderCriterias.Add(new KeyValuePair <object, string>(string.Empty, CultureManager.TranslateString(LanguageConstantKeys.L_NONE, LanguageConstantValues.L_NONE)));
                }
                OrderCriteriaController lOrderCriteriaControllerLast = null;
                foreach (OrderCriteriaController lOrderCriteriaController in mOrderCriterias.Values)
                {
                    string lTranlatedString = CultureManager.TranslateString(lOrderCriteriaController.IdXML, lOrderCriteriaController.Alias, lOrderCriteriaController.Alias);
                    lOrderCriterias.Add(new KeyValuePair <object, string>(lOrderCriteriaController.Name, lTranlatedString));
                    if ((lOrderCriteriaController.Selector as ISelectorPresentation) != null)
                    {
                        lOrderCriteriaControllerLast = lOrderCriteriaController;
                    }
                }
                if ((lOrderCriteriaControllerLast.Selector as ISelectorPresentation) != null)
                {
                    (lOrderCriteriaControllerLast.Selector as ISelectorPresentation).Items        = lOrderCriterias;
                    (lOrderCriteriaControllerLast.Selector as ISelectorPresentation).SelectedItem = 0;
                }
            }

            // Set Default order criteria
            if (ExchangeInformation.DefaultOrderCriteria != "")
            {
                if (mOrderCriterias.Values.Count > 0)
                {
                    foreach (OrderCriteriaController lOrderCriteria in OrderCriterias.Values)
                    {
                        if (lOrderCriteria.Name.Equals(ExchangeInformation.DefaultOrderCriteria, StringComparison.InvariantCultureIgnoreCase))
                        {
                            OrderCriteriaSelected = lOrderCriteria;
                            break;
                        }
                    }
                }
                else
                {
                    Context.OrderCriteriaNameSelected = ExchangeInformation.DefaultOrderCriteria;
                }
            }

            // Initialize filters default values.
            InternalFilters.Initialize();


            // Enabled the associated clear trigger
            if (AssociatedServiceClearTrigger != null)
            {
                AssociatedServiceClearTrigger.Visible = true;
            }

            base.Initialize();
        }