managerdialog.cpp
上传用户:yhxbjx
上传日期:2018-11-07
资源大小:7142k
文件大小:4k
- // managerdialog.cpp : implementation file
- //
- #include "stdafx.h"
- #include "课程设计.h"
- #include "managerdialog.h"
- //#include "课程设计Set.h"
- #include "addcoursedialog.h"
- #include "deletecoursedialog.h"
- #include "fixcoursedialog.h"
- #include "studentaddcourse.h"
- #include "studentfixcourse.h"
- #include "studentdeletecourse.h"
- #include "teacheraddcourse.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // managerdialog dialog
- managerdialog::managerdialog(CWnd* pParent /*=NULL*/)
- : CDialog(managerdialog::IDD, pParent)
- {
- //{{AFX_DATA_INIT(managerdialog)
- teacher = _T("");
- tenewcourse = _T("");
- //}}AFX_DATA_INIT
- }
- void managerdialog::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(managerdialog)
- DDX_Control(pDX, IDC_EDIT10, m_edit10);
- DDX_Control(pDX, IDC_EDIT9, m_edit9);
- DDX_Control(pDX, IDC_EDIT8, m_edit8);
- DDX_Control(pDX, IDC_EDIT6, m_edit6);
- DDX_Control(pDX, IDC_EDIT5, m_edit5);
- DDX_Control(pDX, IDC_EDIT4, m_edit4);
- DDX_Control(pDX, IDC_EDIT3, m_edit3);
- DDX_Control(pDX, IDC_EDIT2, m_edit2);
- DDX_Control(pDX, IDC_EDIT1, m_edit1);
- DDX_Text(pDX, IDC_EDIT1, teacher);
- DDX_Text(pDX, IDC_EDIT2, tenewcourse);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(managerdialog, CDialog)
- //{{AFX_MSG_MAP(managerdialog)
- ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
- ON_COMMAND(ID_exitsave, Onexitsave)
- ON_COMMAND(ID_addcourse, Onaddcourse)
- ON_COMMAND(ID_fixcourse, Onfixcourse)
- ON_COMMAND(ID_deletecourse, Ondeletecourse)
- ON_COMMAND(ID_studentaddcourse, Onstudentaddcourse)
- ON_COMMAND(ID_studentdeletecourse, Onstudentdeletecourse)
- ON_COMMAND(ID_studentfixcourse, Onstudentfixcourse)
- ON_COMMAND(ID_alterlecture, Onalterlecture)
- ON_COMMAND(ID_teacheraddcourse, Onteacheraddcourse)
- ON_COMMAND(ID_teacherdeletecourse, Onteacherdeletecourse)
- ON_COMMAND(ID_teacherfixcourse, Onteacherfixcourse)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // managerdialog message handlers
- void managerdialog::OnButton2()
- {
- // TODO: Add your control notification handler code here
- MessageBox("确定退出?n(退出后须密码重新登入)","提示",64);
- this->OnCancel();
- }
- void managerdialog::Onexitsave()
- {
- // TODO: Add your command handler code here
- this->OnCancel();
- }
- void managerdialog::Onaddcourse()
- {
- // TODO: Add your command handler code here
- addcoursedialog a;
- a.DoModal();
- }
- void managerdialog::Onfixcourse()
- {
- // TODO: Add your command handler code here
- fixcoursedialog a;
- a.DoModal();
- }
- void managerdialog::Ondeletecourse()
- {
- // TODO: Add your command handler code here
- deletecoursedialog a;
- a.DoModal();
- }
- void managerdialog::Onstudentaddcourse()
- {
- // TODO: Add your command handler code here
- studentaddcourse a;
- a.DoModal();
- }
- void managerdialog::Onstudentdeletecourse()
- {
- // TODO: Add your command handler code here
- studentdeletecourse a;
- a.DoModal();
- }
- void managerdialog::Onstudentfixcourse()
- {
- // TODO: Add your command handler code here
- studentfixcourse a;
- a.DoModal();
- }
- void managerdialog::Onalterlecture()
- {
- // TODO: Add your command handler code here
-
- }
- void managerdialog::Onteacheraddcourse()
- {
- // TODO: Add your command handler code here
- teacheraddcourse a;
- a.DoModal();
- }
- void managerdialog::Onteacherdeletecourse()
- {
- // TODO: Add your command handler code here
-
- }
- void managerdialog::Onteacherfixcourse()
- {
- // TODO: Add your command handler code here
-
- }
- BOOL managerdialog::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- // TODO: Add extra initialization here
- m_edit1.SetReadOnly();
- m_edit2.SetReadOnly();
- m_edit3.SetReadOnly();
- m_edit4.SetReadOnly();
- m_edit5.SetReadOnly();
- m_edit6.SetReadOnly();
- m_edit8.SetReadOnly();
- m_edit9.SetReadOnly();
- m_edit10.SetReadOnly();
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }