Exemple #1
0
 public void Update(FileShare model)
 {
     var target = Find(model.ID);
     db.Attach<FileShare>(target);
     target.Description = model.Description;
     target.FilePath = model.FilePath;
     target.FileCateID = model.FileCateID;
     target.DepartmentID = model.DepartmentID;
     target.Name = model.Name;
     db.Commit();
 }
Exemple #2
0
 public FileShare Create(ViewModels.FileShareViewModel model)
 {
     FileShare entity = new FileShare();
     entity.AddTime = DateTime.Now;
     entity.AddUser = CookieHelper.MemberID;
     entity.FilePath = model.FilePath;
     entity.FileCateID = model.FileCateID;
     entity.Name = model.Name;
     entity.Description = model.Description;
     entity.DepartmentID = model.DepartmentID;
     db.Add<FileShare>(entity);
     db.Commit();
     return entity;
 }
Exemple #3
0
 public void Delete(FileShare model)
 {
     var target = Find(model.ID);
     db.Remove<FileShare>(target);
     db.Commit();
 }
Exemple #4
0
 public void Create(FileShare model)
 {
     db.Add<FileShare>(model);
     db.Commit();
 }