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

📄 chaxun.cpp

📁 一个比较简单的学生信息管理系统,过渡时期椟槥 土木劳动模范 土木工程楳啊地
💻 CPP
字号:
// chaxun.cpp : implementation file
//

#include "stdafx.h"
#include "学生信息管理系统.h"
#include "chaxun.h"

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

/////////////////////////////////////////////////////////////////////////////
// Cchaxun dialog


Cchaxun::Cchaxun(CWnd* pParent /*=NULL*/)
	: CDialog(Cchaxun::IDD, pParent)
{
	//{{AFX_DATA_INIT(Cchaxun)
	m_chaxun = _T("");
	m_xingming = _T("");
	m_zhuanye = _T("");
	m_nianji = _T("");
	m_chusheng = _T("");
	//}}AFX_DATA_INIT
}


void Cchaxun::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(Cchaxun)
	DDX_Text(pDX, IDC_EDIT3, m_chaxun);
	DDX_Text(pDX, IDC_EDIT4, m_xingming);
	DDX_Text(pDX, IDC_EDIT5, m_zhuanye);
	DDX_Text(pDX, IDC_EDIT6, m_nianji);
	DDX_Text(pDX, IDC_EDIT7, m_chusheng);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(Cchaxun, CDialog)
	//{{AFX_MSG_MAP(Cchaxun)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// Cchaxun message handlers

BOOL Cchaxun::OnInitDialog() 
{
	CDialog::OnInitDialog();
/*	UpdateData();
	mset.Open();
	m_chaxun=mset.m_stuid;
	m_chusheng=mset.m_birthday;
	m_nianji=mset.m_grade;
	m_xingming=mset.m_name;
	m_zhuanye=mset.m_profcode;
	if(mset.m_sex=="男") CheckRadioButton(IDC_RADIO1,IDC_RADIO2,IDC_RADIO1);
    if(mset.m_sex=="女") CheckRadioButton(IDC_RADIO1,IDC_RADIO2,IDC_RADIO2);
	UpdateData(FALSE);*/
	
	// TODO: Add extra initialization here
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void Cchaxun::OnButton1() 
{
	// TODO: Add your control notification handler code here
	UpdateData();
	if(m_chaxun=="")
	{
            	
		MessageBox("请输入学号","信息提示",0);
		return ;
	}
	mset.Open();
    //m_pSet.m_strFilter.Format("m_column2='%s'",m_StuID);
    while(!mset.IsEOF())
	{
		if(mset.m_stuid==m_chaxun)
		{
	       break;
		}
		else mset.MoveNext();
	}
	
	if(mset.m_stuid==m_chaxun)
	{
		  m_zhuanye = mset.m_profcode;
	      m_nianji = mset.m_grade;
	      m_chusheng= mset.m_birthday;
          m_xingming = mset.m_name;
  
    if(mset.m_sex=="男") CheckRadioButton(IDC_RADIO1,IDC_RADIO2,IDC_RADIO1);
    if(mset.m_sex=="女") CheckRadioButton(IDC_RADIO1,IDC_RADIO1,IDC_RADIO2);
	UpdateData(false);
	}
	else MessageBox("没有找到该学号的学生","提示",0);
	mset.Close();
}

⌨️ 快捷键说明

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