学生信息管理系统(20211119193221)_第1页
学生信息管理系统(20211119193221)_第2页
学生信息管理系统(20211119193221)_第3页
学生信息管理系统(20211119193221)_第4页
学生信息管理系统(20211119193221)_第5页
已阅读5页,还剩39页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、1 学生信息管理系统学院南昌理工学院专业计算机科学与技术班级08 届计算机科学与技术统招本科班组长温冬飞组员温冬飞王齐兴郭清金郗操王参毅郭辉指导教师谢书良老师教师职称正教授2010 年1 月1 日2 目录学生信息管理系统系统分析 - 3 开发背景 - 3 系统需求分析- 3 1总体设计- 3-51 项目目标2 系统功能结构3 项目人员分配2 系统设计- 6-71 开发及运行环境2 数据库设计3 主要功能模块设计- 8-141建立工程框架2封装数据库3主窗口设计4登录模块设计5按各种查找模块设计6学生信息添加设计7管理员模块设计附录 a参考代码 - 15- 41 附录 b 数据库表 - 42 4

2、3 附录 c 参考文献 - 44 3 【系统分析】本系统是针对学校学生管理处所需而开发的一个运用软件.本软件的设计的思想是一切为使用者着想,界面要美观大方,操作尽量简单明了,而且作为一个使用的管理系统要有良好的容错性 ,而出现无操作时能及时的给出警告,以便用户及时改正。鉴于本系统的实用性,还需要有完善的功能, 从而能给使用者更方便使用。这些功能模块的实现是系统需要的主要问题.通过对初始原型系统进行需求分析,不断地修正和改进,直到形成用户满意的可行系统. 【开发背景】随着教育制度的改革,对大学的招生进行扩招,大学学生的数量快速增加,学生的信息管理,便捷安全对学校的信息管理越来越重要,也是必要的,

3、能够在学生信息管理处显示本管理系统的价值,是我们小组所有成员所追求的目标.该系统能方便学生信息管理处的工作人员方便的对学生的信息进行管理及时添加与修改,给使用者提供好的管理平台,提高工作效率! 【系统需求分析】根据学校学生信息管理处的需求,要求系统具有以下功能:对学校学生的变动进行处理。对学生的信息进行添加、修改。查询功能。信息打印功能。总体设计本系统是根据学校的实际需求而开发的,完全能够实现学校对客户的自动化管理,通过总体设计系统可以达到以下目标:1.1 项目目标本系统是根据学校的实际需求而开发的,完全能够实现学校对客户的自动化管理,通过本系统可以达到以下目标:系统运行稳定,安全可靠。界面设

4、计美观,人机交互界面友好4 信息查询灵活、方便、快捷、准确,数据存储安全可靠。满足键盘和鼠标的双重操作,完全支持回车键采用多种方式查询数据。管理员可以随时修改自己的口令。对用户输入的数据,系统进行严格的数据检验,尽可能排除人为的错误。数据保密性强,为每个用户设置相应的权限级别。1.2 系统功能结构用户登录模块学生基本信息模块学生信息采集模块学生详细资料模块条件查询模块学生信息排序模块增加学生信息删除学生信息修改学生信息手动表单操作学生信息采集卡学籍管理成绩管理选修课简易查询高级查询sol 语句操作按学号排序按姓名排序按专业代号排序5 1.3 项目人员分配项目管理计划制定任务分配代码编写 - 温

5、冬飞系统构架 - 温冬飞需求调研整理 - 郭清金王齐兴模块负责 - 温冬飞王齐兴数据库管理 - 郗操测试工程 - 王参毅郭晖1.4 贡献大小排序:温冬飞王齐兴郭清金郭辉郗操王参毅6 2 系统设计2.1 开发及运行环境1硬件要求cpu:300mhz 以上的处理器。内存: 128mb ,推荐 256mb 。硬盘: 150mb 以上剩余空间。显示像素:最低800*600 ,最佳效果1024*768 。2软件要求操作系统: windows2000/nt/xp/ce 。数据库: sql server2000。7 2.2 数据库设计1数据库概要说明数据库包括cj,ifo,km ,km2,pwd,xj,xs

