コード例 #1
0
 /// <summary>
 /// Adds an OrderCriteria to the IUPopulation.
 /// </summary>
 /// <param name="orderCriteriaController">OrderCriteria to add.</param>
 public void AddOrderCriteria(OrderCriteriaController orderCriteriaController)
 {
     if (orderCriteriaController != null)
     {
         OrderCriterias.Add(orderCriteriaController.Name, orderCriteriaController);
     }
     orderCriteriaController.ValueChanged += new EventHandler <OrderCriteriaChangedEventArgs>(HandleOrderCriteriaValueChanged);
 }
コード例 #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>
 /// Adds an OrderCriteria to the IUPopulation.
 /// </summary>
 /// <param name="orderCriteriaController">OrderCriteria to add.</param>
 public void AddOrderCriteria(OrderCriteriaController orderCriteriaController)
 {
     if (orderCriteriaController != null)
     {
         OrderCriterias.Add(orderCriteriaController.Name, orderCriteriaController);
     }
     orderCriteriaController.ValueChanged += new EventHandler<OrderCriteriaChangedEventArgs>(HandleOrderCriteriaValueChanged);
 }
コード例 #4
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();
        }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the 'ArgumentOVPreloadController' class.
 /// </summary>
 /// <param name="name">Name of the object-valued Argument.</param>
 /// <param name="alias">Alias of the object-valued Argument.</param>
 /// <param name="idxml">IdXML of the object-valued Argument.</param>
 /// <param name="domain">Domain or class name of the object-valued Argument.</param>
 /// <param name="nullAllowed">Indicates whether the object-valued Argument allows null values.</param>
 /// <param name="multipleSelectionAllowed">Indicates whether the object-valued Argument allows multiple values.</param>
 /// <param name="editor">DisplaySet.</param>
 /// <param name="orderCriteria">Order criteria.</param>
 /// <param name="parent">Parent controller.</param>
 public ArgumentOVPreloadController(string name, string alias, string idxml, string domain, bool nullAllowed, bool multipleSelectionAllowed, DisplaySetController editor, OrderCriteriaController orderCriteria, IUController parent)
     : base(name, alias, idxml, domain, nullAllowed, multipleSelectionAllowed, parent)
 {
     Editor = editor;
     mOrderCriteria = orderCriteria;
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the 'ArgumentOVPreloadController' class.
 /// </summary>
 /// <param name="name">Name of the object-valued Argument.</param>
 /// <param name="alias">Alias of the object-valued Argument.</param>
 /// <param name="idxml">IdXML of the object-valued Argument.</param>
 /// <param name="domain">Domain or class name of the object-valued Argument.</param>
 /// <param name="nullAllowed">Indicates whether the object-valued Argument allows null values.</param>
 /// <param name="multipleSelectionAllowed">Indicates whether the object-valued Argument allows multiple values.</param>
 /// <param name="editor">DisplaySet.</param>
 /// <param name="orderCriteria">Order criteria.</param>
 /// <param name="parent">Parent controller.</param>
 public ArgumentOVPreloadController(string name, string alias, string idxml, string domain, bool nullAllowed, bool multipleSelectionAllowed, DisplaySetController editor, OrderCriteriaController orderCriteria, IUController parent)
     : base(name, alias, idxml, domain, nullAllowed, multipleSelectionAllowed, parent)
 {
     Editor         = editor;
     mOrderCriteria = orderCriteria;
 }