예제 #1
0
        public ActionResult Update(int commentId, string comment)
        {
            if (!Context.PersonId.HasValue)
            {
                throw new UnassignedUserException();
            }
            var res = SchoolLocator.TeacherCommentService.EditComment(commentId, Context.PersonId.Value, comment);

            return(Json(TeacherCommentViewData.Create(res)));
        }
예제 #2
0
        public ActionResult CommentsList(int teacherId)
        {
            var res = SchoolLocator.TeacherCommentService.GetComments(teacherId);

            return(Json(TeacherCommentViewData.Create(res)));
        }