Exemple #1
0
        public ActionResult <SearchCourseSectionViewModel> SearchCourseSectionForSchedule(SearchCourseSectionViewModel searchCourseSectionViewModel)
        {
            SearchCourseSectionViewModel searchCourseSection = new SearchCourseSectionViewModel();

            try
            {
                searchCourseSection = _courseManagerService.SearchCourseSectionForSchedule(searchCourseSectionViewModel);
            }
            catch (Exception es)
            {
                searchCourseSection._failure = true;
                searchCourseSection._message = es.Message;
            }
            return(searchCourseSection);
        }
        ///// <summary>
        ///// Get All Course Standard For Course Section
        ///// </summary>
        ///// <param name="courseStandardForCourseViewModel"></param>
        ///// <returns></returns>
        //public CourseStandardForCourseViewModel GetAllCourseStandardForCourseSection(CourseStandardForCourseViewModel courseStandardForCourseViewModel)
        //{
        //    CourseStandardForCourseViewModel courseStandardForCourseView = new CourseStandardForCourseViewModel();
        //    try
        //    {
        //        if (TokenManager.CheckToken(courseStandardForCourseViewModel._tenantName + courseStandardForCourseViewModel._userName, courseStandardForCourseViewModel._token))
        //        {
        //            courseStandardForCourseView = this.courseManagerRepository.GetAllCourseStandardForCourseSection(courseStandardForCourseViewModel);
        //        }
        //        else
        //        {
        //            courseStandardForCourseView._failure = true;
        //            courseStandardForCourseView._message = TOKENINVALID;
        //        }
        //    }
        //    catch (Exception es)
        //    {
        //        courseStandardForCourseView._failure = true;
        //        courseStandardForCourseView._message = es.Message;
        //    }
        //    return courseStandardForCourseView;
        //}

        ///// <summary>
        ///// Delete Course Section  For Specific Schedule Type
        ///// </summary>
        ///// <param name="deleteScheduleViewModel"></param>
        ///// <returns></returns>
        //public DeleteScheduleViewModel DeleteSchedule(DeleteScheduleViewModel deleteScheduleViewModel)
        //{
        //    DeleteScheduleViewModel deleteSchedule = new DeleteScheduleViewModel();
        //    try
        //    {
        //        if (TokenManager.CheckToken(deleteScheduleViewModel._tenantName + deleteScheduleViewModel._userName, deleteScheduleViewModel._token))
        //        {
        //            deleteSchedule = this.courseManagerRepository.DeleteSchedule(deleteScheduleViewModel);
        //        }
        //        else
        //        {
        //            deleteSchedule._failure = true;
        //            deleteSchedule._message = TOKENINVALID;
        //        }
        //    }
        //    catch (Exception es)
        //    {
        //        deleteSchedule._failure = true;
        //        deleteSchedule._message = es.Message;
        //    }
        //    return deleteSchedule;
        //}

        public SearchCourseSectionViewModel SearchCourseSectionForSchedule(SearchCourseSectionViewModel searchCourseSectionViewModel)
        {
            SearchCourseSectionViewModel searchCourseSection = new SearchCourseSectionViewModel();

            try
            {
                if (TokenManager.CheckToken(searchCourseSectionViewModel._tenantName + searchCourseSectionViewModel._userName, searchCourseSectionViewModel._token))
                {
                    searchCourseSection = this.courseManagerRepository.SearchCourseSectionForSchedule(searchCourseSectionViewModel);
                }
                else
                {
                    searchCourseSection._failure = true;
                    searchCourseSection._message = TOKENINVALID;
                }
            }
            catch (Exception es)
            {
                searchCourseSection._failure = true;
                searchCourseSection._message = es.Message;
            }
            return(searchCourseSection);
        }