C2026-002 Admin Tool - Data Check - Enhancements to new admin Tool for ROs not used.

Add the ability to filter out groups of Alarms from the results.
This commit is contained in:
2026-01-19 11:33:10 -05:00
parent c0f35a7d84
commit 00c64411c5
5 changed files with 469 additions and 361 deletions

View File

@@ -11,7 +11,7 @@ namespace VEPROMS.CSLA.Library
#region Get General Reports
//CSM - C2025-043 report RO's that are not used in any of the PROMS data.
public static DataTable GetROsNotUsedInPROMS()
public static DataTable GetROsNotUsedInPROMS(DataTable dtDBids)
{
try
{
@@ -22,6 +22,10 @@ namespace VEPROMS.CSLA.Library
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "vesp_GetROsNotUsed";
cm.CommandTimeout = 0;
//Pass table Valued parameter to Store Procedure
SqlParameter sqlParam = cm.Parameters.AddWithValue("@dbIDs", dtDBids);
sqlParam.SqlDbType = SqlDbType.Structured;
using (SqlDataAdapter da = new SqlDataAdapter(cm))
{
DataTable dt = new DataTable();
@@ -36,6 +40,36 @@ namespace VEPROMS.CSLA.Library
throw new DbCslaException("Error in GetROsNotUsedInPROMS Report: retrieving data failed", ex);
}
}
//C2026-002 Enhancements to new admin Tool for ROs not used.
//used to build checkboxes of dbs to include
public static DataTable GetRODBs()
{
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.Text;
cm.CommandText = "select RofstDatabase.*, RODbID FROM RofstDatabase INNER JOIN (Select FSTID = max(RoFSTID), RODbID from ROFsts GROUP BY RODbID) fsts ON fsts.FSTID = RofstDatabase.RofstID ORDER BY RofstID, RODbID, dbiTitle";
cm.CommandTimeout = 0;
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 - GetRODBs: retrieving data failed", ex);
}
}
#endregion
}