6、,xx, zy 等九张表。下图即为本系统中数据库中的数据表结构图,该数据表结构图包含系统所有数据表。2 主要数据表的结构数据库中的数据表请参见附录 b。8 3 主要功能模块设计3 .1 建立工程框架在 visual c+中建立文档管理系统的基本框架,步骤如下:(1)单击菜单“file-new ”命令,打开“new”对话框,单击“projects”选项卡,选择“ mfc appwizard(exe) ” ,输入工程名,并设置路径,如图3 所示。图 3 “new”对话框(2)单击“ ok”按钮,“mfc appwizard-step1 ”对话框已经打开,如图4 所示,选项“ dialog base

7、 ” ,接着单击“ next”按钮。图 4 “mfc appwizard-step 1 ”对话框9 (3)在接下来的对话框中保持默认的选项。设置好的属性单击“ok”按钮后,就完成了新建工程。3 2 主窗口设计1菜单资源设计主窗口菜单设置的主要步骤如下:(1)单击“resourceview”选项卡, 右键单击 “gzglxt resources ”选项,选择“ insert”菜单项,打开“insert resource”窗口,如图7 所示。图 7 “insert resource”窗口主窗口如下:10 3.3 登录模块设计登录窗口如下:代码如下:void cpassdlg:onchangepas

8、() / todo: if this is a richedit control, the control will not / send this notification unless you override the cdialog:oninitdialog() / function and call cricheditctrl().seteventmask() / with the enm_change flag ored into the mask. / todo: add your control notification handler code here void cpassd

9、lg:onok() / todo: add extra validation here cdialog:onok(); void cpassdlg:oncancel() / todo: add extra cleanup here cdialog:oncancel(); 11 3.4 查找模块设计1简易查找:代码如下:void cdatabaseview:onsaerch1() csearch1 dlg; if(dlg.domodal()=idok) m_pset-m_strfilter.format(stuid=%s,dlg.m_stuid); m_pset-requery(); updat

