예제 #1
0
 public void Create(TaskModel task)
 {
     using (_repository = _getRepository())
     {
         _repository.Insert(task);
         _repository.Save();
     }
 }
예제 #2
0
 public void Update(TaskModel task)
 {
     using (_repository = _getRepository())
     {
         TaskModel toUpdate = _repository.Get(item => item.Id == task.Id).First();
         toUpdate.Name = task.Name;
         toUpdate.Description = task.Description;
         toUpdate.TimeEstimate = task.TimeEstimate;
         toUpdate.StartDate = task.StartDate;
         toUpdate.FinishDate = task.FinishDate;
         toUpdate.Filepath = task.Filepath;
         toUpdate.Version = task.Version;
         toUpdate.ProjectId = task.ProjectId;
         toUpdate.AssignedPersonId = task.AssignedPersonId;
         toUpdate.AssigningPersonId = task.AssigningPersonId;
         toUpdate.CategoryId = task.CategoryId;
         toUpdate.StatusId = task.StatusId;
         toUpdate.PriorityId = task.PriorityId;
         toUpdate.TypeId = task.TypeId;
         _repository.Update(toUpdate);
         _repository.Save();
     }
 }
예제 #3
0
 public bool CreateTask(TaskModel task)
 {
     _tasksService.Create(task);
     //TODO: return  result
     return true;
 }