⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maindlg.cpp

📁 < Visual C+++SQL Server数据库开发与实例>>一书中的实例核心源程序提供了几个案例的编程源代码。
💻 CPP
字号:
// MainDlg.cpp : implementation file
//

#include "stdafx.h"
#include "train.h"
#include "MainDlg.h"
#include "DIALOG_BOOK.h"
#include "DIALOG_JOB.h"
#include "DIALOG_PERSONNEL.h"
#include "DIALOG_PLAN.h"
#include "DIALOG_RESOURCE.h"
#include "DIALOG_TEACHER.h"
#include "DIALOG_TRAINCOURSE.h"
#include "DIALOG_MODPSWD.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMainDlg dialog


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


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


BEGIN_MESSAGE_MAP(CMainDlg, CDialog)
	//{{AFX_MSG_MAP(CMainDlg)
	ON_BN_CLICKED(IDC_BUTTON9, OnButton9)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
	ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
	ON_BN_CLICKED(IDC_BUTTON5, OnButton5)
	ON_BN_CLICKED(IDC_BUTTON6, OnButton6)
	ON_BN_CLICKED(IDC_BUTTON7, OnButton7)
	ON_BN_CLICKED(IDC_BUTTON8, OnButton8)
	ON_BN_CLICKED(IDC_BUTTONHELP, OnButtonhelp)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMainDlg message handlers

void CMainDlg::OnButton9() 
{
	// TODO: Add your control notification handler code here
	CDIALOG_MODPSWD m_modpswd;
	m_database.Close();
	m_modpswd.user.Format("%s",user);
	m_modpswd.m_database.Open(_T("train"));
	m_modpswd.DoModal()	;
}

void CMainDlg::OnButton1() 
{
	// TODO: Add your control notification handler code here
	CDIALOG_PERSONNEL m_personnel_manager;
	m_personnel_manager.DoModal();
}

void CMainDlg::OnButton2() 
{
	// TODO: Add your control notification handler code here
	CDIALOG_TRAINCOURSE m_traincourse_manager;
	m_traincourse_manager.DoModal();
}

void CMainDlg::OnButton3() 
{
	// TODO: Add your control notification handler code here
	CDIALOG_JOB m_job_manager;
	m_job_manager.DoModal();	
}

void CMainDlg::OnButton5() 
{
	// TODO: Add your control notification handler code here
	CDIALOG_PLAN m_plan_manager;
	m_plan_manager.DoModal();
}

void CMainDlg::OnButton6() 
{
	// TODO: Add your control notification handler code here
	CDIALOG_BOOK m_book_manager;
	m_book_manager.DoModal();
	
}

void CMainDlg::OnButton7() 
{
	// TODO: Add your control notification handler code here
	CDIALOG_RESOURCE m_resource_manager;
	m_database.Close();
	m_resource_manager.m_database.Open(_T("train"));
	m_resource_manager.DoModal();
}

void CMainDlg::OnButton8() 
{
	// TODO: Add your control notification handler code here
	CDIALOG_TEACHER m_teacher_manager;
	m_teacher_manager.DoModal();	
}

void CMainDlg::OnButtonhelp() 
{
	// TODO: Add your control notification handler code here
	WinExec("hh.exe train.chm",SW_SHOW);	
}

⌨️ 快捷键说明

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