Пример #1
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (CheckInfo())
     {
         int        intRet = 0;
         ProxyFrame proxy  = new ProxyFrame();
         intRet = proxy.Service.ChangePassword(txtEmpNo.Text.Trim(), txtOldPW.Text.Trim(), txtNewPW.Text.Trim());
         proxy.Dispose();
         if (intRet > 0)
         {
             DialogBox.Msg("修改密码成功", MessageBoxIcon.Information);
             this.DialogResult = DialogResult.OK;
         }
         else if (intRet == 0)
         {
             DialogBox.Msg("原密码有误", MessageBoxIcon.Information);
         }
         else
         {
             DialogBox.Msg("修改密码失败", MessageBoxIcon.Information);
         }
     }
 }