Пример #1
0
 public void Update(PlanLog model)
 {
     var entity = Find(model.ID);
     db.Attach<PlanLog>(entity);
     entity.CompanyID = model.CompanyID;
     entity.AddTime = model.AddTime;
     entity.PlanTime = model.PlanTime;
     entity.Content = model.Content;
     entity.Comment = model.Comment;
     entity.CommentTitme = model.CommentTitme;
     entity.AddUser = model.AddUser;
     db.Commit();
 }
Пример #2
0
 public PlanLog Create(PlanLogViewModel model)
 {
     PlanLog entity = new PlanLog();
     entity.AddTime = DateTime.Now;
     entity.AddUser = 227;
     entity.CompanyID = model.CompanyID;
     entity.Content = model.Content;
     entity.PlanTime = model.PlanTime;
     entity.CommentTitme = DateTime.Now.AddMonths(1);
     db.Add<PlanLog>(entity);
     db.Commit();
     return entity;
 }
Пример #3
0
 public void Delete(PlanLog model)
 {
     var target = Find(model.ID);
     db.Remove<PlanLog>(target);
     db.Commit();
 }
Пример #4
0
 public void Create(PlanLog model)
 {
     db.Add<PlanLog>(model);
     db.Commit();
 }