Audit For Truth
by Remy Porter
in CodeSOD
on 2022-03-29
Tony sends us this snipped of C# code:
internal static bool TraceListner(ProjectInstance objPI,
Exception objError, int EntityID,
Enumerations.LogEntityType EntityType, int EntityInterfaceID,
Enumerations.LogReturnType ReturnType,
Enumerations.EventLevels EventLevel, string StartTime,
string EndTime, int UserID, string Description)
{
ProcessAudit objLog;
bool blnWrite;
try
{
blnWrite = true;
if (!(objError == null))
blnWrite = true;
if (blnWrite == true)
{
objLog = new PrjectAudit(objPI, objError, EntityID, Convert.ToInt32(EntityType), EntityInterfaceID, Convert.ToInt32(EventLevel), StartTime, EndTime, Convert.ToInt32(ReturnType), Description, UserID);
return objLog.Save();
}
}
catch
{
}
return false;
}