public async Task <IHttpActionResult> Post([FromBody] ChangePasswordReq req)
        {
            try
            {
                string errorMessage = "UnknowError";
                string errorCode    = ErrorCodeEnum.UnknownError.ToString();
                #region token
                var header = Request.Headers;
                if (header.Authorization == null)
                {
                    return(StatusCode(HttpStatusCode.Unauthorized));
                }
                var      token = header.Authorization.Parameter;
                UserInfo userInfo;
                if (string.IsNullOrWhiteSpace(token) || !TokenManager.ValidateToken(token, out userInfo))
                {
                    return(StatusCode(HttpStatusCode.Unauthorized));
                }
                // chi co admin moi co quyen tao tai khoan khac
                if (!Operator.HasPermision(userInfo.IdUserLogin, RoleDefinitionEnum.CreateUser))
                {
                    return(Ok(new RequestErrorCode(false, ErrorCodeEnum.Error_NotHavePermision.ToString(), "Khong co quyen tao user")));
                }
                #endregion

                #region Validate
                if (!Validate(req, out errorCode, out errorMessage))
                {
                    return(Ok(new RequestErrorCode(false, errorCode, errorMessage)));
                }
                #endregion
                #region Process
                // lay ra userInfo tuong ung
                var userChange = MemoryInfo.GetListUserLoginByField(req.Username, UserLogin.UserLoginFields.Username)
                                 .FirstOrDefault();
                if (userChange == null)
                {
                    return(Ok(new RequestErrorCode(false, ErrorCodeEnum.Error_UserNotExist.ToString(), "Khong ton tai user")));
                }
                // check password
                var oldPassEncrypt = PasswordGenerator.EncodePassword(req.Password);
                if (userChange.Password != oldPassEncrypt)
                {
                    return(Ok(new RequestErrorCode(false, ErrorCodeEnum.Error_PasswordWrong.ToString(), "Sai password")));
                }

                var newPassEncrypt = PasswordGenerator.EncodePassword(req.NewPassword);
                userChange.Password = newPassEncrypt;
                UpdateEntitySql updateEntitySql = new UpdateEntitySql();
                var             lstCommand      = new List <EntityCommand>();
                lstCommand.Add(new EntityCommand {
                    BaseEntity = new Entity.Entity(userChange), EntityAction = EntityAction.Update
                });
                bool isOkDone = updateEntitySql.UpdateDefault(lstCommand);
                if (!isOkDone)
                {
                    return(Ok(new RequestErrorCode(false, errorCode, errorMessage)));
                }
                #endregion
                // update memory
                MemorySet.UpdateAndInsertEntity(userChange);
                var result = new RequestErrorCode(true);
                return(Ok(result));
            }
            catch (Exception ex)
            {
                Logger.Write(ex.ToString());
            }

            Logger.Write("--------------------ErrorCodeEnum.Unknow---------------------------------");
            return(BadRequest("Unknow"));
        }