예제 #1
0
 void ITaskFolderService.Create(TaskFolder folder)
 {
     _repository.Add(folder);
     if (this._log.IsInfoEnabled)
     {
         this._log.InfoFormat("新增任务表{0}#{1}|{2}", folder, folder.ID, folder.Name);
     }
 }
예제 #2
0
 void ITaskFolderService.Delete(TaskFolder folder)
 {
     _repository.Remove(folder);
     //HACK:目前不会删除任务表下的所有任务
     if (this._log.IsInfoEnabled)
     {
         this._log.InfoFormat("删除任务表#{0}", folder.ID);
     }
 }
예제 #3
0
 /// <summary>设置任务所在的任务目录
 /// </summary>
 /// <param name="folder"></param>
 public void SetTaskFolder(TaskFolder folder)
 {
     Assert.IsValid(folder);
     if (this.TaskFolderId == folder.ID)
     {
         return;
     }
     if (folder is PersonalTaskFolder)
     {
         Assert.AreEqual(this.CreatorAccountId, (folder as PersonalTaskFolder).OwnerAccountId);
     }
     this.TaskFolderId = folder.ID;
     this.MakeChange();
 }
예제 #4
0
 void ITaskFolderService.Update(TaskFolder folder)
 {
     _repository.Update(folder);
 }
예제 #5
0
 IEnumerable <PersonalTask> IPersonalTaskService.GetIncompletedTasks(Account account, TaskFolder folder)
 {
     return(_repository.FindBy(account, false, folder));
 }