public bool UpdatePost(ClassificationValuePropertyUpdateGet ClassificationValueProperty) { string usp = "usp_ClassificationValuePropertyUpdatePost @ClassificationValuePropertyId, @PropertyInt, @PropertyBool, @PropertyDate, @PropertyString, @PropertyValueId, @UserId"; _sqlDataAccess.SaveData <ClassificationValuePropertyUpdateGet>(usp, ClassificationValueProperty); return(true); }
public async Task <List <ErrorMessage> > UpdatePostCheck(ClassificationValuePropertyUpdateGet ClassificationValueProperty) { string usp = "usp_ClassificationValuePropertyUpdatePostCheck @ClassificationValuePropertyId, @PropertyInt, @PropertyBool, @PropertyDate, @PropertyString, @PropertyValueId, @UserId"; var ErrorMessages = await _sqlDataAccess.LoadData <ErrorMessage, dynamic>(usp, ClassificationValueProperty); return(ErrorMessages); }
public async Task <IActionResult> Edit(ClassificationValuePropertyUpdateGet ClassificationValueProperty) { var token = HttpContext.Session.GetString("Token"); if (token == null) { return(RedirectToAction("Login", "FrontAuth")); } var ClassificationValuePropertyUpdateGetWithErrorMessage = await _client.PostProtectedAsync <ClassificationValuePropertyUpdateGetWithErrorMessages>($"{_configuration["APIUrl"]}api/ClassificationValueProperty/Update", ClassificationValueProperty, token); if (ClassificationValuePropertyUpdateGetWithErrorMessage.ErrorMessages.Count > 0) { var AllStuff = await _loadViewBagModel.ViewBagLoad(this.ControllerContext.RouteData.Values["controller"].ToString(), this.ControllerContext.RouteData.Values["action"].ToString(), token, _hostingEnv.EnvironmentName, _configuration, false, 0, ""); AllStuff.ErrorMessages = ClassificationValuePropertyUpdateGetWithErrorMessage.ErrorMessages; ViewBag.AllStuff = AllStuff; //ViewBag.Favorites = await _client.GetProtectedAsync<List<MVCFavoriteMenu>>($"{_configuration["APIUrl"]}api/MVCFavorite/Menu", token); //ViewBag.FavoriteGroupList = await _client.GetProtectedAsync<List<MVCFavoriteGroupList>>($"{_configuration["APIUrl"]}api/MVCFavorite/GroupList", token); //ViewBag.UITerms = await _client.GetProtectedAsync<List<UITermLanguageCustomizationList>>($"{_configuration["APIUrl"]}api/MVC/ClassificationValueProperty/Edit", token); //ViewBag.Env = _hostingEnv.EnvironmentName; //ViewBag.ErrorMessages = ClassificationValuePropertyUpdateGetWithErrorMessage.ErrorMessages; return(View(ClassificationValuePropertyUpdateGetWithErrorMessage.ClassificationValueProperty)); } return(RedirectToAction("Index", new { id = ClassificationValueProperty.ClassificationValueId })); }
public async Task <IActionResult> Update(ClassificationValuePropertyUpdateGet ClassificationValueProperty) { var CurrentUser = await _userManager.GetUserAsync(User); var ErrorMessages = new List <ErrorMessage>(); if (await _claimCheck.CheckClaim(CurrentUser, "ApplicationRight", this.ControllerContext.RouteData.Values["controller"].ToString() + "\\" + this.ControllerContext.RouteData.Values["action"].ToString())) { ErrorMessages = await _classificationValuePropertyProvider.UpdatePostCheck(ClassificationValueProperty); if (ErrorMessages.Count > 0) { ClassificationValueProperty = await UpdateAddDropDownBoxes(ClassificationValueProperty, CurrentUser.Id); } else { _classificationValuePropertyProvider.UpdatePost(ClassificationValueProperty); } ClassificationValuePropertyUpdateGetWithErrorMessages ClassificationValuePropertyWithErrorMessage = new ClassificationValuePropertyUpdateGetWithErrorMessages { ClassificationValueProperty = ClassificationValueProperty, ErrorMessages = ErrorMessages }; return(Ok(ClassificationValuePropertyWithErrorMessage)); } ErrorMessages = await _checkProvider.NoRightsMessage(CurrentUser.Id); ClassificationValuePropertyUpdateGetWithErrorMessages ClassificationValuePropertyWithNoRights = new ClassificationValuePropertyUpdateGetWithErrorMessages { ClassificationValueProperty = ClassificationValueProperty, ErrorMessages = ErrorMessages }; return(Ok(ClassificationValuePropertyWithNoRights)); }
private async Task <ClassificationValuePropertyUpdateGet> UpdateAddDropDownBoxes(ClassificationValuePropertyUpdateGet ClassificationValueProperty, string UserId) { var ClassificationRelationTypes = await _classificationRelationTypeProvider.List(UserId); return(ClassificationValueProperty); }