Example #1
0
 private void InsertDataToAudit(SysAudit audit)
 {
     using (var ctx = new SystemCompanyEntities())
     {
         ctx.AddToSysAudit(audit);
         ctx.SaveChanges();
     }
 }
Example #2
0
        public void InsertAudit(int key1, int key2, int key3, string tableName, string value
                                , string fieldAction)
        {
            var audit = new SysAudit();

            audit.key1         = key1;
            audit.key2         = key2;
            audit.key3         = key3;
            audit.tableName    = tableName;
            audit.value        = value;
            audit.DateInserted = DateTime.Now;
            audit.FieldAction  = fieldAction;
            this.InsertDataToAudit(audit);
        }