Пример #1
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);
        }
Пример #2
0
        /// <summary>
        /// Add Report Card Comments
        /// </summary>
        /// <param name="reportCardViewModel"></param>
        /// <returns></returns>

        //public ReportCardCommentsAddViewModel AddReportCardComments(ReportCardCommentsAddViewModel reportCardCommentsAddViewModel)
        //{
        //    ReportCardCommentsAddViewModel reportCardCommentsAdd = new ReportCardCommentsAddViewModel();
        //    if(TokenManager.CheckToken(reportCardCommentsAddViewModel._tenantName + reportCardCommentsAddViewModel._userName, reportCardCommentsAddViewModel._token))
        //    {
        //        reportCardCommentsAdd = this.reportCardRepository.AddReportCardComments(reportCardCommentsAddViewModel);
        //    }
        //    else
        //    {
        //        reportCardCommentsAdd._message= TOKENINVALID;
        //        reportCardCommentsAdd._failure = true;
        //    }

        //    return reportCardCommentsAdd;
        //}

        /// <summary>
        /// Update Report Card Comments
        /// </summary>
        /// <param name="reportCardViewModel"></param>
        /// <returns></returns>

        //public ReportCardCommentsAddViewModel UpdateReportCardComments(ReportCardCommentsAddViewModel reportCardCommentsAddViewModel)
        //{
        //    ReportCardCommentsAddViewModel reportCardCommentsUpdate = new ReportCardCommentsAddViewModel();
        //    if (TokenManager.CheckToken(reportCardCommentsAddViewModel._tenantName + reportCardCommentsAddViewModel._userName, reportCardCommentsAddViewModel._token))
        //    {
        //        reportCardCommentsUpdate = this.reportCardRepository.UpdateReportCardComments(reportCardCommentsAddViewModel);
        //    }
        //    else
        //    {
        //        reportCardCommentsUpdate._message = TOKENINVALID;
        //        reportCardCommentsUpdate._failure = true;
        //    }
        //    return reportCardCommentsUpdate;
        //}

        /// <summary>
        /// Delete Report Card Comments
        /// </summary>
        /// <param name="reportCardViewModel"></param>
        /// <returns></returns>
        //public ReportCardCommentsAddViewModel DeleteReportCardComments(ReportCardCommentsAddViewModel reportCardCommentsAddViewModel)
        //{
        //    ReportCardCommentsAddViewModel reportCardCommentsDelete = new ReportCardCommentsAddViewModel();
        //    if (TokenManager.CheckToken(reportCardCommentsAddViewModel._tenantName + reportCardCommentsAddViewModel._userName, reportCardCommentsAddViewModel._token))
        //    {
        //        reportCardCommentsDelete = this.reportCardRepository.DeleteReportCardComments(reportCardCommentsAddViewModel);
        //    }
        //    else
        //    {
        //        reportCardCommentsDelete._message = TOKENINVALID;
        //        reportCardCommentsDelete._failure = true;
        //    }

        //    return reportCardCommentsDelete;
        //}

        /// <summary>
        /// Add Course Comment Category
        /// </summary>
        /// <param name="courseCommentCategoryAddViewModel"></param>
        /// <returns></returns>

        public CourseCommentCategoryAddViewModel SaveCourseCommentCategory(CourseCommentCategoryAddViewModel courseCommentCategoryAddViewModel)
        {
            CourseCommentCategoryAddViewModel courseCommentcategoryAdd = new CourseCommentCategoryAddViewModel();

            if (TokenManager.CheckToken(courseCommentCategoryAddViewModel._tenantName + courseCommentCategoryAddViewModel._userName, courseCommentCategoryAddViewModel._token))
            {
                courseCommentcategoryAdd = this.reportCardRepository.AddCourseCommentCategory(courseCommentCategoryAddViewModel);
            }
            else
            {
                courseCommentcategoryAdd._message = TOKENINVALID;
                courseCommentcategoryAdd._failure = true;
            }

            return(courseCommentcategoryAdd);
        }
