private async Task <PageSectionContentConditionCreateGet> CreateAddDropDownBoxes(PageSectionContentConditionCreateGet PageSectionContentCondition, string UserId, int PageSectionId) { PageSectionContentCondition.PageSectionContentConditionTypes = await _pageSectionContentConditionTypeProvider.ListExtended(UserId); PageSectionContentCondition.Users = await _userProvider.List(); PageSectionContentCondition.Projects = await _projectProvider.List(UserId); PageSectionContentCondition.ContentTypes = await _contentTypeProvider.List(UserId); PageSectionContentCondition.ContentStatuses = await _contentStatusProvider.List(UserId); PageSectionContentCondition.Languages = await _languageProvider.List(UserId); PageSectionContentCondition.SecurityLevels = await _securityLevelProvider.List(UserId); PageSectionContentCondition.Classifications = await _pageSectionContentConditionProvider.CreateGetClassifications(UserId); for (int i = 0; i < PageSectionContentCondition.Classifications.Count(); i++) { PageSectionContentCondition.Classifications[i].ClassificationValues = await _pageSectionContentConditionProvider.CreateGetClassificationValues(UserId, PageSectionContentCondition.Classifications[i].ClassificationId); } PageSectionContentCondition.PageSectionId = PageSectionId; var SortBys = await _masterListProvider.SortByList(UserId); return(PageSectionContentCondition); }
public async Task <IActionResult> ContentNew(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 ContentNew = new FrontContentContentNew(); ContentNew = await _frontContentProvider.ContentNewGetContentType(Id); ContentNew.ContentTypeId = Id; ContentNew.Organizations = await _organizationProvider.ListofUser(CurrentUser.Id); ContentNew.Projects = await _projectProvider.ListofUser(CurrentUser.Id); ContentNew.Languages = await _languageProvider.ActiveList(CurrentUser.Id); ContentNew.SecurityLevels = await _securityLevelProvider.ListofUser(CurrentUser.Id); ContentNew.ContentStatuses = await _contentStatusProvider.List(CurrentUser.Id); ContentNew.Classifications = await _frontContentProvider.NewClassifications(CurrentUser.Id, Id); ContentNew.ContentTypeName = await _contentTypeProvider.ReturnName(CurrentUser.Id, Id); ContentNew.OrganizationId = ContentNew.Organizations.First().OrganizationId; foreach (var Classification in ContentNew.Classifications) { Classification.ClassificationLevels = await _frontContentProvider.NewClassificationLevels(Classification.ClassificationId); foreach (var Classificationlevel in Classification.ClassificationLevels) { Classificationlevel.ClassificationValues = await _frontContentProvider.NewClassificationValues(CurrentUser.Id, Classification.ClassificationId, Classificationlevel.Sequence, Classificationlevel.Alphabetically); } } return(Ok(ContentNew)); } return(BadRequest(new { IsSuccess = false, Message = "No rights", })); }