Example #1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            string strPwd = Request.QueryString["Pwd"].ToString();
            //string strEnyPwd  = EncryptionDecption.DataEncryption_Decryption.EncryptString(strPwd, true);
            string strEnyPwd = DataEncrypt_Decrypt.EncryptString(strPwd, true);
            string strMail   = Request.QueryString["Mail"].ToString();
            BusinessGeneralMaster BGeneralMaster = new BusinessGeneralMaster();

            BGeneralMaster.UnlockUser(strMail, strEnyPwd);
            Session["HelpFile"] = "../Help/LockUser.htm";
        }
Example #2
0
        protected void btnSumbit_Click(object sender, System.EventArgs e)
        {
            Page.Validate();
            if (Page.IsValid)
            {
                rfvConfPass.Enabled = true;
                if (txtCfmPassword.Text.Trim().Length == 0)
                {
                    GeneralTools.MessageBox.ShowMessage(Common.CommonFunctions.GetResourceValue("en-US", "ER78"));
                    return;
                }


                BusinessChangePassword objBusinessChangePassword = new BusinessChangePassword();
                try
                {
                    //objBusinessChangePassword.OldPassword = EncryptionDecption.DataEncryption_Decryption.EncryptString(txtOldPassword.Text.Trim(),true);
                    //objBusinessChangePassword.NewPassword = EncryptionDecption.DataEncryption_Decryption.EncryptString(txtNewPassword.Text.Trim(),true);
                    //objBusinessChangePassword.CfmPassword = EncryptionDecption.DataEncryption_Decryption.EncryptString(txtCfmPassword.Text.Trim(),true);
                    objBusinessChangePassword.OldPassword = DataEncrypt_Decrypt.EncryptString(txtOldPassword.Text.Trim(), true);
                    objBusinessChangePassword.NewPassword = DataEncrypt_Decrypt.EncryptString(txtNewPassword.Text.Trim(), true);
                    objBusinessChangePassword.CfmPassword = DataEncrypt_Decrypt.EncryptString(txtCfmPassword.Text.Trim(), true);
                    objBusinessChangePassword.ChangePassword();
                    if (objBusinessChangePassword.Message == "")
                    {
                        //Session["Msg"] = "Password Changed Successfully";
                        Session["Msg"] = Common.CommonFunctions.GetResourceValue("en-US", "ER7");
                        Response.Redirect("../ErrorPages/frmOperationSuccess.aspx");
                        //GeneralTools.MessageBox.ShowMessage("Password Changed Successfully");
                        //Response.Redirect("Welcome.htm");
                    }
                    else
                    {
                        GeneralTools.MessageBox.ShowMessage(objBusinessChangePassword.Message);
                    }
                }
                catch (Exception ex)
                {
                    if (ex.Message != "Thread was being aborted.")
                    {
                        GeneralTools.ExceptionLogger.ExceptionLog(ex);
                        Response.Redirect("../ErrorPages/ErrorPage.aspx");
                    }
                }
            }
        }