}//END saveNewReport class // ===================================================================================== /// <summary> /// This class retrieves a list of report objects based on RecordTypeId and category /// </summary> /// <param name="TrialId">string: (Mandatory) The trial identifier</param> /// <param name="ReportTypeId">EvReport.ReportTypeCode: a report QueryType identifier</param> /// <param name="Category">string: A report category</param> /// <returns>List of EvReport: a list of report objects</returns> /// <remarks> /// This method consists of the following steps: /// /// 1. Execute the method for retrieving a list of Report objects /// /// 2. Return a list of Report objects /// </remarks> // ------------------------------------------------------------------------------------- public List <EdReport> getView(string TrialId, EdReport.ReportTypeCode ReportTypeId, string Category) { this.LogMethod("getView method."); List <EdReport> view = this._dalReportSaved.getView(TrialId, ReportTypeId, Category); this.LogClass(this._dalReportSaved.Log); return(view); } //EMD getMilestoneList method.
// ===================================================================================== /// <summary> /// This method retrieves a list of report templates filtered by trial Id, Report QueryType, /// report category. /// </summary> /// <param name="ProjectId">string: (Mandatory) The selection trial identifier</param> /// <param name="ReportType">EvReport.ReportTypeCode: (Mandatory) The selection Report QueryType identifier</param> /// <param name="Category">string: (Optional) The selection category</param> /// <returns>List of EvReport: a list of report objects</returns> /// <remarks> /// This method consists of the following steps: /// /// 1. Execute the method for retrieving a list of report objects /// /// 2. Return a list of report objects. /// </remarks> // ------------------------------------------------------------------------------------- public List <EdReport> getReportList( EdReport.ReportTypeCode ReportType, string Category) { this._DebugLog = new System.Text.StringBuilder( ); this.LogMethod("getReportList method "); List <EdReport> view = this._dalReportTemplates.getReportList( ReportType, EdReport.ReportScopeTypes.Null, Category, false); this.LogClass(this._dalReportTemplates.Log); return(view); }//END getMilestoneList method.
}//END getMilestoneList method. // ===================================================================================== /// <summary> /// This class retrieves all of the Report templates no matter the scope. /// </summary> /// <param name="ProjectId">string: (Mandatory) The selection trial identifier</param> /// <param name="ReportTypeId">EvReport.ReportTypeCode: (Mandatory) The selection Report QueryType identifier</param> /// <param name="Category">string: (Optional) The selection category</param> /// <returns>List of EvReport: a list of report objects</returns> /// <remarks> /// This method consists of the following steps: /// /// 1. Execute the method for retrieving a list of report objects /// /// 2. Return a list of report objects. /// </remarks> // ------------------------------------------------------------------------------------- public List <EdReport> getAllReportList( EdReport.ReportTypeCode ReportTypeId, String Category) { this._DebugLog = new System.Text.StringBuilder( ); this.LogMethod("getAllReportList method "); List <EdReport> reportList = this._dalReportTemplates.getReportList( ReportTypeId, EdReport.ReportScopeTypes.Null, Category, false); this.LogClass(this._dalReportTemplates.Log); return(reportList); }//END getAllView method.
// ===================================================================================== /// <summary> /// This class retrieves the list of reports based on the scope. /// </summary> /// <param name="ProjectId">string: (Mandatory) The selection trial identifier</param> /// <param name="ReportTypeId">EvReport.ReportTypeCode: (Mandatory) The selection Report QueryType identifier</param> /// <param name="Category">string: (Optional) The selection category</param> /// <param name="ReportScope">EvReport.ReportScopeTypes: a report scope</param> /// <returns>List of EvReport: a list of report objects</returns> /// <remarks> /// This method consists of the following steps: /// /// 1. Execute the method for retrieving a list of report objects /// /// 2. Return a list of report objects. /// </remarks> // ------------------------------------------------------------------------------------- public List <EdReport> getReportList( EdReport.ReportTypeCode ReportTypeId, String Category, EdReport.ReportScopeTypes ReportScope) { this._DebugLog = new System.Text.StringBuilder( ); this.LogMethod("getReportList method "); this.LogDebug("ReportTypeId: " + ReportTypeId); this.LogDebug("Category: " + Category); this.LogDebug("ReportScope: " + ReportScope); List <EdReport> view = this._dalReportTemplates.getReportList( ReportTypeId, ReportScope, Category, false); this.LogClass(this._dalReportTemplates.Log); return(view); }
}// End readRow method. #endregion #region Database selectionList query methods // ===================================================================================== /// <summary> /// This class returns a list of Reports based on the TrialId, RecordTypeId and Category value. /// </summary> /// <param name="ProjectId">string: (Mandatory) The Project identifier</param> /// <param name="ReportTypeId">EvReport.ReportTypeCode: The Report Type Identifier</param> /// <param name="Category">EvReport.ReportTypeCode: The Report's category</param> /// <returns>List of EvReport: A list of Report data objects.</returns> /// <remarks> /// This method consists of the following steps: /// /// 1. Define the sql query parameters and sql query string /// /// 2. Execute the sql query string and store the results on data table. /// /// 3. Loop through the table and extract the row data to the Report object. /// /// 4. Add the Report object value to the Report list. /// /// 5. Return the report list. /// </remarks> // ------------------------------------------------------------------------------------- public List <EdReport> getView(string ProjectId, EdReport.ReportTypeCode ReportTypeId, string Category) { this.LogMethod("getView. "); this.LogDebug("Projectid: " + ProjectId); this.LogDebug("ReportTypeId: " + ReportTypeId); this.LogDebug("Category: " + Category); // // Define the local variables // string _sqlQueryString; List <EdReport> view = new List <EdReport> ( ); // // Define the SQL query parameters and load the query values. // SqlParameter [] cmdParms = new SqlParameter [] { new SqlParameter(_parmTrialId, SqlDbType.NVarChar, 10), new SqlParameter(_parmReportTypeId, SqlDbType.SmallInt), new SqlParameter(_parmCategory, SqlDbType.NVarChar, 100), }; cmdParms [0].Value = ProjectId; cmdParms [1].Value = ReportTypeId; cmdParms [2].Value = Category; // // Generate the SQL query string // _sqlQueryString = _sqlQuery_View + "WHERE (TrialId = @TrialId) "; if (ReportTypeId != EdReport.ReportTypeCode.Null) { _sqlQueryString += " AND (RS_ReportTypeId = @ReportTypeId ) "; } if (Category != String.Empty) { _sqlQueryString += " AND (RS_Category = @Category ) "; } _sqlQueryString += " ORDER BY ReportId, RS_ReportNo; "; this.LogDebug(_sqlQueryString); // // Execute the query against the database // using (DataTable table = EvSqlMethods.RunQuery(_sqlQueryString, cmdParms)) { // // Iterate through the results extracting the Report information. // for (int Count = 0; Count < table.Rows.Count; Count++) { // // Extract the table row // DataRow row = table.Rows [Count]; EdReport Report = this.readRow(row); view.Add(Report); } } this.LogDebug("view Count: " + view.Count); // // Return the ArrayList containing the Report data object. // this.LogMethodEnd("getView."); return(view); } // Close getView method.