Exemple #1
0
 public void Update(TraceLog model)
 {
     var target = Find(model.ID);
     db.Attach<TraceLog>(target);
     target.CompanyID = model.CompanyID;
     target.Content = model.Content;
     db.Commit();
 }
Exemple #2
0
 public TraceLog Create(ViewModels.TraceLogViewModel model)
 {
     TraceLog entity = new TraceLog();
     entity.AddTime = DateTime.Now;
     entity.AddUser = CookieHelper.MemberID;
     entity.CompanyID = model.CompanyID;
     entity.Content = model.Content;
     entity.RelationID = model.RelationID;
     db.Add<TraceLog>(entity);
     db.Commit();
     return entity;
 }
Exemple #3
0
 public void Delete(TraceLog model)
 {
     var target = Find(model.ID);
     db.Remove<TraceLog>(target);
     db.Commit();
 }
Exemple #4
0
 public void Create(TraceLog model)
 {
     db.Add<TraceLog>(model);
     db.Commit();
 }