}//END getCategoryList method.

        // =====================================================================================
        /// <summary>
        /// This class obtains an array of selection option based on the selection source code and the parameters.
        /// </summary>
        /// <param name="Project">EvProject: (Mandatory) The selection project object</param>
        /// <param name="selectionType">EvReport.SelectionListTypes: (Mandatory) The selection Report QueryType</param>
        /// <param name="ListParameters">string: (Mandatory) The parameter string</param>
        /// <param name="profile">Evado.Digital.Model.EdUserProfile: (Mandatory) the User profile object</param>
        /// <returns>List of EvOption: a list of options</returns>
        /// <remarks>
        /// This method consists of the following steps:
        ///
        /// 1. Switch the selection QueryType and execute the method for retrieving the selection list.
        ///
        /// 2. Return the selection list
        /// </remarks>
        // -------------------------------------------------------------------------------------
        public List <EvOption> getSelectionList(
            EdReport.SelectionListTypes selectionType,
            string ListParameters,
            Evado.Digital.Model.EdUserProfile profile)
        {
            //
            // Initialise the methods variables and objects.
            //
            List <EvOption> returnList = new List <EvOption> ( );

            this.LogMethod("getSelectionList method ");
            this.LogDebug("selectionType: " + selectionType);
            this.LogDebug("ListParameters: " + ListParameters);

            //
            // Select the ResultData source
            //
            switch (selectionType)
            {
            case EdReport.SelectionListTypes.Status:
            {
                this.LogValue("Status source selected.");

                List <EvOption> tempList = new List <EvOption>();

                //Transforming the ArrayList into a list<EvOption>
                foreach (EvOption option in tempList)
                {
                    returnList.Add(option);
                }

                break;
            }

            case EdReport.SelectionListTypes.Record_State:
            {
                this.LogValue("Record source selected.");
                returnList = EdRecord.getRptRecordStates( );
                break;
            }


            case EdReport.SelectionListTypes.LayoutId:
            {
                this.LogValue("Form source selected.");
                EdRecordLayouts formsBll = new EdRecordLayouts(this.ClassParameters);
                returnList = formsBll.getList(EdRecordTypes.Null, EdRecordObjectStates.Form_Issued, false);
                break;
            }
            }//END Switch

            return(returnList);
        }//END getSelectionList method.
        //  ==================================================================================
        /// <summary>
        /// This method get the header form
        /// </summary>
        /// <param name="FormRecord">EvForm: a form object</param>
        /// <returns>EvForm: a form object</returns>
        /// <remarks>
        /// This method consists of the following steps:
        ///
        /// 1. Execute the method for retrieving the form ResultData object.
        ///
        /// 2. Return the form ResultData object.
        /// </remarks>
        //  ----------------------------------------------------------------------------------
        private EdRecord getHeaderForm(EdRecord FormRecord)
        {
            this.LogMethod("getHeaderForm method ");
            //
            // Initialise the mehtods parameters and variables.
            //
            EdRecord form = new EdRecord( );

            this.LogDebug("Forms ");
            EdRecordLayouts forms = new EdRecordLayouts( );

            form = forms.GetLayout(FormRecord.LayoutId);
            return(form);
        }//END getHeaderForm method
Example #3
0
        }//End getRecordItemSelectionList method.

        //  ==================================================================================
        /// <summary>
        /// This class returns a list of Form options objects
        /// </summary>
        /// <param name="TrialId">String: a trial identifier</param>
        /// <returns>List of EvOption: a list of Form options objects</returns>
        /// <remarks>
        /// This method consists of the following steps:
        ///
        /// 1. Execute the method for retrieving the form objects list.
        ///
        /// 2. Loop through the form object list and add object's values to the options list.
        ///
        /// 3. Return the options list.
        /// </remarks>
        //  ----------------------------------------------------------------------------------
        private List <EvOption> GetFormsList(  )
        {
            this._DebugLog.AppendLine("Evado.Digital.Bll.Clinical.EvDataChanges.GetFormsList");
            //
            // Initialise the methods variables.
            //
            EdRecordLayouts forms = new EdRecordLayouts( );
            List <EvOption> list  = new List <EvOption> ( );

            //
            // Add the blank first testReport.
            //
            EvOption option = new EvOption( );

            list.Add(option);

            //
            // Get the form objects list .
            //
            List <EdRecord> view = forms.getLayoutList(EdRecordTypes.Null,
                                                       EdRecordObjectStates.Null);

            this._DebugLog.AppendLine(forms.Log);

            //
            // Iterate through the form objects list.
            //
            foreach (EdRecord form in view)
            {
                option = new EvOption(form.Guid.ToString( ),
                                      form.Title + " (" + form.Design.Version + " " + form.StateDesc + ")");
                list.Add(option);
            }

            return(list);
        }//END GetFormsList method
Example #4
0
        }//END GetTrialAlerts class.

        //  ==================================================================================
        /// <summary>
        /// This class returns a list of form options objects.
        /// </summary>
        /// <returns>List of EvOption: a list of form options objects</returns>
        /// <remarks>
        /// This method consists of the following steps:
        ///
        /// 1. Execute the method for retrieving a list of form objects
        ///
        /// 2. Return the list of form objects.
        /// </remarks>
        //  ----------------------------------------------------------------------------------
        private List <EvOption> GetFormList( )
        {
            EdRecordLayouts forms = new EdRecordLayouts( );

            return(forms.getList(EdRecordTypes.Null, EdRecordObjectStates.Form_Issued, true));
        }//END GetFormList class