public async Task <IActionResult> Create(int Id) { var CurrentUser = await _userManager.GetUserAsync(User); if (await _claimCheck.CheckClaim(CurrentUser, "ApplicationRight", this.ControllerContext.RouteData.Values["controller"].ToString() + "\\" + this.ControllerContext.RouteData.Values["action"].ToString())) { var ClassificationPageSectionCreateGet = new ClassificationPageSectionCreateGet(); var ClassificationPageSectionCreateGetSequences = await _classificationPageSectionProvider.CreateGetSequence(CurrentUser.Id, Id); var PageSectionTypes = await _pageSectionTypeProvider.List(CurrentUser.Id); var PageSectionDataTypes = await _pageSectionDataTypeProvider.List(CurrentUser.Id); var ContentTypes = await _contentTypeProvider.List(CurrentUser.Id); var SortBys = await _masterListProvider.SortByList(CurrentUser.Id); var UserLanguage = await _masterProvider.UserLanguageUpdateGet(CurrentUser.Id); ClassificationPageSectionCreateGet.LanguageId = UserLanguage.LanguageId; ClassificationPageSectionCreateGet.LanguageName = UserLanguage.Name; ClassificationPageSectionCreateGet.PageSectionDataTypes = PageSectionDataTypes; ClassificationPageSectionCreateGet.PageSectionTypes = PageSectionTypes; ClassificationPageSectionCreateGet.ContentTypes = ContentTypes; ClassificationPageSectionCreateGet.SortBys = SortBys; ClassificationPageSectionCreateGet.ClassificationId = Id; return(Ok(ClassificationPageSectionCreateGet)); } return(BadRequest(new { IsSuccess = false, Message = "No rights", })); }
private async Task <PageSectionCreateGet> CreateAddDropDownBoxes(PageSectionCreateGet PageSection, string UserId, int PageId) { var PageSectionTypes = await _pageSectionTypeProvider.List(UserId); var PageSectionDataTypes = await _pageSectionDataTypeProvider.List(UserId); var ContentTypes = await _contentTypeProvider.List(UserId); var SortBys = await _masterListProvider.SortByList(UserId); var UserLanguage = await _masterProvider.UserLanguageUpdateGet(UserId); PageSection.LanguageId = UserLanguage.LanguageId; PageSection.LanguageName = UserLanguage.Name; PageSection.PageSectionDataTypes = PageSectionDataTypes; PageSection.PageSectionTypes = PageSectionTypes; PageSection.ContentTypes = ContentTypes; PageSection.SortBys = SortBys; PageSection.PageId = PageId; return(PageSection); }