public bool DeleteAudit(Audit audit) { if (audit == null) return false; _unitOfWork.AuditRepository.Delete(audit); _unitOfWork.Save(); return true; }
public static AuditLogViewModel BindAuditLogViewModel(Audit auditLog) { return new AuditLogViewModel() { Action=auditLog.Action, AuditID=auditLog.AuditID.ToString(), ColumnName=auditLog.ColumnName, HubID=auditLog.HubID, LogDate=auditLog.DateTime, LoginID=auditLog.LoginID, NewValue=auditLog.NewValue, OldValue = auditLog.OldValue , TableName = auditLog.TableName, //UserName = users.Find(t=>t.UserProfileID==auditLog.LoginID).UserName }; }
public bool EditAudit(Audit audit) { _unitOfWork.AuditRepository.Edit(audit); _unitOfWork.Save(); return true; }
public bool AddAudit(Audit audit) { _unitOfWork.AuditRepository.Add(audit); _unitOfWork.Save(); return true; }