数据库课程设计报告(员工培训管理系统)

发布时间 : 星期四 文章数据库课程设计报告(员工培训管理系统)更新完毕开始阅读

}

m_pRecordset = m_pConnection->Execute((_bstr_t)sql,&RecordsAffected,adCmdText); //如果找到

if(!m_pRecordset->adoEOF) { }

else MessageBox(\用户名或密码有误\

RecordsAffected=m_pRecordset->GetCollect(\CString authority=(LPCSTR)_bstr_t(RecordsAffected); //int i=(int)RecordsAffected.iVal; if(authority==\ }

this->ShowWindow(SW_HIDE); id=this->m_id; employer dlg; dlg.DoModal();

this->ShowWindow(SW_SHOW); this->ShowWindow(SW_HIDE); teacher dlg; dlg.DoModal();

this->ShowWindow(SW_SHOW);

}else {

//退出按钮功能,直接调用exit(0)退出整个程序 void CEmploymentDlg::OnButton2() {exit(0);}

/* */

void employer::OnButton1()

1.这个界面主要是有三个按钮,用来选择进入不同的功能区

{ }

void employer::OnButton2() { }

void employer::OnButton3() { }

void employer::OnButton4() { }

exit(0);

this->ShowWindow(SW_HIDE);//当前界面隐藏

employer_information dlg; //需要添加该C***Dlg.h头文件,否则编译通不过 dlg.DoModal();

this->ShowWindow(SW_SHOW);

this->ShowWindow(SW_HIDE);//当前界面隐藏

employer_score dlg; //需要添加该C***Dlg.h头文件,否则编译通不过 dlg.DoModal();

this->ShowWindow(SW_SHOW);

this->ShowWindow(SW_HIDE);//当前界面隐藏

employer_chioce dlg; //需要添加该C***Dlg.h头文件,否则编译通不过 dlg.DoModal();

this->ShowWindow(SW_SHOW);

/*

点击显示个人课程,会显示出个人课程 这部份功能主要有: 1.查找

2.增加 3.删除 */

//增加选择课程 /*

1.连接数据库

2.定义sql1,sql2用于获得信息,和添加课程

sql.Format(\

sql2.Format(\C_NAME,COUNT(C_ID) as num FROM TRAINING_PLAN,PERSON,COURSE WHERE P_ID=T_PERSON and C_ID=T_COURSE GROUP BY C_NAME\ */

void employer_chioce::OnButton1() {

m_pRecordset2 = m_pConnection->Execute((_bstr_t)sql2,&RecordsAffected2,adCmdText); UpdateData(TRUE);

_ConnectionPtr m_pConnection; ::CoInitialize(NULL); try { }

catch(_com_error e) { }

//定义sql查询 CString sql,sql2;

variant_t RecordsAffected,RecordsAffected2; _RecordsetPtr m_pRecordset,m_pRecordset2;

sql.Format(\

sql2.Format(\C_NAME,COUNT(C_ID) as num FROM TRAINING_PLAN,PERSON,COURSE WHERE //执行SQL查询

m_pRecordset = m_pConnection->Execute((_bstr_t)sql,&RecordsAffected,adCmdText);

::CoUninitialize();

AfxMessageBox(e.ErrorMessage()); return;

m_pConnection.CreateInstance(\

_bstr_t strConn = \Security=SSPI;Persist Security m_pConnection->Open(strConn,\3.差错控制选课人数与选课上限人数

4.其余的功能和增加功能只是sql语句的差别,就不详细描述了

Info=False;Initial Catalog=Employee training management system;Data Source=520-002\

P_ID=T_PERSON and C_ID=T_COURSE GROUP BY C_NAME\

RecordsAffected=m_pRecordset->GetCollect(\CString number=(LPCSTR)_bstr_t(RecordsAffected); RecordsAffected2=m_pRecordset2->GetCollect(\CString num=(LPCSTR)_bstr_t(RecordsAffected2); if(num<=number){

_variant_t ra;

_bstr_t strAdd=\strAdd=strAdd+id+\

strAdd=strAdd+m_add_id+\m_pConnection->Execute(strAdd,&ra,adCmdText); m_pConnection->Close(); //以下显示当前数据 CString

WHERE

P_ID=T_PERSON

AND

strSQL=\

FROM

C_ID=T_COURSE

AND

P_NAME,C_ID,C_NAME,C_TEACHER,C_CLASSROOM,C_CLASSTIME,C_STATE,T_EXAM_DATE TRAINING_PLAN,PERSON,COURSE,APPRISEMENT A_CODE=T_APPRISEMENT and T_PERSON= \ }

//显示个人选择课程

void employer_chioce::OnButton4() {

// TODO: Add your control notification handler code here UpdateData(TRUE); CString

WHERE

P_ID=T_PERSON

AND

m_adodc2.SetRecordSource(strSQL); m_adodc2.Refresh();

m_datagrid2.ShowWindow(SW_SHOW); AfxMessageBox(\选课成功\UpdateData(FALSE); }else { }

AfxMessageBox(\选课失败,选课人数已达到上限!\

tmpStr,strSQL=\

FROM AND

C_ID=T_COURSE

P_NAME,C_ID,C_NAME,C_TEACHER,C_CLASSROOM,C_CLASSTIME,C_STATE,T_EXAM_DATE TRAINING_PLAN,PERSON,COURSE,APPRISEMENT A_CODE=T_APPRISEMENT and T_PERSON= \ }

//删除选择课程

void employer_chioce::OnButton2() {

// TODO: Add your control notification handler code here m_adodc2.SetRecordSource(strSQL); m_adodc2.Refresh();

m_datagrid2.ShowWindow(SW_SHOW); UpdateData(FALSE);

联系合同范文客服:xxxxx#qq.com(#替换为@)