資源簡介
Visual C++項目開發案例精粹,包含了20多個企業級別的應用,適合中級開發人員學習參考和快速借鑒開發,經典的數據庫案例應用!
代碼片段和文件信息
//?ChangePasswordDlg.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“MedicAdmin.h“
#include?“ChangePasswordDlg.h“
#include?“MainFrm.h“
#include?“MedicAdminDoc.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CChangePasswordDlg?dialog
CChangePasswordDlg::CChangePasswordDlg(CWnd*?pParent?/*=NULL*/)
:?CDialog(CChangePasswordDlg::IDD?pParent)
{
//{{AFX_DATA_INIT(CChangePasswordDlg)
m_account?=?_T(““);
m_password?=?_T(““);
m_password2?=?_T(““);
m_oldPassword?=?_T(““);
//}}AFX_DATA_INIT
}
void?CChangePasswordDlg::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CChangePasswordDlg)
DDX_Text(pDX?IDC_ACCOUNT_EDIT?m_account);
DDX_Text(pDX?IDC_NEW_PASSWORD_EDIT?m_password);
DDX_Text(pDX?IDC_NEW_PASSWORD2_EDIT?m_password2);
DDX_Text(pDX?IDC_OLD_PASSWORD_EDIT?m_oldPassword);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CChangePasswordDlg?CDialog)
//{{AFX_MSG_MAP(CChangePasswordDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CChangePasswordDlg?message?handlers
void?CChangePasswordDlg::OnOK()?
{
//?TODO:?Add?extra?validation?here
UpdateData();
CMainframe*?theFrm=(CMainframe*)AfxGetMainWnd();
CMedicAdminDoc*?pDoc=(CMedicAdminDoc*)theFrm->GetActiveDocument();
CUser*?theUser=&pDoc->theUser;
CUserSet*?theSet=&pDoc->theUserSet;
theSet->m_strFilter=“UserAccount=‘“+theUser->GetAccount()+“‘“;
theSet->Requery();
if(m_oldPassword==theUser->GetPassword())
{
if((m_password==m_password2)&&(m_password?!=?““))
{
theUser->SetPassword(m_password);
theUser->ModifyPassword(theSet);
AfxMessageBox(“修改密碼成功!“);
CDialog::OnOK();
}
else?if(m_password?==?““)
{
AfxMessageBox(“請輸入新密碼!“);
}
else
{
AfxMessageBox(“兩次輸入的密碼不匹配!“);
m_password=““;
m_password2=““;
UpdateData(FALSE);
}
}
else
{
AfxMessageBox(“輸入的密碼不正確,您無權修改密碼!“);
m_oldPassword=““;
m_password=““;
m_password2=““;
UpdateData(FALSE);
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2479??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ADOConn.cpp
?????文件???????1005??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ADOConn.h
?????文件???????3184??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ba
?????文件???????1024??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ba
?????文件???????1866??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ChangePwdDlg.cpp
?????文件???????1281??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ChangePwdDlg.h
?????文件????1516820??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ClinicManage.aps
?????文件??????19855??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ClinicManage.clw
?????文件???????2216??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ClinicManage.cpp
?????文件??????14664??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ClinicManage.dsp
?????文件????????723??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ClinicManage.dsw
?????文件???????1390??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ClinicManage.h
?????文件?????820224??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ClinicManage.ncb
?????文件??????57856??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ClinicManage.opt
?????文件???????2196??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ClinicManage.plg
?????文件?????144180??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ClinicManage.rc
?????文件???????6676??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ClinicManageDLG.cpp
?????文件???????1744??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\ClinicManageDLG.h
?????文件???????3022??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\DeptDlg.cpp
?????文件???????1515??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\DeptDlg.h
?????文件???????2338??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\DocEditDlg.cpp
?????文件???????1559??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\DocEditDlg.h
?????文件???????4553??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\DocManDlg.cpp
?????文件???????1601??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\DocManDlg.h
?????文件???????2878??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\Doctor.cpp
?????文件???????1039??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\Doctor.h
?????文件????????854??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\Global.cpp
?????文件????????992??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\Global.h
?????文件?????303104??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\Hospital.mdb
?????文件?????607232??2010-05-19?14:22??雷進輝Visual?C++項目開發案例精粹(1-13章)\chap13\13?Access\HosptialMan.ncb
............此處省略3812個文件信息
評論
共有 條評論