Пример #3
0
        /// <summary>
        /// Get School Year By Id
        /// </summary>
        /// <param name="schoolYear"></param>
        /// <returns></returns>
        public SchoolYearsAddViewModel ViewSchoolYear(SchoolYearsAddViewModel schoolYear)
        {
            SchoolYearsAddViewModel schoolYearAddViewModel = new SchoolYearsAddViewModel();

            if (TokenManager.CheckToken(schoolYear._tenantName + schoolYear._userName, schoolYear._token))
            {
                schoolYearAddViewModel = this.markingperiodRepository.ViewSchoolYear(schoolYear);
                return(schoolYearAddViewModel);
            }
            else
            {
                schoolYearAddViewModel._failure = true;
                schoolYearAddViewModel._message = TOKENINVALID;
                return(schoolYearAddViewModel);
            }
        }
Пример #4
0
        /// <summary>
        /// Update Calendar
        /// </summary>
        /// <param name="calendar"></param>
        /// <returns></returns>
        public CalendarAddViewModel UpdateCalendar(CalendarAddViewModel calendar)
        {
            CalendarAddViewModel calendarAddViewModel = new CalendarAddViewModel();

            if (TokenManager.CheckToken(calendar._tenantName + calendar._userName, calendar._token))
            {
                calendarAddViewModel = this.calendarRepository.UpdateCalendar(calendar);
                return(calendarAddViewModel);
            }
            else
            {
                calendarAddViewModel._failure = true;
                calendarAddViewModel._message = TOKENINVALID;
                return(calendarAddViewModel);
            }
        }
Пример #5
0
        public SemesterAddViewModel ViewSemester(SemesterAddViewModel semester)
        {
            SemesterAddViewModel semesterView = new SemesterAddViewModel();

            if (TokenManager.CheckToken(semester._tenantName + semester._userName, semester._token))
            {
                semesterView = this.markingperiodRepository.ViewSemester(semester);
                return(semesterView);
            }
            else
            {
                semesterView._failure = true;
                semesterView._message = TOKENINVALID;
                return(semesterView);
            }
        }
Пример #6
0
        public ProgressPeriodAddViewModel ViewProgressPeriod(ProgressPeriodAddViewModel progressPeriod)
        {
            ProgressPeriodAddViewModel progressPeriodView = new ProgressPeriodAddViewModel();

            if (TokenManager.CheckToken(progressPeriod._tenantName + progressPeriod._userName, progressPeriod._token))
            {
                progressPeriodView = this.markingperiodRepository.ViewProgressPeriod(progressPeriod);
                return(progressPeriodView);
            }
            else
            {
                progressPeriodView._failure = true;
                progressPeriodView._message = TOKENINVALID;
                return(progressPeriodView);
            }
        }
Пример #7
0
        /// <summary>
        /// View School Period By Id
        /// </summary>
        /// <param name="schoolPeriod"></param>
        /// <returns></returns>
        public SchoolPeriodAddViewModel ViewSchoolPeriod(SchoolPeriodAddViewModel schoolPeriod)
        {
            SchoolPeriodAddViewModel schoolPeriodView = new SchoolPeriodAddViewModel();

            if (TokenManager.CheckToken(schoolPeriod._tenantName + schoolPeriod._userName, schoolPeriod._token))
            {
                schoolPeriodView = this.schoolPeriodRepository.ViewSchoolPeriod(schoolPeriod);
                return(schoolPeriodView);
            }
            else
            {
                schoolPeriodView._failure = true;
                schoolPeriodView._message = TOKENINVALID;
                return(schoolPeriodView);
            }
        }
Пример #8
0
        /// <summary>
        /// Update Quarter
        /// </summary>
        /// <param name="quarter"></param>
        /// <returns></returns>
        public QuarterAddViewModel UpdateQuarter(QuarterAddViewModel quarter)
        {
            QuarterAddViewModel quarterAddViewModel = new QuarterAddViewModel();

            if (TokenManager.CheckToken(quarter._tenantName + quarter._userName, quarter._token))
            {
                quarterAddViewModel = this.markingperiodRepository.UpdateQuarter(quarter);
                return(quarterAddViewModel);
            }
            else
            {
                quarterAddViewModel._failure = true;
                quarterAddViewModel._message = TOKENINVALID;
                return(quarterAddViewModel);
            }
        }
