C2025-043 Admin Tool - Data Check - Tool to identify and report RO's that are not used in any of the PROMS data.
This commit is contained in:
42
PROMS/VEPROMS.CSLA.Library/Minimal/GeneralReports.cs
Normal file
42
PROMS/VEPROMS.CSLA.Library/Minimal/GeneralReports.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using Csla.Data;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
//CSM - C2025-043 - Minimal Class for General Reports
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
public static class GeneralReports
|
||||
{
|
||||
|
||||
#region Get General Reports
|
||||
//CSM - C2025-043 report RO's that are not used in any of the PROMS data.
|
||||
public static DataTable GetROsNotUsedInPROMS()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "vesp_GetROsNotUsed";
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
using (SqlDataAdapter da = new SqlDataAdapter(cm))
|
||||
{
|
||||
DataTable dt = new DataTable();
|
||||
da.Fill(dt);
|
||||
return dt;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new DbCslaException("Error in GetROsNotUsedInPROMS Report: retrieving data failed", ex);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user