Пример #1
0
 /// <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);
 }
Пример #2
0
        public ActionResult <MyBooleanResult> ChangeUserName([FromBody] UpdateUserName user)
        {
            MyBooleanResult res = new MyBooleanResult
            {
                ResultValue = _userBL.ChangeUserName(user)
            };

            return(res);
        }
Пример #3
0
 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);
     }
 }
Пример #4
0
 public IActionResult Put([FromServices] UpdateUserNameHandler updateUserNameHandler,
                          UpdateUserName request)
 {
     return(RequestHandler.HandleRequest(request, updateUserNameHandler.Handle));
 }