managerlogoldialog.cpp
上传用户:yhxbjx
上传日期:2018-11-07
资源大小:7142k
文件大小:2k
- // managerlogoldialog.cpp : implementation file
- //
- #include "stdafx.h"
- #include "课程设计.h"
- #include "managerlogoldialog.h"
- #include "课程设计Set.h"
- #include "managerdialog.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // managerlogoldialog dialog
- managerlogoldialog::managerlogoldialog(CWnd* pParent /*=NULL*/)
- : CDialog(managerlogoldialog::IDD, pParent)
- {
- //{{AFX_DATA_INIT(managerlogoldialog)
- admini = _T("");
- secrect = _T("");
- //}}AFX_DATA_INIT
- }
- void managerlogoldialog::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(managerlogoldialog)
- DDX_Text(pDX, IDC_EDIT1, admini);
- DDX_Text(pDX, IDC_EDIT2, secrect);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(managerlogoldialog, CDialog)
- //{{AFX_MSG_MAP(managerlogoldialog)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // managerlogoldialog message handlers
- void managerlogoldialog::OnOK()
- {
- // TODO: Add extra validation here
-
- UpdateData();
- //userviewdialog b;
- CMySet a;
- a.Open();
- int flag=0;
- while(!a.IsEOF())
- {if(admini==a.m_administrator&&secrect==a.m_secrect)
- {flag=1;
- break;
- }
- a.MoveNext();
- }
- if(flag==1)
- {//b.OnCancel();
- this->OnCancel();
- managerdialog a;
- a.DoModal();
-
- //b.OnCancel();
- }
- else
- MessageBox("你无权限进入管理系统!!!","警告",16);
- }