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", })); }
public async Task <IActionResult> Create(ClassificationPageSectionCreateGet ClassificationPageSection) { var token = HttpContext.Session.GetString("Token"); if (token == null) { return(RedirectToAction("Login", "FrontAuth")); } await _client.PostProtectedAsync <ClassificationPageSectionCreateGet>($"{_baseUrl}api/ClassificationPageSection/Create", ClassificationPageSection, token); return(RedirectToAction("Index", new { id = ClassificationPageSection.ClassificationPageId })); }