📄 editpas.cpp
字号:
// EditPas.cpp : implementation file
//
#include "stdafx.h"
#include "横店集团保卫人员管理系统.h"
#include "EditPas.h"
#include "yonghu.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CString InitName;
extern CString InitPas;
/////////////////////////////////////////////////////////////////////////////
// CEditPas dialog
CEditPas::CEditPas(CWnd* pParent /*=NULL*/)
: CDialog(CEditPas::IDD, pParent)
{
//{{AFX_DATA_INIT(CEditPas)
m_name = _T("");
m_ypas = _T("");
m_xpas = _T("");
m_rpas = _T("");
//}}AFX_DATA_INIT
}
void CEditPas::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CEditPas)
DDX_Text(pDX, IDC_EDIT1, m_name);
DDX_Text(pDX, IDC_EDIT2, m_ypas);
DDX_Text(pDX, IDC_EDIT3, m_xpas);
DDX_Text(pDX, IDC_EDIT4, m_rpas);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CEditPas, CDialog)
//{{AFX_MSG_MAP(CEditPas)
ON_BN_CLICKED(IDC_BUTTON1, OnSure)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CEditPas message handlers
void CEditPas::OnSure()
{
UpdateData(true);
if(InitPas==m_ypas)
{
if(m_xpas==m_rpas)
{
CYonghu y;
y.m_strFilter="用户名='"+InitName+"'";
y.Open();
y.Edit();
y.m_pas=m_xpas;
y.Update();
y.Close();
MessageBox("修改成功");
this->OnOK();
}
else
MessageBox("两次密码输入不同,请重新输入");
}
else
MessageBox("原密码错误");
}
BOOL CEditPas::OnInitDialog()
{
CDialog::OnInitDialog();
this->m_name=InitName;
UpdateData(false);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -