Esempio n. 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);
            }
        }
Esempio n. 2
0
        protected void lbtnEditPassword_Click(object sender, EventArgs e)
        {
            GridViewRow gr = (GridViewRow)((LinkButton)sender).NamingContainer;
            string      id = ((Label)gr.FindControl("lblUserID")).Text;

            SetPopupEditPassword(id);
            PopupEditPassword.Show();
        }
Esempio n. 3
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();
     }
 }
Esempio n. 4
0
 protected void btnPwdCancel_Click(object sender, EventArgs e)
 {
     PopupEditPassword.Hide();
 }