/// <summary> /// Change User name /// </summary> /// <param name="UserId">target user</param> /// <param name="NewName">new name</param> /// <returns>Success status</returns> /// public bool ChangeUserName(UpdateUserName user) { if (IsPropInUse("user__name", user.OldName) && !IsPropInUse("user__name", user.NewName)) { return(SqlConnector.Update("Users", "user__name", $"'{user.NewName}'", $"where user_user_id = {user.UserId}")); } return(false); }
public ActionResult <MyBooleanResult> ChangeUserName([FromBody] UpdateUserName user) { MyBooleanResult res = new MyBooleanResult { ResultValue = _userBL.ChangeUserName(user) }; return(res); }
private void OnSignIn(object obj) { if (!CodeAnalysisServiceClient.SignIn(SignInModel.UserName, SignInModel.Password)) { MessageBox.Show("Invalid Username or Password"); } else { UpdateUserName.Invoke(SignInModel.UserName); Navigate.Invoke(ViewPages.ToolRun); } }
public IActionResult Put([FromServices] UpdateUserNameHandler updateUserNameHandler, UpdateUserName request) { return(RequestHandler.HandleRequest(request, updateUserNameHandler.Handle)); }