protected virtual void DoGenericAudit() { var auditFields = new HashSet <Field>(); GetEditableFields(auditFields); var auditRequest = GetAuditRequest(auditFields); if (IsUpdate) { Row audit = null; if (auditRequest != null) { audit = AuditLogService.PrepareAuditUpdate(RowRegistry.GetConnectionKey(Row), auditRequest); } if (audit != null) { Connection.Insert(audit); } } else if (IsCreate) { if (auditRequest != null) { AuditLogService.AuditInsert(Connection, RowRegistry.GetConnectionKey(Row), auditRequest); } } }
protected virtual void DoGenericAudit() { var auditRequest = GetAuditRequest(); if (auditRequest != null) { AuditLogService.AuditUndelete(Connection, RowRegistry.GetSchemaName(Row), auditRequest); } }
protected virtual void DoGenericAudit() { var auditRequest = GetAuditRequest(); if (auditRequest != null) { AuditLogService.AuditUndelete(Connection, Row.GetFields().ConnectionKey, auditRequest); } }
public override void OnAudit(IDeleteRequestHandler handler) { var auditRequest = GetAuditDeleteRequest(handler); if (auditRequest != null) { AuditLogService.AuditDelete(handler.UnitOfWork.Connection, handler.Row.GetFields().ConnectionKey, auditRequest); } }
public override void OnAudit(IDeleteRequestHandler handler) { var auditRequest = GetAuditDeleteRequest(handler); if (auditRequest != null) { AuditLogService.AuditDelete(handler.UnitOfWork.Connection, RowRegistry.GetConnectionKey(handler.Row), auditRequest); } }
public override void OnAudit(ISaveRequestHandler handler) { if (handler.Row == null) { return; } var auditRequest = GetAuditSaveRequest(handler); if (connectionKey == null) { connectionKey = handler.Row.GetFields().ConnectionKey; } if (handler.IsCreate) { if (auditRequest != null) { AuditLogService.AuditInsert(handler.UnitOfWork.Connection, connectionKey, auditRequest); } return; } Row audit = null; if (auditRequest != null) { audit = AuditLogService.PrepareAuditUpdate(connectionKey, auditRequest); } if (audit != null) { handler.UnitOfWork.Connection.Insert(audit); } }