第一范文网 - 专业文章范例文档资料分享平台

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

来源:用户分享 时间:2025/8/9 14:10:10 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

}

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);

数据库课程设计报告(员工培训管理系统).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c6qyh8969jt6rgfl162bu_3.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top