ScholarshipInfoDlg.cpp
资源名称:school.rar [点击查看]
上传用户:rs600066
上传日期:2017-10-16
资源大小:4788k
文件大小:2k
源码类别:
数据库系统
开发平台:
Visual C++
- // ScholarshipInfoDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #include "school.h"
- #include "ScholarshipInfoDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CScholarshipInfoDlg dialog
- CScholarshipInfoDlg::CScholarshipInfoDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CScholarshipInfoDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CScholarshipInfoDlg)
- m_strLevel = _T("");
- m_strType = _T("");
- m_tmDate = 0;
- m_strBrief = _T("");
- m_strName = _T("");
- m_strPerson = _T("");
- //}}AFX_DATA_INIT
- }
- void CScholarshipInfoDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CScholarshipInfoDlg)
- DDX_CBString(pDX, IDC_COMBO_LEVEL, m_strLevel);
- DDX_CBString(pDX, IDC_COMBO_TYPE, m_strType);
- DDX_DateTimeCtrl(pDX, IDC_DATETIMEPICKER1, m_tmDate);
- DDX_Text(pDX, IDC_EDIT_BRIEF, m_strBrief);
- DDX_Text(pDX, IDC_EDIT_NAME, m_strName);
- DDX_Text(pDX, IDC_EDIT_PERSON, m_strPerson);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CScholarshipInfoDlg, CDialog)
- //{{AFX_MSG_MAP(CScholarshipInfoDlg)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CScholarshipInfoDlg message handlers
- BOOL CScholarshipInfoDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
- // 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 CScholarshipInfoDlg::OnOK()
- {
- // TODO: Add extra validation here
- UpdateData();
- if(m_strName.IsEmpty())
- {
- AfxMessageBox("奖学金名称不能为空!");
- return;
- }
- if(m_strLevel.IsEmpty())
- {
- AfxMessageBox("奖学金等级不能为空!");
- return;
- }
- if(m_strType.IsEmpty())
- {
- AfxMessageBox("奖学金类型不能为空!");
- return;
- }
- if(m_strPerson.IsEmpty())
- {
- AfxMessageBox("获奖人不能为空!");
- return;
- }
- CDialog::OnOK();
- }