adminlogoutdlg.cpp

来自「mysql+visual C++编写的mini图书馆数据库管理系统」· C++ 代码 · 共 61 行

CPP
61 行
字号
// AdminLogoutDlg.cpp : implementation file
//

#include "stdafx.h"
#include "Library.h"
#include "AdminLogoutDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAdminLogoutDlg dialog


CAdminLogoutDlg::CAdminLogoutDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CAdminLogoutDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CAdminLogoutDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CAdminLogoutDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAdminLogoutDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CAdminLogoutDlg, CDialog)
	//{{AFX_MSG_MAP(CAdminLogoutDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CAdminLogoutDlg message handlers

void CAdminLogoutDlg::OnOK() 
{
	// TODO: Add extra validation here
	if(flag==0)
	{
		AfxMessageBox("当前无管理员登录,无需执行登出操作!");
	    CDialog::OnOK();
        return;
	}
	CString s="管理员 ";
	s+=GlobalAdminID;
	s+=" 已顺利登出此系统!";
	AfxMessageBox(s);
	flag=0;
    GlobalAdminID="";
	CDialog::OnOK();
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?