• 大小: 28.03MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-03
  • 语言: C/C++
  • 标签: 华科  软件工程  

资源简介

这是华中科技大学计算机科学以技术学院的软件工程的课程实验,是一个学生管理系统,含有代码和报告,VC++完美运行。

资源截图

代码片段和文件信息

// ChangeDegradeDlg.cpp : implementation file
//

#include “stdafx.h“
#include “school.h“
#include “ChangeDegradeDlg.h“
#include “ChangeDegradeInfoDlg.h“

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

/////////////////////////////////////////////////////////////////////////////
// CChangeDegradeDlg dialog


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


void CChangeDegradeDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CChangeDegradeDlg)
DDX_Control(pDX IDC_LIST1 m_ctrList);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CChangeDegradeDlg CDialog)
//{{AFX_MSG_MAP(CChangeDegradeDlg)
ON_BN_CLICKED(IDC_BUTTON_NEW OnButtonNew)
ON_BN_CLICKED(IDC_BUTTON_MODIFY OnButtonModify)
ON_BN_CLICKED(IDC_BUTTON_DELETE OnButtonDelete)
ON_NOTIFY(NM_DBLCLK IDC_LIST1 OnDblclkList1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CChangeDegradeDlg message handlers

BOOL CChangeDegradeDlg::OnInitDialog() 
{
CDialog::OnInitDialog();

m_ctrList.InsertColumn(0“编号“);
m_ctrList.InsertColumn(1“留级人“);
m_ctrList.InsertColumn(2“原属班级“);
m_ctrList.InsertColumn(3“留级班级“);
m_ctrList.InsertColumn(4“留级日期“);
m_ctrList.InsertColumn(5“留级原因“);

m_ctrList.SetColumnWidth(080);
m_ctrList.SetColumnWidth(180);
m_ctrList.SetColumnWidth(280);
m_ctrList.SetColumnWidth(380);
m_ctrList.SetColumnWidth(480);
m_ctrList.SetColumnWidth(5120);
m_ctrList.SetExtendedstyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
RefreshData();

return TRUE;  // return TRUE unless you set the focus to a control
              // EXCEPTION: OCX Property Pages should return FALSE
}


void CChangeDegradeDlg::RefreshData()
{

m_ctrList.DeleteAllItems();
m_ctrList.SetRedraw(FALSE);

UpdateData(TRUE);
CString strSQL;
strSQL=“select * from degrade“;
if(!m_recordset.Open(AFX_DB_USE_DEFAULT_TYPEstrSQL))
{
MessageBox(“打开数据库失败!““数据库错误“MB_OK);
return ;
}
int i=0;
while(!m_recordset.IsEOF())
{

m_ctrList.InsertItem(im_recordset.m_code);
m_ctrList.SetItemText(i1m_recordset.m_name);
m_ctrList.SetItemText(i2m_recordset.m_class_past);
m_ctrList.SetItemText(i3m_recordset.m_class_now);
m_ctrList.SetItemText(i4m_recordset.m_date);
m_ctrList.SetItemText(i5m_recordset.m_reason);

i++;
m_recordset.MoveNext();
}
m_recordset.Close();
m_ctrList.SetRedraw(TRUE);

}

void CChangeDegradeDlg::OnButtonNew() 
{
// TODO: Add your control notification handler code here
CString strSQL;
CChangeDegradeInfoDlg   Dlg;
while(1)
{
if(IDOK==Dlg.DoModal())
{
strSQL.Format(“select * from degrade where code = ‘%s‘“

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件    9338880  2014-01-17 09:35  school\backup\school.bak

     文件       6692  2004-10-17 17:00  school\ChangeDegradeDlg.cpp

     文件       1526  2004-10-17 16:52  school\ChangeDegradeDlg.h

     文件       2469  2004-10-17 16:50  school\ChangeDegradeInfoDlg.cpp

     文件       1507  2004-10-17 16:48  school\ChangeDegradeInfoDlg.h

     文件       1623  2004-10-17 15:47  school\ChangeDegradeSet.cpp

     文件       1435  2004-10-17 15:47  school\ChangeDegradeSet.h

     文件       6952  2004-10-17 15:14  school\ChangeInsideDlg.cpp

     文件       1513  2004-10-17 14:46  school\ChangeInsideDlg.h

     文件       5293  2004-10-17 15:31  school\ChangeInsideInfoDlg.cpp

     文件       1715  2004-10-17 14:29  school\ChangeInsideInfoDlg.h

     文件       1656  2004-10-17 14:45  school\ChangeInsideSet.cpp

     文件       1439  2004-10-17 14:45  school\ChangeInsideSet.h

     文件       6230  2004-10-17 16:30  school\ChangeLeaveDlg.cpp

     文件       1500  2004-10-17 15:36  school\ChangeLeaveDlg.h

     文件       2204  2004-10-17 15:32  school\ChangeLeaveInfoDlg.cpp

     文件       1427  2004-10-17 15:27  school\ChangeLeaveInfoDlg.h

     文件       1505  2004-10-17 15:43  school\ChangeLeaveSet.cpp

     文件       1387  2004-10-17 15:43  school\ChangeLeaveSet.h

     文件       6630  2004-10-17 16:38  school\ChangeSuspandDlg.cpp

     文件       1526  2004-10-17 16:34  school\ChangeSuspandDlg.h

     文件       2300  2004-10-17 16:08  school\ChangeSuspandInfoDlg.cpp

     文件       1470  2004-10-17 16:06  school\ChangeSuspandInfoDlg.h

     文件       1593  2004-10-17 16:00  school\ChangeSuspandSet.cpp

     文件       1425  2004-10-17 16:00  school\ChangeSuspandSet.h

     文件       6297  2014-01-05 20:55  school\ChangeTranserDlg.cpp

     文件       1529  2004-10-17 16:33  school\ChangeTranserDlg.h

     文件       2305  2004-10-17 16:23  school\ChangeTransferInfoDlg.cpp

     文件       1460  2004-10-17 16:23  school\ChangeTransferInfoDlg.h

     文件       1550  2004-10-17 15:48  school\ChangeTransferSet.cpp

............此处省略191个文件信息

评论

共有 条评论