Example #1
0
 public void Update(MediaRequire model)
 {
     var entity = Find(model.ID);
     db.Attach<MediaRequire>(entity);
     entity.CompanyID=model.CompanyID;
     entity.Name=model.Name;
     entity.Description=model.Description;
     entity.AttachmentPath=model.AttachmentPath;
     entity.DepartmentID=model.DepartmentID;
     entity.SenderID=model.SenderID;
     entity.ResolveID=model.ResolveID;
     entity.IsRoot=model.IsRoot;
     entity.PID=model.PID;
     entity.Status=model.Status;
     entity.AddUser=model.AddUser;
     entity.AddTime=model.AddTime;
     db.Commit();
 }
Example #2
0
 public MediaRequire Create(MediaRequireViewModel model)
 {
     var entity = new MediaRequire();
     entity.CompanyID=model.CompanyID;
     entity.Name=model.Name;
     entity.Description=model.Description;
     entity.AttachmentPath=model.AttachmentPath;
     entity.DepartmentID=model.DepartmentID;
     entity.SenderID=model.SenderID;
     entity.ResolveID=model.ResolveID;
     entity.IsRoot=model.IsRoot;
     entity.PID=model.PID;
     entity.Status=model.Status;
     entity.AddUser=model.AddUser;
     entity.AddTime=model.AddTime;
     db.Add<MediaRequire>(entity);
     db.Commit();
     return entity;
 }
Example #3
0
 public void Delete(MediaRequire model)
 {
     var target = Find(model.ID);
     db.Remove<MediaRequire>(target);
     db.Commit();
 }
Example #4
0
 public void Create(MediaRequire model)
 {
     db.Add<MediaRequire>(model);
     db.Commit();
 }