C2026-058 Check all Tables for if Acc Page Id Prefix is Used More than Once

This commit is contained in:
mschill committed 2026-10-15 11:27:45 -04:00
1 parent ae9fb0eb67
commit 82f11fa696
10 files changed
+717 -133

No files matched your search

@@ -8,34 +8,53 @@ namespace VEPROMS.CSLA.Library
public static class UserReports
{
#region Get User Reports
//CSM - C2025-009 Report for tracking PROMS Users / security
public static DataTable GetUserAccessControlData()
{
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "getUserAcessControl";
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 getUserAcessControl Report: retrieving data failed", ex);
}
}
#endregion
#region Get User Reports
//CSM - C2025-009 Report for tracking PROMS Users / security
public static DataTable GetUserAccessControlData() => GetDataTable("getUserAcessControl");
}
#endregion
#region Get Duplicate Accessory Page Reports
//CSM - C2026-058 Reports for if Acc Page Id Prefix is Used More than Once
// Procedure for Duplicate Accessory Page IDs in ROs in PROMS
public static DataTable GetDupAccIDsData() => GetDataTable("getDupAccIDs");
//CSM - C2026-058 Reports for if Acc Page Id Prefix is Used More than Once
// Procedure for Duplicate Accessory Page Prefixes in ROs in PROMS
public static DataTable GetDupAccPrefixesData() => GetDataTable("getDupAccPrefixes");
//CSM - C2026-058 Reports for if Acc Page Id Prefix is Used More than Once
// Get PROMS Documents containing Duplicate Accessory Page IDs
public static DataTable GetDocsDupAccIDsData() => GetDataTable("getDocsDupAccIDs");
#endregion
#region Generic Get Data Table
private static DataTable GetDataTable(string spname)
{
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = spname;
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 {spname} Report: retrieving data failed", ex);
}
}
#endregion
}
}