Exemple #1
0
 private void btnSubmit_Click(object sender, EventArgs e)
 {
     if (txtPwd.Text == "")
     {
         MessageBox.Show("密码不能为空!");
         return;
     }
     if (txtPwd.Text != txtCfmPwd.Text)
     {
         MessageBox.Show("两次输入的密码不相同!");
         return;
     }
     editUser.user_pwd = Maticsoft.Common.PasswordEncrypt.EncryptDES(txtPwd.Text);
     BLL.user_info userBll = new BLL.user_info();
     userBll.Update(editUser);
     MessageBox.Show("修改成功!");
     this.Close();
 }
Exemple #2
0
 private void btnSubmit_Click(object sender, EventArgs e)
 {
     if (txtUserName.Text.Trim() == "")
     {
         MessageBox.Show("用户名不能为空!");
         return;
     }
     BLL.user_info   userBll   = new BLL.user_info();
     Model.user_info userModel = userBll.GetModel(txtUserName.Text.Trim());
     if (userModel != null && userModel.user_id != this.editUser.user_id)
     {
         MessageBox.Show("用户名已存在!");
         return;
     }
     editUser.user_name    = txtUserName.Text.Trim();
     editUser.user_tel     = txtUserTel.Text.Trim();
     editUser.user_isadmin = rdBtnYes.Checked;
     editUser.user_email   = txtUserEmail.Text.Trim();
     editUser.user_remark  = rchTxtUserRemark.Text.Trim();
     userBll.Update(editUser);
     MessageBox.Show("修改成功!");
     this.Close();
 }