public void InsertAudit(Constants.AuditActionType action_type, string action, string performed_by) { AuditService service = new AuditService(); PureAuditTrail audit = new PureAuditTrail(); audit.Username = performed_by; //System.Web.HttpContext.Current.User.Identity.Name; audit.Useractivity = action_type.ToString(); audit.Comment = action; audit.Datelog = DateTime.Now; audit.Systemname = System.Environment.UserName; audit.Systemip = System.Web.HttpContext.Current.Request.Params["REMOTE_ADDR"] ?? System.Web.HttpContext.Current.Request.UserHostAddress; service.insertAudit(audit); return; }
public void insertAudit(PureAuditTrail newuser) { _db.Insert <PureAuditTrail>(newuser); }