public bool UpdatePost(PersonRelationTypeUpdateGet PersonRelationType) { string usp = "usp_PersonRelationTypeUpdatePost @PersonRelationTypeId, @Name, @Description, @MenuName, @MouseOver, @FromIsAnXOfTo, @ToIsAnXOfFrom,@SeePersonal, @Color, @IconId, @ModifierId"; _sqlDataAccess.SaveData <PersonRelationTypeUpdateGet>(usp, PersonRelationType); return(true); }
public async Task <List <ErrorMessage> > UpdatePostCheck(PersonRelationTypeUpdateGet PersonRelationType) { string usp = "usp_PersonRelationTypeUpdatePostCheck @PersonRelationTypeId, @Name, @Description, @MenuName, @MouseOver, @FromIsAnXOfTo, @ToIsAnXOfFrom,@SeePersonal, @Color, @IconId, @ModifierId"; var ErrorMessages = await _sqlDataAccess.LoadData <ErrorMessage, dynamic>(usp, PersonRelationType); return(ErrorMessages); }
public async Task <IActionResult> Edit(PersonRelationTypeUpdateGet PersonRelationType) { var token = HttpContext.Session.GetString("Token"); if (token == null) { return(RedirectToAction("Login", "FrontAuth")); } var PersonRelationTypeUpdateGetWithErrorMessages = await _client.PostProtectedAsync <PersonRelationTypeUpdateGetWithErrorMessages>($"{_configuration["APIUrl"]}api/ClassificationLevelProperty/Update", PersonRelationType, token); if (PersonRelationTypeUpdateGetWithErrorMessages.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 = PersonRelationTypeUpdateGetWithErrorMessages.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/ClassificationLevelProperty/Edit", token); //ViewBag.Env = _hostingEnv.EnvironmentName; //ViewBag.ErrorMessages = PersonRelationTypeUpdateGetWithErrorMessages.ErrorMessages; return(View(PersonRelationTypeUpdateGetWithErrorMessages.PersonRelationType)); } return(RedirectToAction("Index")); }
public async Task <IActionResult> Update(PersonRelationTypeUpdateGet PersonRelationType) { var CurrentUser = await _userManager.GetUserAsync(User); if (await _claimCheck.CheckClaim(CurrentUser, "ApplicationRight", this.ControllerContext.RouteData.Values["controller"].ToString() + "\\" + this.ControllerContext.RouteData.Values["action"].ToString())) { PersonRelationType.UserId = CurrentUser.Id; //var CheckString = await _PersonProvider.UpdatePostCheck(Person); //if (CheckString.Length == 0) //{ _personRelationTypeProvider.UpdatePost(PersonRelationType); return(Ok(PersonRelationType)); //} return(BadRequest(new { IsSuccess = false, //Message = CheckString, })); } return(BadRequest(new { IsSuccess = false, Message = "No rights", })); }
private async Task <PersonRelationTypeUpdateGet> UpdateAddDropDownBoxes(PersonRelationTypeUpdateGet PersonRelationType, string UserId) { return(PersonRelationType); }