示例#1
0
        protected void btnPwdSave_Click(object sender, EventArgs e)
        {
            try
            {
                var valid = PasswordValidation();
                if (valid.IsError)
                {
                    MessageBoxError(valid.ErrorMsg);
                }
                else
                {
                    BLL.AccountBiz biz = new AccountBiz();
                    DTO.User       ent = new DTO.User();
                    ent.USER_ID   = lblPwdUserID.Text;
                    ent.USER_PASS = txtNewPassword.Text;

                    var res = biz.ChangePasswordByAdmin(ent, UserProfile);
                    if (!res.IsError)
                    {
                        MessageBoxSuccess(SysMessage.SaveSucess);
                        PopupEditPassword.Hide();
                    }
                    else
                    {
                        MessageBoxError(res.ErrorMsg);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBoxError(ex.Message);
            }
        }
示例#2
0
 protected void SetPopupEditPassword(string id)
 {
     try
     {
         AccountBiz biz = new AccountBiz();
         var        res = biz.GetAccountDetailById(id);
         if (res.DataResponse != null)
         {
             var ent = res.DataResponse;
             lblPwdUserID.Text       = ent.ID;
             lblPwdIdCard.Text       = ent.ID_CARD_NO;
             lblPwdNames.Text        = ent.NAMES + " " + ent.LASTNAME;
             lblPwdEmail.Text        = ent.EMAIL;
             lblPwdMemberType.Text   = ent.MEMBER_TYPE == "1" ? NameMemberType1 : ent.MEMBER_TYPE_NAME;
             txtNewPassword.Text     = "";
             txtConfirmPassword.Text = "";
         }
     }
     catch (Exception ex)
     {
         MessageBoxError(ex.Message);
         PopupEditPassword.Hide();
     }
 }
示例#3
0
 protected void btnPwdCancel_Click(object sender, EventArgs e)
 {
     PopupEditPassword.Hide();
 }