Пример #9
0
        /// <summary>
        /// Delete Country Value By Id
        /// </summary>
        /// <param name="countryDeleteModel"></param>
        /// <returns></returns>
        public CountryAddModel DeleteCountry(CountryAddModel countryDeleteModel)
        {
            CountryAddModel countryModel = new CountryAddModel();

            if (TokenManager.CheckToken(countryDeleteModel._tenantName + countryDeleteModel._userName, countryDeleteModel._token))
            {
                countryModel = this.commonRepository.DeleteCountry(countryDeleteModel);
                return(countryModel);
            }
            else
            {
                countryModel._failure = true;
                countryModel._message = TOKENINVALID;
                return(countryModel);
            }
        }
Пример #10
0
        /// <summary>
        /// Delete Dropdown Value By Id
        /// </summary>
        /// <param name="dpdownValue"></param>
        /// <returns></returns>
        public DropdownValueAddModel DeleteDropdownValue(DropdownValueAddModel dpdownValue)
        {
            DropdownValueAddModel dropdownValueModel = new DropdownValueAddModel();

            if (TokenManager.CheckToken(dpdownValue._tenantName + dpdownValue._userName, dpdownValue._token))
            {
                dropdownValueModel = this.commonRepository.DeleteDropdownValue(dpdownValue);
                return(dropdownValueModel);
            }
            else
            {
                dropdownValueModel._failure = true;
                dropdownValueModel._message = TOKENINVALID;
                return(dropdownValueModel);
            }
        }
Пример #11
0
        /// <summary>
        /// Delete Language Value By Id
        /// </summary>
        /// <param name="languageDelete"></param>
        /// <returns></returns>
        public LanguageAddModel DeleteLanguage(LanguageAddModel languageDelete)
        {
            LanguageAddModel languageModel = new LanguageAddModel();

            if (TokenManager.CheckToken(languageDelete._tenantName + languageDelete._userName, languageDelete._token))
            {
                languageModel = this.commonRepository.DeleteLanguage(languageDelete);
                return(languageModel);
            }
            else
            {
                languageModel._failure = true;
                languageModel._message = TOKENINVALID;
                return(languageModel);
            }
        }
Пример #12
0
        public GetAllMembersList GetAllMembersForNotice(GetAllMembersList allMembersList)
        {
            GetAllMembersList getAllMembers = new GetAllMembersList();

            if (TokenManager.CheckToken(allMembersList._tenantName + allMembersList._userName, allMembersList._token))
            {
                getAllMembers = this.membershipRepository.GetAllMemberList(allMembersList);
                return(getAllMembers);
            }
            else
            {
                getAllMembers._failure = true;
                getAllMembers._message = TOKENINVALID;
                return(getAllMembers);
            }
        }
Пример #13
0
        public NoticeDeleteModel DeleteNotice(NoticeDeleteModel notice)
        {
            NoticeDeleteModel noticdeleteModel = new NoticeDeleteModel();

            if (TokenManager.CheckToken(notice._tenantName + notice._userName, notice._token))
            {
                noticdeleteModel = this.noticeRepository.DeleteNotice(notice);
                return(noticdeleteModel);
            }
            else
            {
                noticdeleteModel._failure = true;
                noticdeleteModel._message = TOKENINVALID;
                return(noticdeleteModel);
            }
        }
