Example #1
0
        public static void Log(string action, string desc, string relatedEntity)
        {
            using (var db = new IRContextDataContext())
            {
                AuditTrail audit = new AuditTrail();
                audit.User         = HttpContext.Current.User.Identity.Name;
                audit.Action       = action;
                audit.Description  = desc;
                audit.AssociatedId = relatedEntity;
                audit.ActionDate   = DateTime.Now;

                db.AuditTrails.InsertOnSubmit(audit);
                db.SubmitChanges();
            }
        }
Example #2
0
 partial void DeleteAuditTrail(AuditTrail instance);
Example #3
0
 partial void UpdateAuditTrail(AuditTrail instance);
Example #4
0
 partial void InsertAuditTrail(AuditTrail instance);