///<summary>Creates a new SecurityLogHash entry in the Db.</summary> public static void InsertSecurityLogHash(long securityLogNum) { if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { Meth.GetVoid(MethodBase.GetCurrentMethod(), securityLogNum); return; } SecurityLog securityLog = SecurityLogs.GetOne(securityLogNum); //need a fresh copy because of time stamps, etc. //Attempted fix for NADG problems with SecurityLogHash Insert attempts throwing null reference UEs. Job #695 if (securityLog == null) { System.Threading.Thread.Sleep(100); securityLog = SecurityLogs.GetOne(securityLogNum); //need a fresh copy because of time stamps, etc. } if (securityLog == null) { //We give up at this point. The end result will be the securitylog row shows up as RED in the audit trail. //We don't want other things to fail/practice flow to be interrupted just because of securitylog issues. return; } SecurityLogHash securityLogHash = new SecurityLogHash(); //Set the FK securityLogHash.SecurityLogNum = securityLog.SecurityLogNum; //Hash the securityLog securityLogHash.LogHash = GetHashString(securityLog); Insert(securityLogHash); }
///<summary>Creates a new SecurityLogHash entry in the Db.</summary> public static void InsertSecurityLogHash(long securityLogNum) { if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { Meth.GetVoid(MethodBase.GetCurrentMethod(), securityLogNum); return; } SecurityLog securityLog = SecurityLogs.GetOne(securityLogNum); //need a fresh copy because of time stamps, etc. SecurityLogHash securityLogHash = new SecurityLogHash(); //Set the FK securityLogHash.SecurityLogNum = securityLog.SecurityLogNum; //Hash the securityLog securityLogHash.LogHash = GetHashString(securityLog); Insert(securityLogHash); }