예제 #1
0
        /// <summary>
        /// Get All CourseCommentCategory With ReportCardComments
        /// </summary>
        /// <param name="courseCommentCategoryListViewModel"></param>
        /// <returns></returns>
        public CourseCommentCategoryListViewModel GetAllCourseCommentCategory(CourseCommentCategoryListViewModel courseCommentCategoryListViewModel)
        {
            CourseCommentCategoryListViewModel courseCommentCategoryList = new CourseCommentCategoryListViewModel();
            try
            {
                courseCommentCategoryList.TenantId = courseCommentCategoryListViewModel.TenantId;
                courseCommentCategoryList.SchoolId = courseCommentCategoryListViewModel.SchoolId;
                courseCommentCategoryList._tenantName = courseCommentCategoryListViewModel._tenantName;
                courseCommentCategoryList._token = courseCommentCategoryListViewModel._token;
                courseCommentCategoryList._userName = courseCommentCategoryListViewModel._userName;

                var courseCommentCategoryData = this.context?.CourseCommentCategory.Where(x => x.TenantId == courseCommentCategoryListViewModel.TenantId && x.SchoolId == courseCommentCategoryListViewModel.SchoolId).ToList();

                if (courseCommentCategoryData.Count > 0)
                {
                    courseCommentCategoryList.courseCommentCategories = courseCommentCategoryData;
                    courseCommentCategoryList._failure = false;
                }
                else
                {
                    courseCommentCategoryList._message = NORECORDFOUND;
                    courseCommentCategoryList._failure = true;
                }
            }
            catch (Exception es)
            {
                courseCommentCategoryList.courseCommentCategories = null;
                courseCommentCategoryList._message = es.Message;
                courseCommentCategoryList._failure = true;
            }
            return courseCommentCategoryList;
        }
예제 #2
0
        public ActionResult <CourseCommentCategoryListViewModel> GetAllCourseCommentCategory(CourseCommentCategoryListViewModel courseCommentCategoryListViewModel)
        {
            CourseCommentCategoryListViewModel courseCommentCategoryList = new CourseCommentCategoryListViewModel();

            try
            {
                courseCommentCategoryList = _reportCardService.GetAllCourseCommentCategory(courseCommentCategoryListViewModel);
            }
            catch (Exception es)
            {
                courseCommentCategoryList._message = es.Message;
                courseCommentCategoryList._failure = true;
            }
            return(courseCommentCategoryList);
        }
예제 #3
0
        /// <summary>
        /// Get All CourseCommentCategory With ReportCardComments
        /// </summary>
        /// <param name="courseCommentCategoryListViewModel"></param>
        /// <returns></returns>
        public CourseCommentCategoryListViewModel GetAllCourseCommentCategory(CourseCommentCategoryListViewModel courseCommentCategoryListViewModel)
        {
            CourseCommentCategoryListViewModel courseCommentCategoryList = new CourseCommentCategoryListViewModel();

            if (TokenManager.CheckToken(courseCommentCategoryListViewModel._tenantName + courseCommentCategoryListViewModel._userName, courseCommentCategoryListViewModel._token))
            {
                courseCommentCategoryList = this.reportCardRepository.GetAllCourseCommentCategory(courseCommentCategoryListViewModel);
            }
            else
            {
                courseCommentCategoryList._message = TOKENINVALID;
                courseCommentCategoryList._failure = true;
            }

            return(courseCommentCategoryList);
        }