Пример #1
0
        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")));
        }