43 lines
967 B
C#
43 lines
967 B
C#
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
|
|
|
|
}
|
|
}
|