C2025-009 Added a report for tracking when a user is added into PROMS / when a user is added to specific PROMS security groups. Report can be run from the V-button->General Tools->Reports.

This commit is contained in:
2025-09-08 14:38:36 -04:00
parent 3a6ce52ead
commit 0da2d38bd8
7 changed files with 302 additions and 41 deletions

View File

@@ -0,0 +1,42 @@
using System;
using Csla.Data;
using System.Data;
using System.Data.SqlClient;
//CSM - C2025-009 - Minimal Class for User based Reports
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
}
}