Exemple #1
0
        public async Task <JsonResult> UpdateUserPass([FromBody] UserPassInput model)
        {
            //修改密码前的接口实现
            var ajaxResponse = await _accounExtens.UpdateUserPassExtension(model);

            //原接口调用的业务
            //var ajaxResponse = await _userInfoAppService.UpdateUserPass(model);
            return(Json(ajaxResponse));
        }
Exemple #2
0
        //event handler for the login button
        private void LoginButton_Click(object sender, EventArgs e)
        {
            Password = UserPassInput.Text;   //gets the user input(password)

            Validpassword = "******"; //correct password

            //if password entered is incorrect and the user still has more than zero attempts
            if (!Password.Equals(Validpassword) && Trials > 0)
            {
                Trials--;//decrements the number of attempts on each trial

                WarningMessage = "Wrong Password: you have " + Trials + " attempts left";
                MessageBox.Show(WarningMessage, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);

                UserPassInput.Focus();
                UserPassInput.SelectAll();
            }
            else if (!Password.Equals("iLoveVisualC#") && Trials == 0) //if the user doesn't meet the
                                                                       //the two conditions
            {
                MessageBox.Show("Too Many Wrong Passwords, Exiting now", "Error", MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
                this.Close();
            }
            else
            {
                //enables the following
                WorkshopAndLocationGB.Visible = true; //workshop Groupbox
                BookingDetailsGB.Visible      = true; //booking details groupbox
                DisplayButton.Visible         = true;
                ClearButton.Visible           = true;
                ExitButton.Visible            = true;
                BookingButton.Visible         = true;
                SummaryButton.Visible         = true;
                OptionalSelectionGB.Visible   = true;//option selection groupbox

                //makes the password screen invisible if password is correct
                PasswordPanel.Visible = false;
            }
        }
 /// <summary>
 /// 个人设置-修改账户密码
 /// </summary>
 /// <returns></returns>
 public override async Task <AjaxResponse> UpdateUserPassExtension(UserPassInput model)
 {
     /*扩展执行修改密码前的业务*/
     return(await base.UpdateUserPassExtension(model));
 }
        public async Task <JsonResult> UpdateUserPass(UserPassInput model)
        {
            var ajaxResponse = await _userInfoAppService.UpdateUserPass(model);

            return(Json(ajaxResponse));
        }