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