Пример #14
0
        /// <summary>
        /// Add Calendar
        /// </summary>
        /// <param name="calendarEvent"></param>
        /// <returns></returns>
        public CalendarEventAddViewModel AddCalendarEvent(CalendarEventAddViewModel calendarEvent)
        {
            CalendarEventAddViewModel CalendarEventAddViewModel = new CalendarEventAddViewModel();

            if (TokenManager.CheckToken(calendarEvent._tenantName + calendarEvent._userName, calendarEvent._token))
            {
                CalendarEventAddViewModel = this.calendarEventRepository.AddCalendarEvent(calendarEvent);
                return(CalendarEventAddViewModel);
            }
            else
            {
                CalendarEventAddViewModel._failure = true;
                CalendarEventAddViewModel._message = TOKENINVALID;
                return(CalendarEventAddViewModel);
            }
        }
Пример #15
0
        /// <summary>
        /// Add Room
        /// </summary>
        /// <param name="rooms"></param>
        /// <returns></returns>
        public RoomAddViewModel SaveRoom(RoomAddViewModel rooms)
        {
            RoomAddViewModel RoomAddViewModel = new RoomAddViewModel();

            if (TokenManager.CheckToken(rooms._tenantName + rooms._userName, rooms._token))
            {
                RoomAddViewModel = this.roomRepository.AddRoom(rooms);
                return(RoomAddViewModel);
            }
            else
            {
                RoomAddViewModel._failure = true;
                RoomAddViewModel._message = TOKENINVALID;
                return(RoomAddViewModel);
            }
        }
Пример #16
0
        public NoticeAddViewModel UpdateNotice(NoticeAddViewModel notice)
        {
            NoticeAddViewModel noticeAddViewModel = new NoticeAddViewModel();

            if (TokenManager.CheckToken(notice._tenantName, notice._token))
            {
                noticeAddViewModel = this.noticeRepository.UpdateNotice(notice);
                return(noticeAddViewModel);
            }
            else
            {
                noticeAddViewModel._failure = true;
                noticeAddViewModel._message = TOKENINVALID;
                return(noticeAddViewModel);
            }
        }
Пример #17
0
        public LanguageListModel GetAllLanguage(LanguageListModel language)
        {
            LanguageListModel languageListModel = new LanguageListModel();
            if (TokenManager.CheckToken(language._tenantName, language._token))
            {
                languageListModel = this.commonRepository.GetAllLanguage(language);
                return languageListModel;
            }
            else
            {
                languageListModel._failure = true;
                languageListModel._message = TOKENINVALID;
                return languageListModel;
            }

        }
Пример #18
0
        public CityListModel GetAllCitiesByState(CityListModel city)
        {
            CityListModel cityListModel = new CityListModel();
            if (TokenManager.CheckToken(city._tenantName, city._token))
            {
                cityListModel = this.commonRepository.GetAllCitiesByState(city);
                return cityListModel;
            }
            else
            {
                cityListModel._failure = true;
                cityListModel._message = TOKENINVALID;
                return cityListModel;
            }

        }
Пример #19
0
        public StateListModel GetAllStatesByCountry(StateListModel state)
        {
            StateListModel stateListModel = new StateListModel();
            if (TokenManager.CheckToken(state._tenantName, state._token))
            {
                stateListModel = this.commonRepository.GetAllStatesByCountry(state);
                return stateListModel;
            }
            else
            {
                stateListModel._failure = true;
                stateListModel._message = TOKENINVALID;
                return stateListModel;
            }

        }
Пример #20
0
        public CountryListModel GetAllCountries(CountryListModel country)
        {
            CountryListModel countryListModel = new CountryListModel();
            if (TokenManager.CheckToken(country._tenantName, country._token))
            {
                countryListModel = this.commonRepository.GetAllCountries(country);
                return countryListModel;
            }
            else
            {
                countryListModel._failure = true;
                countryListModel._message = TOKENINVALID;
                return countryListModel;
            }

        }
Пример #21
0
        public SchoolAddViewModel ViewSchool(SchoolAddViewModel schools)
        {
            SchoolAddViewModel SchoolAddViewModel = new SchoolAddViewModel();

            if (TokenManager.CheckToken(schools._tenantName, schools._token))
            {
                SchoolAddViewModel = this.schoolRepository.ViewSchool(schools);
                //return getAllSchools();
                return(SchoolAddViewModel);
            }
            else
            {
                SchoolAddViewModel._failure = true;
                SchoolAddViewModel._message = TOKENINVALID;
                return(SchoolAddViewModel);
            }
        }