10、edata(false); if(m_pset-iseof() afxmessagebox(您 输 入 的 学 号 不 存 在 , 查 找 失败!); 2. 高级查找12 代码如下:void cdatabaseview:onsearch2() chsearch dlg; dlg.domodal(); 3.5 学生信息添加设计代码如下:void cdatabaseview:onrecadd() cstudlg dlg; if(dlg.domodal()=idok) m_pset-addnew(); m_pset-m_stuid=dlg.m_stuid; m_pset-m_sex=dlg.m_se

11、x; m_pset-m_name=dlg.m_stuname; m_pset-m_profcode=dlg.m_profcode; m_pset-m_address=dlg.m_address; m_pset-update(); m_pset-requery(); afxmessagebox( 记录添加成功 !); oninitialupdate(); 13 3.5 管理员模块设计修改密码:新建用户:删除用户:14 15 4 完整源代码 ( 附录 a):代码如下:#include stdafx.h #include da tabase.h #include da tabaseset.h #in

12、clude da tabasedoc.h #include da tabaseview.h #include mainfrm.h #include studlg.h #include makesure.h #include xueji.h #include xuejidlg.h #include codeset.h #include xxset.h #include xxdlg.h #include add.h #include cjdlg.h #include cjset.h #include kmset.h #include search1.h #include input.h #incl

13、ude input0.h #include pswset.h #include search2.h #include sd.h #include hsearch.h #include ifo.h #include ifoset.h #include kmset2.h #include allset.h #ifdef _debug #define new debug_new #undef this_file static char this_file = _file_; #endif / / cdatabaseview extern cstring currentuser; 16 impleme

14、nt_dyncreate(cda tabaseview, crecordview) begin_message_map(cdatabaseview, crecordv iew) /afx_msg_map(cdatabaseview) on_bn_clicked(idc_rec_add, onrecadd) on_bn_clicked(idc_rec_del, onrecdel) on_bn_clicked(idc_rec_edit, onrecedit) on_bn_clicked(idc_sort, onsort) on_bn_clicked(idc_xueji, onxueji)on_bn

15、_clicked(idc_xuanxiu, onxuanxiu)on_bn_clicked(idc_score, onscore) on_bn_clicked(idc_saerch1, onsaerch1) on_bn_clicked(idc_sql, onsql) on_bn_clicked(idc_search2, onsearch2) on_bn_clicked(idc_shoudong, onshoudong) on_wm_ctlcolor() on_bn_clicked(idc_ifo, onifo) /afx_msg_map / standard printing commands

16、 on_command(id_file_print, crecordview:onfileprint) on_command(id_file_print_direct, crecordview:onfileprint)on_command(id_file_print_preview, crecordview:onfileprintpreview) end_message_map() / / cdatabaseview construction/destruction cdatabaseview:cda tabaseview() : crecordview(cda tabaseview:idd)

17、 /afx_data_init(cda tabaseview) m_pset = null; /afx_data_init / todo: add construction code here cdatabaseview:cda tabaseview() static int i=0; void cdatabaseview:dodataexchange(cdataexchange* pdx) 17 crecordview:dodataexchange(pdx); /afx_data_map(cda tabaseview) ddx_control(pdx, idc_shoudong, m_sho

18、udong); ddx_control(pdx, idc_rec_edit, m_edit); ddx_control(pdx, idc_rec_add, m_add); ddx_control(pdx, idc_rec_del, m_del); ddx_control(pdx, idc_msflexgrid, m_msfgrid); ddx_fieldtext(pdx, idc_prof_code, m_pset-m_profcode, m_pset); ddx_fieldtext(pdx, idc_stu_id, m_pset-m_stuid, m_pset); ddx_fieldtext

19、(pdx, idc_stu_name, m_pset-m_name, m_pset); ddx_fieldtext(pdx, idc_stu_sex, m_pset-m_sex, m_pset); ddx_fieldtext(pdx, idc_addr, m_pset-m_address, m_pset); /afx_data_map bool cda tabaseview:precreatewindow(createstruct& cs) / todo: modify the window class or styles here by modifying / the creates

20、truct cs return crecordv iew:precreatewindow(cs); void cdatabaseview:oninitialupdate() if(!i+)checkradiobutton(idc_sort_id,idc_sort_name,idc_sort_id); m_pset = &getdocument()-m_da tabaseset; crecordview:oninitialupdate(); getparentframe()-recalclayout(); /m_brush=createsolidbrush(rgb(200,250,160

21、); /m_msfgrid.setbackcolor(rgb(200,250,160); /setcheckedbutton(idc_sort_id); /resizeparenttofit(); /-/ if(currentuser=anonymous) m_del.enablewindow(false); m_edit.enablewindow(false); m_add.enablewindow(false); m_shoudong.enablewindow(false); 18 while(!m_pset-iseof() m_pset-movenext(); m_pset-getrec

22、ordcount(); m_pset-movefirst(); m_msfgrid.setcols(m_pset-m_nfields+1); m_msfgrid.setrows(m_pset-getrecordcount()+1); m_msfgrid.setcolwidth(1,1200); m_msfgrid.setcolwidth(2,1200); m_msfgrid.setcolwidth(3,800); m_msfgrid.setcolwidth(4,1200); m_msfgrid.setcolwidth(5,3200); m_msfgrid.setrow(0); m_msfgri

23、d.setcol(1); m_msfgrid.settext( 学号 ); m_msfgrid.setrow(0); m_msfgrid.setcol(2); m_msfgrid.settext( 姓名 ); m_msfgrid.setrow(0); m_msfgrid.setcol(3); m_msfgrid.settext( 性别 ); m_msfgrid.setrow(0); m_msfgrid.setcol(4); m_msfgrid.settext( 专业代号 ); m_msfgrid.setrow(0); m_msfgrid.setcol(5); m_msfgrid.settext

24、( 联系方式 ); int irow=1; while(!m_pset-iseof() cstring str; str.format( 记录 %d,irow); m_msfgrid.setrow(irow);m_msfgrid.setcol(0); m_msfgrid.settext(str); m_msfgrid.setrow(irow);m_msfgrid.setcol(1); m_msfgrid.settext(m_pset-m_stuid); m_msfgrid.setrow(irow);m_msfgrid.setcol(2); m_msfgrid.settext(m_pset-m_

25、name); m_msfgrid.setrow(irow);m_msfgrid.setcol(3); m_msfgrid.settext(m_pset-m_sex); 19 m_msfgrid.setrow(irow);m_msfgrid.setcol(4); m_msfgrid.settext(m_pset-m_profcode); m_msfgrid.setrow(irow);m_msfgrid.setcol(5); m_msfgrid.settext(m_pset-m_address); irow+; m_pset-movenext(); m_msfgrid.setrow(1); m_m

26、sfgrid.setcol(1); m_pset-movefirst(); /-/ / / cdatabaseview printing bool cda tabaseview:onprepareprinting(cprintinfo* pinfo) / default preparation return doprepareprinting(pinfo); void cdatabaseview:onbeginprinting(cdc* /*pdc*/, cprintinfo* /*pinfo*/) / todo: add extra initialization before printin

27、g void cdatabaseview:onendprinting(cdc* /*pdc*/, cprintinfo* /*pinfo*/) / todo: add cleanup after printing / / cdatabaseview diagnostics #ifdef _debug void cdatabaseview:assertv alid() const crecordview:assertv alid(); void cdatabaseview:dump(cdumpcontext& dc) const 20 crecordview:dump(dc); cdat

28、abasedoc* cda tabaseview:getdocument() / non-debug version is inline assert(m_pdocument-iskindof(runtime_class(cdatabasedoc); return (cdatabasedoc*)m_pdocument; #endif /_debug / / cdatabaseview database support crecordset* cda tabaseview:ongetrecordset() return m_pset; / / cdatabaseview message hand

29、lers bool cda tabaseview:oncommand(wparam wparam, lparam lparam) /-/ cstring str; cmainframe* pframe=(cmainframe*)afxgetapp()-m_pmainwnd;/获得主框架窗口的指针cstatusbar* pstatus=&pframe-m_wndstatusbar; if(pstatus) crecordsetstatus rstatus; m_pset-getstatus(rstatus); str.format(当前记录:%d总记录:%d,1+rstatus.m_lc

30、urrentrecord,m_pset-getrecordcount(); pstatus-setpanetext(1,str); /-/ return crecordv iew:oncommand(wparam, lparam); void cdatabaseview:onrecadd() 21 cstudlg dlg; if(dlg.domodal()=idok) m_pset-addnew(); m_pset-m_stuid=dlg.m_stuid; m_pset-m_sex=dlg.m_sex; m_pset-m_name=dlg.m_stuname; m_pset-m_profcod

31、e=dlg.m_profcode; m_pset-m_address=dlg.m_address; m_pset-update(); m_pset-requery(); afxmessagebox( 记录添加成功!); oninitialupdate(); void cdatabaseview:onrecdel() cmakesure dlg; cxxset xxset; ccjset cjset; cxueji xjset; cifoset ifoset; if(dlg.domodal()=idok) crecordsetstatus status; xxset.open(); xxset.

32、m_strfilter.format(stuid=%s,m_pset-m_stuid); xxset.requery(); if(!xxset.iseof() xxset.getstatus(status); xxset.delete(); if(status.m_lcurrentrecord=0) xxset.movenext(); else xxset.movefirst(); xxset.requery(); updatedata(false); xxset.close(); 22 cjset.open(); cjset.m_strfilter.format(stuid=%s,m_pse

33、t-m_stuid); cjset.requery(); if(!cjset.iseof() cjset.getstatus(status); cjset.delete(); if(status.m_lcurrentrecord=0) cjset.movenext(); else cjset.movefirst(); cjset.requery(); updatedata(false); cjset.close(); xjset.open(); xjset.m_strfilter.format(stuid=%s,m_pset-m_stuid); xjset.requery(); if(!xjs

34、et.iseof() xjset.getstatus(status); xjset.delete(); if(status.m_lcurrentrecord=0) xjset.movenext(); else xjset.movefirst(); xjset.requery(); updatedata(false); xjset.close(); ifoset.open(); ifoset.m_strfilter.format(stuid=%s,m_pset-m_stuid); ifoset.requery(); if(!ifoset.iseof() ifoset.getstatus(stat

35、us); ifoset.delete(); if(status.m_lcurrentrecord=0) ifoset.movenext(); else ifoset.movefirst(); ifoset.requery(); updatedata(false); 23 ifoset.close(); m_pset-getstatus(status); m_pset-delete(); if(status.m_lcurrentrecord=0) m_pset-movefirst(); else m_pset-movelast(); m_pset-requery(); updatedata(fa

36、lse); afxmessagebox( 记录已删除 !); oninitialupdate(); void cdatabaseview:onrecedit() cstudlg dlg; dlg.m_stuid=m_pset-m_stuid; dlg.m_sex=m_pset-m_sex; dlg.m_stuname=m_pset-m_name; dlg.m_profcode=m_pset-m_profcode; dlg.m_address=m_pset-m_address; if(dlg.domodal()=idok) m_pset-edit(); m_pset-m_stuid=dlg.m_

37、stuid; m_pset-m_name=dlg.m_stuname; m_pset-m_sex=dlg.m_sex; m_pset-m_profcode=dlg.m_profcode; m_pset-m_address=dlg.m_address; m_pset-update(); m_pset-requery(); updatedata(false); afxmessagebox( 记录修改成功!); onrefresh(); void cdatabaseview:onsort() 24 cstring str; if(isdlgbuttonchecked(idc_sort_id)str=

38、stuid;else if(isdlgbuttonchecked(idc_sort_name)str=name;else str=profcode; m_pset-m_strsort=str; m_pset-requery(); onrefresh(); void cdatabaseview:onrefresh() m_pset-movefirst(); while(!m_pset-iseof() m_pset-movenext(); m_pset-getrecordcount(); m_pset-movefirst(); m_msfgrid.setcols(m_pset-m_nfields+

39、1); m_msfgrid.setrows(m_pset-getrecordcount()+1); m_msfgrid.setrow(0); m_msfgrid.setcol(1); m_msfgrid.settext( 学号 ); m_msfgrid.setrow(0); m_msfgrid.setcol(2); m_msfgrid.settext( 姓名 ); m_msfgrid.setrow(0); m_msfgrid.setcol(3); m_msfgrid.settext( 性别 ); m_msfgrid.setrow(0); m_msfgrid.setcol(4); m_msfgr

40、id.settext( 专业代号 ); m_msfgrid.setrow(0); m_msfgrid.setcol(5); m_msfgrid.settext( 联系方式 ); int irow=1; while(!m_pset-iseof() cstring str; str.format( 记录 %d,irow); m_msfgrid.setrow(irow);m_msfgrid.setcol(0); 25 m_msfgrid.settext(str); m_msfgrid.setrow(irow);m_msfgrid.setcol(1); m_msfgrid.settext(m_pset

41、-m_stuid); m_msfgrid.setrow(irow);m_msfgrid.setcol(2); m_msfgrid.settext(m_pset-m_name); m_msfgrid.setrow(irow);m_msfgrid.setcol(3); m_msfgrid.settext(m_pset-m_sex); m_msfgrid.setrow(irow);m_msfgrid.setcol(4); m_msfgrid.settext(m_pset-m_profcode); m_msfgrid.setrow(irow);m_msfgrid.setcol(5); m_msfgri

42、d.settext(m_pset-m_address); irow+; m_pset-movenext(); m_msfgrid.setrow(1); m_msfgrid.setcol(1); m_pset-movefirst(); void cdatabaseview:onxueji() cxueji xuejiset; ccodeset codeset; cxuejidlg dlg; cadd add_dlg; dlg.m_xuejiid=m_pset-m_stuid; dlg.m_xuejiname=m_pset-m_name; codeset.open(); codeset.m_str

43、filter.format(profcode=%s,m_pset-m_profcode); codeset.requery(); dlg.m_xuejiprof=codeset.m_profname; xuejiset.open(); xuejiset.m_strfilter.format(stuid=%s,m_pset-m_stuid); xuejiset.requery(); if(xuejiset.iseof() if(add_dlg.domodal()=idok) if(dlg.domodal()=idok) xuejiset.addnew(); xuejiset.setfieldnu

44、ll(&(xuejiset.m_stuid),false); xuejiset.m_stuid=m_pset-m_stuid; 26 xuejiset.m_year=dlg.m_xuejiyear; xuejiset.m_reg=dlg.m_xuejireg; xuejiset.m_native=dlg.m_xuejinative; xuejiset.m_type=dlg.m_xuejitype; xuejiset.m_birth=dlg.m_xuejibirth; xuejiset.m_class=dlg.m_xuejiclass; xuejiset.update(); update

45、data(false); afxmessagebox( 记录添加成功 !); else dlg.m_xuejiyear=xuejiset.m_year; dlg.m_xuejireg=xuejiset.m_reg; dlg.m_xuejinative=xuejiset.m_native; dlg.m_xuejitype=xuejiset.m_type; dlg.m_xuejibirth=xuejiset.m_birth; dlg.m_xuejiclass=xuejiset.m_class; updatedata(false); if(dlg.domodal()=idok) xuejiset.e

46、dit(); xuejiset.m_year=dlg.m_xuejiyear; xuejiset.m_reg=dlg.m_xuejireg; xuejiset.m_native=dlg.m_xuejinative; xuejiset.m_type=dlg.m_xuejitype; xuejiset.m_birth=dlg.m_xuejibirth; xuejiset.m_class=dlg.m_xuejiclass; xuejiset.update(); updatedata(false); afxmessagebox( 记录修改成功!); void cdatabaseview:onxuanx

47、iu() cxxdlg dlg; cxxset xxset; cadd add_dlg; dlg.m_stuid=m_pset-m_stuid; dlg.m_name=m_pset-m_name; xxset.open(); 27 xxset.m_strfilter.format(stuid=%s,m_pset-m_stuid); xxset.requery(); if(xxset.iseof() if(add_dlg.domodal()=idok) if(dlg.domodal()=idok) xxset.addnew(); xxset.setfieldnull(&(xxset.m_

48、stuid),false); xxset.m_stuid=m_pset-m_stuid; xxset.m_credit=dlg.m_credit; xxset.m_lesson1=dlg.m_lesson1; xxset.m_lesson2=dlg.m_lesson2; xxset.m_lesson3=dlg.m_lesson3; xxset.m_lesson4=dlg.m_lesson4; xxset.update(); updatedata(false); afxmessagebox( 记录添加成功 !); else dlg.m_credit=xxset.m_credit; dlg.m_l

49、esson1=xxset.m_lesson1; dlg.m_lesson2=xxset.m_lesson2; dlg.m_lesson3=xxset.m_lesson3; dlg.m_lesson4=xxset.m_lesson4; updatedata(false); if(dlg.domodal()=idok) xxset.edit(); xxset.m_credit=dlg.m_credit; xxset.m_lesson1=dlg.m_lesson1; xxset.m_lesson2=dlg.m_lesson2; xxset.m_lesson3=dlg.m_lesson3; xxset

50、.m_lesson4=dlg.m_lesson4; xxset.update(); updatedata(false); afxmessagebox( 记录修改成功!); 28 void cdatabaseview:onscore() ccjdlg dlg; cadd add_dlg; ccjset cjset; ckmset kmset; ckmset2 kmset2; float cr8; int i=0; for(int j=0;jm_name,m_pset-m_stuid); dlg.m_ave1=加权平均分 ; kmset2.open(); kmset2.m_strfilter.fo

51、rmat(profcode=%s,m_pset-m_profcode); kmset2.requery(); if(kmset2.m_subject1!=) dlg.m_score11.format(%stt(学分: %3.1f),kmset2.m_subject1,kmset2.m_credit1); cri+=kmset2.m_credit1; if(kmset2.m_subject2!=) dlg.m_score21.format(%stt(学分: %3.1f),kmset2.m_subject2,kmset2.m_credit2); cri+=kmset2.m_credit2; if(

52、kmset2.m_subject3!=) dlg.m_score31.format(%stt(学分: %3.1f),kmset2.m_subject3,kmset2.m_credit3); cri+=kmset2.m_credit3; if(kmset2.m_subject4!=) dlg.m_score41.format(%stt(学分: %3.1f),kmset2.m_subject4,kmset2.m_credit4); cri+=kmset2.m_credit4; if(kmset2.m_subject5!=) dlg.m_score51.format(%stt(学分: %3.1f),

53、kmset2.m_subject5,kmset2.m_credit5); cri+=kmset2.m_credit5; if(kmset2.m_subject6!=) 29 dlg.m_score61.format(%stt(学分: %3.1f),kmset2.m_subject6,kmset2.m_credit6); cri+=kmset2.m_credit6; if(kmset2.m_subject7!=) dlg.m_score71.format(%stt(学分: %3.1f),kmset2.m_subject7,kmset2.m_credit7); cri+=kmset2.m_cred

54、it7; if(kmset2.m_subject8!=) dlg.m_score81.format(%stt(学分: %3.1f),kmset2.m_subject8,kmset2.m_credit8); cri+=kmset2.m_credit8; cjset.open(); cjset.m_strfilter.format(stuid=%s,m_pset-m_stuid); cjset.requery(); if(cjset.iseof() if(add_dlg.domodal()=idok) if(dlg.domodal()=idok) cjset.addnew(); cjset.set

55、fieldnull(&(cjset.m_stuid),false); cjset.m_stuid=m_pset-m_stuid; cjset.m_score1=dlg.m_score12; cjset.m_score2=dlg.m_score22; cjset.m_score3=dlg.m_score32; cjset.m_score4=dlg.m_score42; cjset.m_score5=dlg.m_score52; cjset.m_score6=dlg.m_score62; cjset.m_score7=dlg.m_score72; cjset.m_score8=dlg.m_

56、score82; cjset.m_ave=(float)cjset.m_score1*cr0+(float)cjset.m_score2*cr1+(float)cjset.m_score3*cr2+(float)cjset.m_score4*cr3+(float)cjset.m_score5*cr4+(float)cjset.m_score6*cr5+(float)cjset.m_score7*cr6+(float)cjset.m_score8*cr7)/(cr1+cr2+cr3+cr0+cr4+cr5+cr6+cr7); cjset.update(); updatedata(false);

57、afxmessagebox( 记录添加成功 !); 30 else if(kmset2.m_subject1!=)dlg.m_score12=cjset.m_score1; else dlg.m_score12=0; if(kmset2.m_subject2!=)dlg.m_score22=cjset.m_score2; else dlg.m_score22=0; if(kmset2.m_subject3!=)dlg.m_score32=cjset.m_score3; else dlg.m_score32=0; if(kmset2.m_subject4!=)dlg.m_score42=cjse

58、t.m_score4; else dlg.m_score42=0; if(kmset2.m_subject5!=)dlg.m_score52=cjset.m_score5; else dlg.m_score52=0; if(kmset2.m_subject6!=)dlg.m_score62=cjset.m_score6; else dlg.m_score62=0; if(kmset2.m_subject7!=)dlg.m_score72=cjset.m_score7; else dlg.m_score72=0; if(kmset2.m_subject8!=)dlg.m_score82=cjse

59、t.m_score7; else dlg.m_score82=0; dlg.m_ave2=cjset.m_ave; updatedata(false); if(dlg.domodal()=idok) cjset.edit(); cjset.m_score1=dlg.m_score12; cjset.m_score2=dlg.m_score22; cjset.m_score3=dlg.m_score32; cjset.m_score4=dlg.m_score42; cjset.m_score5=dlg.m_score52; cjset.m_score6=dlg.m_score62; cjset.

60、m_score7=dlg.m_score72; cjset.m_score8=dlg.m_score82; cjset.m_ave=(float)cjset.m_score1*cr0+(float)cjset.m_score2*cr1+(float)cjset.m_score3*cr2+(float)cjset.m_score4*cr3+(float)cjset.m_score5*cr4+(float)cjset.m_score6*cr5+(float)cjset.m_score7*cr6+(float)cjset.m_score8*cr7)/(cr1+cr2+cr3+cr0+cr4+cr5+cr6+cr7); cjset.update(); upd

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论