12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- // learMgrDlg.cpp : 实现文件
- //
- #include "stdafx.h"
- #include "lyfzAttendance.h"
- #include "ClearMgrDlg.h"
- // ClearMgrDlg 对话框
- IMPLEMENT_DYNAMIC(CClearMgrDlg, CDialog)
- CClearMgrDlg::CClearMgrDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CClearMgrDlg::IDD, pParent)
- , m_strAccount(_T(""))
- , m_strPSD(_T(""))
- {
- }
- CClearMgrDlg::~CClearMgrDlg()
- {
- }
- void CClearMgrDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- }
- BEGIN_MESSAGE_MAP(CClearMgrDlg, CDialog)
- ON_BN_CLICKED(IDCANCEL, &CClearMgrDlg::OnBnClickedCancel)
- ON_BN_CLICKED(IDOK, &CClearMgrDlg::OnBnClickedOk)
- END_MESSAGE_MAP()
- BOOL CClearMgrDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
- m_strAccount = _T("admin");
- ((CEdit*)GetDlgItem(IDC_account_EDIT))->SetWindowText(m_strAccount);
- return TRUE;
- }
- // ClearMgrDlg 消息处理程序
- //取消
- void CClearMgrDlg::OnBnClickedCancel()
- {
- // TODO: 在此添加控件通知处理程序代码
- OnCancel();
- }
- //确定
- void CClearMgrDlg::OnBnClickedOk()
- {
- // TODO: 在此添加控件通知处理程序代码
- if(MessageBox(_T("确定要清除所有管理员"), _T("提示"), MB_YESNO|MB_ICONQUESTION) == IDNO) //IDNO
- return;
- ((CEdit*)GetDlgItem(IDC_account_EDIT))->GetWindowText(m_strAccount);
- ((CEdit*)GetDlgItem(IDC_PSD_EDIT))->GetWindowText(m_strPSD);
- if(m_strPSD.GetLength() > 16)
- {
- MessageBox(_T("密码不能超过16位"));
- return;
- }
- OnOK();
- }
|