Пример #22
0
        /// <summary>
        /// Service layer For View Section
        /// </summary>
        /// <param name="section"></param>
        /// <returns></returns>
        public SectionAddViewModel ViewSection(SectionAddViewModel section)
        {
            SectionAddViewModel sectionView = new SectionAddViewModel();

            if (TokenManager.CheckToken(section._tenantName, section._token))
            {
                sectionView = this.sectionRepository.ViewSection(section);

                return(sectionView);
            }
            else
            {
                sectionView._failure = true;
                sectionView._message = TOKENINVALID;
                return(sectionView);
            }
        }
Пример #23
0
        public NoticeListViewModel GetAllNotice(NoticeListViewModel noticeList)
        {
            NoticeListViewModel getAllNoticeList = new NoticeListViewModel();

            if (TokenManager.CheckToken(noticeList._tenantName + noticeList._userName, noticeList._token))
            {
                getAllNoticeList = this.noticeRepository.GetAllNotice(noticeList);
                return(getAllNoticeList);
            }
            else
            {
                getAllNoticeList          = null;
                getAllNoticeList._failure = true;
                getAllNoticeList._message = TOKENINVALID;
                return(getAllNoticeList);
            }
        }
Пример #24
0
        public NoticeAddViewModel ViewNotice(NoticeAddViewModel notice)
        {
            NoticeAddViewModel noticeAddViewModel = new NoticeAddViewModel();

            if (TokenManager.CheckToken(notice._tenantName + notice._userName, notice._token))
            {
                noticeAddViewModel = this.noticeRepository.ViewNotice(notice);
                //return getAllSchools();
                return(noticeAddViewModel);
            }
            else
            {
                noticeAddViewModel._failure = true;
                noticeAddViewModel._message = TOKENINVALID;
                return(noticeAddViewModel);
            }
        }
Пример #25
0
        /// <summary>
        /// Service layer For Editing/Updating Section
        /// </summary>
        /// <param name="section"></param>
        /// <returns></returns>

        public SectionAddViewModel UpdateSection(SectionAddViewModel section)
        {
            SectionAddViewModel sectionUpdate = new SectionAddViewModel();

            if (TokenManager.CheckToken(section._tenantName + section._userName, section._token))
            {
                sectionUpdate = this.sectionRepository.UpdateSection(section);

                return(sectionUpdate);
            }
            else
            {
                sectionUpdate._failure = true;
                sectionUpdate._message = TOKENINVALID;
                return(sectionUpdate);
            }
        }
Пример #26
0
        /// <summary>
        /// Get Room By Id
        /// </summary>
        /// <param name="room"></param>
        /// <returns></returns>
        public RoomAddViewModel ViewRoom(RoomAddViewModel room)
        {
            RoomAddViewModel roomAddViewModel = new RoomAddViewModel();

            if (TokenManager.CheckToken(room._tenantName + room._userName, room._token))
            {
                roomAddViewModel = this.roomRepository.ViewRoom(room);
                //return getAllSection();
                return(roomAddViewModel);
            }
            else
            {
                roomAddViewModel._failure = true;
                roomAddViewModel._message = TOKENINVALID;
                return(roomAddViewModel);
            }
        }
