protected void ButtonOk_Click(object sender, EventArgs e)
    {
        string strEncryptedPassword = "";

        try
        {
            Streamline.UserBusinessServices.MedicationLogin objLogIn = new Streamline.UserBusinessServices.MedicationLogin();
            strEncryptedPassword = Streamline.BaseLayer.CommonFunctions.GetEncryptedData(TextBoxNewPassword.Text);
            objLogIn.ChangePassword(TextBoxChangePasswordUserName.Text, strEncryptedPassword, loginStatus);
            ScriptManager.RegisterStartupScript(LabelConfirmPassword, LabelConfirmPassword.GetType(), "key", "SetNewValues('" + TextBoxNewPassword.Text + "');", true);
        }
        catch
        {
            ScriptManager.RegisterClientScriptBlock(lblError, lblError.GetType(), "key", "javascript:alert('Could not change Password.')", true);
        }
    }
Esempio n. 2
0
 protected void ButtonCancel_Click(object sender, EventArgs e)
 {
     cancelled = 1;
     ScriptManager.RegisterStartupScript(LabelConfirmPassword, LabelConfirmPassword.GetType(), "key", "CloseWindow();", true);
 }