private async Task <ClassificationLevelCreateGet> CreateAddDropDownBoxes(ClassificationLevelCreateGet ClassificationLevel, string UserId, int ClassificationId) { var ClassificationLevelCreateGetSequences = await _classificationLevelProvider.CreateGetSequence(UserId, ClassificationId); var DateLevels = await _dateLevelProvider.List(UserId); var UserLanguage = await _masterProvider.UserLanguageUpdateGet(UserId); ClassificationLevelCreateGetSequences.Add(new SequenceList { Sequence = ClassificationLevelCreateGetSequences.Count + 1, Name = "Add at the end" }); ClassificationLevel.LanguageId = UserLanguage.LanguageId; ClassificationLevel.LanguageName = UserLanguage.Name; ClassificationLevel.DateLevels = DateLevels; ClassificationLevel.Sequences = ClassificationLevelCreateGetSequences; ClassificationLevel.CodeTypes = await _codeTypeProvider.List(UserId); ClassificationLevel.ClassificationId = ClassificationId; return(ClassificationLevel); }
public async Task <IActionResult> AdvancedSearch() { 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 ClassificationValueSearch = new ClassificationValueAdvancedSearchPost(); ClassificationValueSearch.DateLevels = await _dateLevelProvider.List(CurrentUser.Id); ClassificationValueSearch.Classifications = await _classificationProvider.List(CurrentUser.Id); ClassificationValueSearch.Persons = await _personProvider.List(); return(Ok(ClassificationValueSearch)); } return(BadRequest(new { IsSuccess = false, Message = "No rights", })); }