Пример #27
0
        /// <summary>
        /// Get All parent Info
        /// </summary>
        /// <param name="pageResult"></param>
        /// <returns></returns>
        public GetAllParentInfoListForView GetAllParentInfoList(PageResult pageResult)
        {
            logger.Info("Method getAllParentInfoList called.");
            GetAllParentInfoListForView parentInfoList = new GetAllParentInfoListForView();

            try
            {
                if (TokenManager.CheckToken(pageResult._tenantName + pageResult._userName, pageResult._token))
                {
                    parentInfoList = this.parentInfoRepository.GetAllParentInfoList(pageResult);
                    if (parentInfoList.parentInfoForView.Count > 0)
                    {
                        parentInfoList._message = SUCCESS;
                        parentInfoList._failure = false;
                    }
                    else
                    {
                        parentInfoList._message = "NO RECORD FOUND";
                        parentInfoList._failure = true;
                    }
                    logger.Info("Method getAllParentInfoList end with success.");
                }

                else
                {
                    parentInfoList._failure = true;
                    parentInfoList._message = TOKENINVALID;
                    return(parentInfoList);
                }
            }
            catch (Exception ex)
            {
                parentInfoList._message = ex.Message;
                parentInfoList._failure = true;
                logger.Error("Method getAllParentInfoList end with error :" + ex.Message);
            }


            return(parentInfoList);
        }
Пример #28
0
        /// <summary>
        /// Get All Student With Pagination,sorting,searching
        /// </summary>
        /// <param name="pageResult"></param>
        /// <returns></returns>

        public StudentListModel GetAllStudentList(PageResult pageResult)
        {
            logger.Info("Method getAllStudentList called.");
            StudentListModel studentList = new StudentListModel();

            try
            {
                if (TokenManager.CheckToken(pageResult._tenantName + pageResult._userName, pageResult._token))
                {
                    studentList = this.studentRepository.GetAllStudentList(pageResult);
                    if (studentList.studentMaster.Count > 0)
                    {
                        studentList._message = SUCCESS;
                        studentList._failure = false;
                    }
                    else
                    {
                        studentList._message = "NO RECORD FOUND";
                        studentList._failure = true;
                    }
                    logger.Info("Method getAllStudentList end with success.");
                }

                else
                {
                    studentList._failure = true;
                    studentList._message = TOKENINVALID;
                    return(studentList);
                }
            }
            catch (Exception ex)
            {
                studentList._message = ex.Message;
                studentList._failure = true;
                logger.Error("Method getAllStudent end with error :" + ex.Message);
            }

            return(studentList);
        }
Пример #29
0
        /// <summary>
        /// Update Permission Group
        /// </summary>
        /// <param name="permissionGroupAddViewModel"></param>
        /// <returns></returns>
        public PermissionGroupAddViewModel UpdatePermissionGroup(PermissionGroupAddViewModel permissionGroupAddViewModel)
        {
            PermissionGroupAddViewModel permissionGroupUpdate = new PermissionGroupAddViewModel();

            try
            {
                if (TokenManager.CheckToken(permissionGroupAddViewModel._tenantName + permissionGroupAddViewModel._userName, permissionGroupAddViewModel._token))
                {
                    permissionGroupUpdate = this.roleBasedAccessRepository.UpdatePermissionGroup(permissionGroupAddViewModel);
                }
                else
                {
                    permissionGroupUpdate._failure = true;
                    permissionGroupUpdate._message = TOKENINVALID;
                }
            }
            catch (Exception es)
            {
                permissionGroupUpdate._failure = true;
                permissionGroupUpdate._message = es.Message;
            }
            return(permissionGroupUpdate);
        }
Пример #30
0
        /// <summary>
        /// Get All Role Permission
        /// </summary>
        /// <param name="rolePermissionListViewModel"></param>
        /// <returns></returns>
        public RolePermissionListViewModel GetAllRolePermission(RolePermissionListViewModel rolePermissionListViewModel)
        {
            RolePermissionListViewModel rolePermissionListView = new RolePermissionListViewModel();

            try
            {
                if (TokenManager.CheckToken(rolePermissionListViewModel._tenantName + rolePermissionListViewModel._userName, rolePermissionListViewModel._token))
                {
                    rolePermissionListView = this.roleBasedAccessRepository.GetAllRolePermission(rolePermissionListViewModel);
                }
                else
                {
                    rolePermissionListView._failure = true;
                    rolePermissionListView._message = TOKENINVALID;
                }
            }
            catch (Exception es)
            {
                rolePermissionListView._failure = true;
                rolePermissionListView._message = es.Message;
            }
            return(rolePermissionListView);
        }