《奖学金评定管理系统设计.doc》由会员分享,可免费在线阅读全文,更多与《(奖学金评定管理系统设计)(最终版)》相关文档资源请在帮帮文库(www.woc88.com)数亿文档库存里搜索。
1、quot重查quot);JTabletable;DefaultTableModeldtm;Stringcolumns[]={quot学号quot,quot姓名quot,quot专业班级quot,quot基础分quot,quot任职分quot,quot集体荣誉分quot,quot运动会分quot,quot校园文化分quot,quot公益活动分quot,quot等级考试分quot,quot辅修加分quot,quot学术加分quot,quot德育总分quot};Objectbody[][]=newObject[][];Connectioncon;Statementstmt;ResultSetrs;ublicStudentMoralEdiccationScore(){setTitle(quot德育成绩查询系统quot);setSize(,);table=newJTable(body,columns);表格JScrollPanesl=newJScrollPane(table);Containerc=getContentPane();csetLayout(null);xsetBounds(,,,);xsetFont(newFont(quot华文行楷quot,FontBOLD,));cadd(x);Fontf=newFont(quot楷体quot,FontPLAIN,);x[]setBounds(,,,);x[]setBounds(,,,);x[]setBounds(,,,);x[]setBounds(,,,);x
2、t(s);}ublicvoidactionPerformed(ActionEventevt){try{ClassforName(quotsunjdbcodbcJdbcOdbcDriverquot);Connectioncon=DriverManagergetConnection(quotjdbc:odbc:studentquot);stmt=concreateStatement(ResultSetTYPE_SCROLL_SENSITIVE,ResultSetCONCUR_UPDATABLE);rs=stmtexecuteQuery(quotselect*frommoralediccationscorewhere专业班级='quot+y[]getText()+quot'ORDERBY德育总分DESCquot);for(inti=;iltbodylength;i++){stmtexecuteUdate(quotudatemoralediccationscoreset德育总分=(基础分+任职分+集体荣誉分+运动会分+校园文化分+公益活动分+等级考试分+辅修加分+学术加分)where学号='quot+body[i][]+quot'quot);}}catch(Excetione){Systemerrrintln(egetMessage());}if(evtgetSource()==button){y[]setText(null);y[]setText(null);y[]setText(null);}if(evt
3、=stmtexecuteQuery(quotselect*fromcoursescorewhere专业班级='quot+y[]getText()+quot'quot);while(rsnext()){body[i][]=rsgetString(quot学号quot);body[i][]=rsgetString(quot姓名quot);body[i][