Ejemplo n.º 1
0
        protected void btnOk_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(txtUserName.Text) && !string.IsNullOrEmpty(txtPassword.Text))
            {
                BLL.PersonBiz biz = new BLL.PersonBiz();

                var res = biz.UserAuthen(txtUserName.Text, txtPassword.Text, false, "");
                if (res.IsError)
                {
                    UCModalPopupError.ShowMessageError = res.ErrorMsg;

                    UCModalPopupError.ShowModalError();
                    UpdatePanelForgetPassword.Update();
                    return;
                }
                else
                {
                    if (ViewState["filepath"] != null)
                    {
                        Response.Redirect(String.Format("~/UserControl/ViewFile.aspx?targetImage={0}", CryptoBase64.Encryption(ViewState["filepath"].ToString())));
                    }

                    return;
                }
            }
            else
            {
                UCModalPopupError.ShowMessageError = SysMessage.PleaseInputFill;
                UCModalPopupError.ShowModalError();
                UpdatePanelForgetPassword.Update();
            }
        }
Ejemplo n.º 2
0
        protected void btnOk_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(txtUserName.Text) && !string.IsNullOrEmpty(txtConfirmEmail.Text))
            {
                BLL.PersonBiz biz = new BLL.PersonBiz();

                var res = biz.ForgetPasswordRequest(txtUserName.Text, txtConfirmEmail.Text);
                if (res.IsError)
                {
                    UCModalPopupError.ShowMessageError = res.ErrorMsg;

                    UCModalPopupError.ShowModalError();
                    UpdatePanelForgetPassword.Update();
                    return;
                }
                else
                {
                    txtConfirmEmail.Text = "";
                    txtUserName.Text     = "";
                    UCModalPopupSuccess.ShowMessageSuccess = SysMessage.ConfirmChangePasswordMail;
                    UCModalPopupSuccess.ShowModalSuccess();
                    UpdatePanelForgetPassword.Update();
                    return;
                }
            }
            else
            {
                UCModalPopupError.ShowMessageError = SysMessage.PleaseInputFill;
                UCModalPopupError.ShowModalError();
                UpdatePanelForgetPassword.Update();
            }
        }