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

📄 den.cpp

📁 C++编写的大学学生选课系统
💻 CPP
字号:
// Den.cpp : implementation file
//

#include "stdafx.h"
#include "EXAM4.h"
#include "Den.h"
#include "afxdb.h"
#include "DDen.h"
#include "CMain.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDen dialog


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


void CDen::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDen)
	DDX_Control(pDX, IDC_EDIT2, m_denkey);
	DDX_Control(pDX, IDC_EDIT1, m_densno);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDen, CDialog)
	//{{AFX_MSG_MAP(CDen)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDen message handlers

void CDen::OnButton1() 
{
	// TODO: Add your control notification handler code here
	CString strsno;
	CString strkey;
	m_densno.GetWindowText(strsno);
	m_denkey.GetWindowText(strkey);
	CDDen l;
	l.Open();
	l.m_strFilter="sno='"+strsno+"'";
	l.Requery();
	if(strkey==l.m_key)
	{//	MessageBox("ok");

	//		CDialog::OnCancel();
		CDialog::OnOK();
//		CCMain *cm=new CCMain;
//		cm->Create(IDD_DIALOG3,NULL);
//		cm->ShowWindow(SW_SHOW);
		CCMain *a=new CCMain;
		a->stusno=strsno;
		a->Create(IDD_DIALOG3,this);
		a->ShowWindow(SW_SHOW);
		
	
	}
	else
		MessageBox("input error");	
}

void CDen::OnButton2() 
{
	// TODO: Add your control notification handler code here
	m_densno.SetWindowText("");
	m_denkey.SetWindowText("");	
	
}

⌨️ 快捷键说明

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