Пример #1
0
        private static void DataAuditAsynch(string userId, string collectionName, string entityId, string entityKeyField, DataAuditType auditType, string contractNumber)
        {
            //throw new SystemException("test error in new thread starts");

            DataAudit data = GetDataAuditLog(userId, collectionName, entityId, entityKeyField, auditType, contractNumber);

            AuditDispatcher.WriteAudit(data, string.Format("{0}_{1}", data.Type, data.EntityType));
        }
Пример #2
0
        private static DataAudit GetDataAuditLog(string userId, string collectionName, string entityId, string entityKeyField, DataAuditType auditType, string contractNumber)
        {
            DataAudit auditLog = new DataAudit()
            {
                EntityID   = entityId,
                UserId     = userId,
                Contract   = contractNumber,
                EntityType = collectionName,
                Type       = auditType.ToString(),
                Entity     = GetMongoEntity(contractNumber, collectionName, entityId, entityKeyField)
            };

            return(auditLog);
        }