protected void Button1_Click(object sender, EventArgs e)
        {
            ChangePasssword changePassword = new ChangePasssword();
            changePassword.EmailId = TextBox1.Text;
            changePassword.OldPassword = TextBox2.Text;
            changePassword.NewPassword = TextBox4.Text;
            var empResponse = changePassword.UpdatePassword(changePassword);

            if (empResponse.StatusCode != "200")
            {
                Label5.Text = "Failure!!";
                return;
            }
            Label5.Text = "Password Changed!!";
        }
Пример #2
0
 public Status UpdatePassword(ChangePasssword changePassword)
 {
     HttpClient client = new HttpClient();
     var empResponse = client.UploadData<ChangePasssword, Result>(_emsUri + "/update", changePassword);
     return empResponse.Status;
 }