/// <summary>
        /// Occurs when trigger presentation (magnifying glass) of the object-valued Argument is triggered.
        /// </summary>
        /// <param name="sender">Sender object.</param>
        /// <param name="e">TriggerEventArgs.</param>
        protected void HandleTriggerExecute(object sender, TriggerEventArgs e)
        {
            // Actualize the context.
            IUContext lContext = null;

            if (Parent != null)
            {
                Parent.UpdateContext();
                lContext = Parent.Context;
            }

            // Initialize class and service name.
            string lClassName     = string.Empty;
            string lContainerName = string.Empty;

            if (IsServiceField)
            {
                IUServiceController lServiceController = Parent as IUServiceController;

                if (lServiceController != null)
                {
                    lClassName     = lServiceController.ClassName;
                    lContainerName = lServiceController.Name;
                }
            }
            else if (IsFilterField)
            {
                IUFilterController lFilterController = Parent as IUFilterController;

                if (lFilterController != null)
                {
                    IUPopulationContext lPopContext = lFilterController.Parent.Context as IUPopulationContext;
                    lClassName     = lPopContext.ClassName;
                    lContainerName = lFilterController.Context.FilterName;
                    lContext       = lPopContext;
                }
            }
            // Create exchange information.
            ExchangeInfoSelectionForward lInfo =
                new ExchangeInfoSelectionForward(
                    Domain,
                    mSelectionScenario,
                    lClassName,
                    lContainerName,
                    Name,
                    MultiSelectionAllowed,
                    IsNavigationalFilter,
                    lContext);

            // Launch scenario.
            ScenarioManager.LaunchSelectionScenario(lInfo, this);
        }
        /// <summary>
        /// Initializes a new instance of the 'IUFilterReportController' class.
        /// </summary>
        /// <param name="filterController">IUFilterController related.</param>
        /// <param name="reportFile">Path of the report file.</param>
        /// <param name="dataSetFile">Path of the associated dataset file.</param>
        /// <param name="printDirectly">Print ot Preview</param>
        public IUFilterReportController(IUFilterController filterController, string reportFile, string dataSetFile, bool printDirectly)
            : base(filterController.Name, filterController.Alias, filterController.IdXML, filterController.DefaultOrderCriteria, filterController.Context, filterController.Parent)
        {
            // Set report properties.
            mReportFile = reportFile;
            mDataSetFile = dataSetFile;
            mPrintDirectly = printDirectly;

            // Set the Population Context.
            mPopulationContext = (filterController.Parent.Context as IUPopulationContext);

            // Assign the filter variables values.
            this.InputFields = filterController.InputFields;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the 'IUFilterReportController' class.
        /// </summary>
        /// <param name="filterController">IUFilterController related.</param>
        /// <param name="reportFile">Path of the report file.</param>
        /// <param name="dataSetFile">Path of the associated dataset file.</param>
        /// <param name="printDirectly">Print ot Preview</param>
        public IUFilterReportController(IUFilterController filterController, string reportFile, string dataSetFile, bool printDirectly)
            : base(filterController.Name, filterController.Alias, filterController.IdXML, filterController.DefaultOrderCriteria, filterController.Context, filterController.Parent)
        {
            // Set report properties.
            mReportFile    = reportFile;
            mDataSetFile   = dataSetFile;
            mPrintDirectly = printDirectly;

            // Set the Population Context.
            mPopulationContext = (filterController.Parent.Context as IUPopulationContext);

            // Assign the filter variables values.
            this.InputFields = filterController.InputFields;
        }
Exemplo n.º 4
0
        /// <summary>
        /// Checks null values and format for the filter variables.
        /// </summary>
        /// <param name="filter">Filter to check.</param>
        /// <returns>If true, the cheking was OK, otherwise, return false.</returns>
        private bool CheckNullAndFormatFilterVariablesValues(IUFilterController filter)
        {
            bool lResult = true;

            object[] lArgs = new object[1];

            // Exit function if filter is null.
            if (filter == null)
            {
                return(false);
            }

            // Control the null - not null allowed for all the filter variables arguments.
            foreach (ArgumentController lFilterVariable in filter.InputFields)
            {
                // Argument data-valued validation.
                ArgumentDVController lFilterVariableDV = lFilterVariable as ArgumentDVController;
                if ((lFilterVariableDV != null) && (lFilterVariableDV.Editor != null))
                {
                    lArgs[0] = lFilterVariable.Alias;
                    lResult  = lResult & lFilterVariableDV.Editor.Validate(CultureManager.TranslateStringWithParams(LanguageConstantKeys.L_VALIDATION_NECESARY, LanguageConstantValues.L_VALIDATION_NECESARY, lArgs));
                }
                // Argument object-valued validation.
                else
                {
                    ArgumentOVController lFilterVariableOV = lFilterVariable as ArgumentOVController;
                    if (lFilterVariableOV != null)
                    {
                        foreach (IEditorPresentation lEditor in lFilterVariableOV.Editors)
                        {
                            if (lEditor != null)
                            {
                                lArgs[0] = lFilterVariable.Alias;
                                // Shows the validation error only for the last editor field.
                                lResult = lResult & lEditor.Validate(CultureManager.TranslateStringWithParams(LanguageConstantKeys.L_VALIDATION_NECESARY, LanguageConstantValues.L_VALIDATION_NECESARY, lArgs));
                            }
                        }
                    }
                }
            }

            return(lResult);
        }
 public ExecuteFilterEventArgs(IUFilterController arguments)
 {
     mArguments = arguments;
 }
        /// <summary>
        /// Checks null values and format for the filter variables.
        /// </summary>
        /// <param name="filter">Filter to check.</param>
        /// <returns>If true, the cheking was OK, otherwise, return false.</returns>
        private bool CheckNullAndFormatFilterVariablesValues(IUFilterController filter)
        {
            bool lResult = true;
            object[] lArgs = new object[1];

            // Exit function if filter is null.
            if (filter == null)
            {
                return false;
            }

            // Control the null - not null allowed for all the filter variables arguments.
            foreach (ArgumentController lFilterVariable in filter.InputFields)
            {
                // Argument data-valued validation.
                ArgumentDVController lFilterVariableDV = lFilterVariable as ArgumentDVController;
                if ((lFilterVariableDV != null) && (lFilterVariableDV.Editor != null))
                {
                    lArgs[0] = lFilterVariable.Alias;
                    lResult = lResult & lFilterVariableDV.Editor.Validate(CultureManager.TranslateStringWithParams(LanguageConstantKeys.L_VALIDATION_NECESARY, LanguageConstantValues.L_VALIDATION_NECESARY, lArgs));
                }
                // Argument object-valued validation.
                else
                {
                    ArgumentOVController lFilterVariableOV = lFilterVariable as ArgumentOVController;
                    if (lFilterVariableOV != null)
                    {
                        foreach (IEditorPresentation lEditor in lFilterVariableOV.Editors)
                        {
                            if (lEditor != null)
                            {
                                lArgs[0] = lFilterVariable.Alias;
                                // Shows the validation error only for the last editor field.
                                lResult = lResult & lEditor.Validate(CultureManager.TranslateStringWithParams(LanguageConstantKeys.L_VALIDATION_NECESARY, LanguageConstantValues.L_VALIDATION_NECESARY, lArgs));
                            }
                        }
                    }
                }
            }

            return lResult;
        }
 public ExecuteFilterEventArgs(IUFilterController arguments)
 {
     mArguments = arguments;
 }