예제 #1
0
파일: TaskService.cs 프로젝트: DnC275/OOP
        public void AddComment(int taskId, int employeeId, string text)
        {
            if (!repository.CheckIdExistence(taskId))
            {
                throw new NonexistentTask();
            }
            TaskDTO taskDto = ConvertDalToBbl(repository.GetById(taskId));

            taskDto.AddComment(text);
            taskDto.LastModifiedDate = MyDate.GetDate();
            repository.Update(ConvertBblToDal(taskDto));
            changeRepository.Create(ConvertBblToDal(new TaskChangeDTO(taskId, employeeId, "New comment added")));
        }