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

📄 zltjdlg.cpp

📁 毕业生信息管理系统的基本功能是对毕业生的信息进行管理
💻 CPP
字号:
// ZLTJDlg.cpp : implementation file
//

#include "stdafx.h"
#include "BySys.h"
#include "ZLTJDlg1.h"
#include "Count.h"

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

/////////////////////////////////////////////////////////////////////////////
// CZLTJDlg dialog


CZLTJDlg::CZLTJDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CZLTJDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CZLTJDlg)
	m_xians = _T("");
	//}}AFX_DATA_INIT
}


void CZLTJDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CZLTJDlg)
	DDX_Control(pDX, IDC_COMBO1, m_combo);
	DDX_Text(pDX, IDC_EDIT1, m_xians);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// CZLTJDlg message handlers

void CZLTJDlg::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData(TRUE);
	CString cSear,cSum,cTime;
	CString cDsp1,cDsp2,cDsp3,cDsp4,cDsp5,cDsp6,cDsp7,cDsp8,cDsp9,cDsp("\n");
	CCount count;
	CTime time = CTime::GetCurrentTime();
	time.Format("%Y-%m-%d");
	int sum;
	cTime.Format("%d",time);
	if( m_combo.GetCurSel() == 0 )
	{
	//	cSear = "Origin";
		sum = count.GetCount("Origin");
		cSum.Format("%d",sum);
		cDsp1 = "毕业生资料按籍贯分析结果列表显示"+cDsp;
		cDsp2 = cDsp1+ "====================================="+"\n";
		cDsp3 = cDsp2+"籍贯                            总人数 "+"\n";
		cDsp4 = cDsp3+"------------------------------------- "+"\n";
		cDsp5 = cDsp4+"广东,广西等                      ";
		cDsp6 = cDsp5+cSum+"  \n";
		cDsp7 = cDsp6 + "-------------------------------------"+"\n";
		cDsp8 = cDsp7 + "     统计时间:               ";
		cDsp9 = cDsp8 + cTime;
		MessageBox(cDsp9);
	}
	if( m_combo.GetCurSel() == 1 )
	{
	//	cSear = "Stu_Nat";
		sum = count.GetCount("Stu_Nat");
		cSum.Format("%d",sum);
		cDsp1 = "毕业生资料按民族分析结果列表显示"+cDsp;
		cDsp2 = cDsp1+ "====================================="+"\n";
		cDsp3 = cDsp2+"民族                            总人数 "+"\n";
		cDsp4 = cDsp3+"------------------------------------- "+"\n";
		cDsp5 = cDsp4+"汉族,回族                      ";
		cDsp6 = cDsp5+cSum+"  \n";
		cDsp7 = cDsp6 + "-------------------------------------"+"\n";
		cDsp8 = cDsp7 + "     统计时间:               ";
		cDsp9 = cDsp8 + cTime;
		MessageBox(cDsp9);
	}
	if( m_combo.GetCurSel() == 2 )
	{
	//	cSear = "Age";
		sum = count.GetCount("Age");
		cSum.Format("%d",sum);
		cDsp1 = "毕业生资料按年龄分析结果列表显示"+cDsp;
		cDsp2 = cDsp1+ "====================================="+"\n";
		cDsp3 = cDsp2+"年龄                            总人数 "+"\n";
		cDsp4 = cDsp3+"------------------------------------- "+"\n";
		cDsp5 = cDsp4+"                     ";
		cDsp6 = cDsp5+cSum+"  \n";
		cDsp7 = cDsp6 + "-------------------------------------"+"\n";
		cDsp8 = cDsp7 + "     统计时间:               ";
		cDsp9 = cDsp8 + cTime;
		MessageBox(cDsp9);
	}
	if( m_combo.GetCurSel() == 3 )
	{
		//cSear = "Sex";
		sum = count.GetCount("Sex");
		cSum.Format("%d",sum);
		cDsp1 = "毕业生资料按性别分析结果列表显示"+cDsp;
		cDsp2 = cDsp1+ "====================================="+"\n";
		cDsp3 = cDsp2+"性别                            总人数 "+"\n";
		cDsp4 = cDsp3+"------------------------------------- "+"\n";
		cDsp5 = cDsp4+"                     ";
		cDsp6 = cDsp5+cSum+"  \n";
		cDsp7 = cDsp6 + "-------------------------------------"+"\n";
		cDsp8 = cDsp7 + "     统计时间:               ";
		cDsp9 = cDsp8 + cTime;
		MessageBox(cDsp9);
	}	
}

BOOL CZLTJDlg::OnInitDialog()
{
	CDialog::OnInitDialog();
	m_combo.AddString("性别");
	m_combo.AddString("年龄");
	m_combo.AddString("民族");
	m_combo.AddString("籍贯");

	return TRUE;

}

⌨️ 快捷键说明

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