📄 mdifypwd.cpp
字号:
// MdifyPWD.cpp : implementation file
//
#include "stdafx.h"
#include "短信群发.h"
#include "MdifyPWD.h"
#include "into.h";
#include "UserDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMdifyPWD dialog
CMdifyPWD::CMdifyPWD(CWnd* pParent /*=NULL*/)
: CDialog(CMdifyPWD::IDD, pParent)
{
//{{AFX_DATA_INIT(CMdifyPWD)
m_authority = _T("");
m_newPwd = _T("");
m_oldPwd = _T("");
m_userName = _T("");
//}}AFX_DATA_INIT
}
void CMdifyPWD::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMdifyPWD)
DDX_CBString(pDX, IDC_AUTHORITY, m_authority);
DDX_Text(pDX, IDC_NEWPWD, m_newPwd);
DDX_Text(pDX, IDC_OLDPWD, m_oldPwd);
DDX_Text(pDX, IDC_USERNAME, m_userName);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMdifyPWD, CDialog)
//{{AFX_MSG_MAP(CMdifyPWD)
ON_BN_CLICKED(IDC_MODIFLYPWD, OnModiflypwd)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMdifyPWD message handlers
void CMdifyPWD::OnModiflypwd()
{
CADORecordset record;
BOOL ret;
CString strTemp;
CString strSQL=_T("");
UpdateData();
ret=pub.pwdCheck(m_newPwd,12);
if (!ret)
{
return;
}
strSQL.Format("update USERS set PASSWD = '%s' where USERNAME = '%s' ",m_newPwd,m_userName);
ret=record.Open(db.m_pConnection,strSQL,0);
if (ret)
{
if (pub.m_strUserName==m_userName)
{
pub.m_strpwd=m_newPwd;
}
if (!mark)
{
m_newPwd=_T("");
CUserDialog * theUser = (CUserDialog *)(GetParent()->GetParent());
theUser->printList();
}
else
{
CUserDialog * theUser = (CUserDialog *)(GetParent()->GetParent());
theUser->printList1();
}
record.Close();
}
else
{
AfxMessageBox("数据更新失败!");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -