2016秋广工数据库课程设计学生信息管理系统java+mysql)


广工数据库课程设计(学生信息管理系统java+mysql)内含数据库文件,java源代码,jar文件以及课设报告
资源截图
代码片段和文件信息
package studentManageSystem.com.zse.controller;

import java.awt.Color;
import java.awt.GridLayout;
import java.awt.event.*;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;

import javax.swing.*;
import javax.swing.GroupLayout.Alignment;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.DefaultTableModel;

import com.mysql.jdbc.PreparedStatement;
import studentManageSystem.com.zse.dao.User;
import studentManageSystem.com.zse.util.DbUtil;
import studentManageSystem.com.zse.util.StringUtil;
import studentManageSystem.com.zse.view.Adminframe;
import studentManageSystem.com.zse.view.Loginframe;
import studentManageSystem.com.zse.view.Userframe;

public class Controller {
public static Loginframe loginframe;
JPanel jpanel;
    String[] newvalue;
String[] oldScore;

public static void main(String[] args) {
loginframe = new Loginframe(new Controller());
}
public User login(Connection connectionUser userString role) throws SQLException{//登录
User resultUser = null;
String sql = null;
if(role.equals(“admin“)){
sql = “select * from administrator where username=‘“+user.getUsername()+“‘ and password=‘“+user.getPassword()+“‘“;
}else{
sql = “select * from user where username=‘“+user.getUsername()+“‘ and password=‘“+user.getPassword()+“‘“;
}
ResultSet result = statementQuery(connection sql);
if(result.next()){
resultUser = new User();
resultUser.setUsername(result.getString(“username“));
resultUser.setPassword(result.getString(“password“));
if(role.equals(“admin“)){
resultUser.setSno(null);
}else{
resultUser.setSno(result.getString(“sno“));
}
}
return resultUser;
}
private void checkStudentInfo(Connection connectionAdminframe adminframe) throws SQLException{//查看学生信息
jpanel = new JPanel();
object[][] object = null;
int rowCount = 0;
int columnCount;
ResultSet result = null;
String[] columnNames =  { “学号“ “姓名“ “性别“ “系号“ “专业号““出生日期“};

try{
String sql = “select snosnamessexdnospnosbirthday from studentinfo“;
result = statementQuery(connection sql);
//获取行数 
String countSQL = “select count(*) totalCount from studentinfo“;
ResultSet rset = statementQuery(connection countSQL);
if(rset.next()) { 
rowCount=rset .getInt(“totalCount“); 

//获取列数
columnCount = result.getmetaData().getColumnCount();
object = new object[rowCount][columnCount];

int i=0 j=0;
while(result.next()){
if(result.getString(1) != null){
for(j = 0;j<6;j++){
object[i][j]=result.getString(j+1);
}
i++;
}
}
}catch (SQLException e) { 
   e.printStackTrace();
}
JTable checkTab = new JTable(objectcolumnNames);
checkTab.setEnabled(false);
JScrollPane scrollpane = new JScrollPane(checkTab);

scrollpane.setBounds(2050500200);
jpanel.s

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-02-19 09:31  数据库课程设计
     文件        9545  2016-11-25 21:57  数据库课程设计informanagesystem.sql
     文件      490337  2016-12-28 17:42  数据库课程设计studentManageSystem.jar
     文件     1696768  2017-02-19 09:31  数据库课程设计数据库课程设计报告.doc
     目录           0  2016-12-28 17:30  数据库课程设计源码
     目录           0  2016-12-28 17:34  数据库课程设计源码studentManageSystem
     文件         473  2016-12-28 17:37  数据库课程设计源码studentManageSystem.classpath
     文件         395  2016-11-17 16:46  数据库课程设计源码studentManageSystem.project
     目录           0  2016-12-06 19:50  数据库课程设计源码studentManageSystem.settings
     文件          57  2016-11-20 12:17  数据库课程设计源码studentManageSystem.settingsorg.eclipse.core.resources.prefs
     文件         598  2016-11-17 16:46  数据库课程设计源码studentManageSystem.settingsorg.eclipse.jdt.core.prefs
     文件         106  2016-11-20 12:17  数据库课程设计源码studentManageSystem.settingsorg.eclipse.ltk.core.refactoring.prefs
     目录           0  2016-12-28 17:37  数据库课程设计源码studentManageSystemin
     目录           0  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystem
     目录           0  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcom
     目录           0  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcomzse
     目录           0  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcomzsecontroller
     文件        1355  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcomzsecontrollerController$1.class
     文件        1431  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcomzsecontrollerController$10.class
     文件        1336  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcomzsecontrollerController$11.class
     文件        2719  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcomzsecontrollerController$12.class
     文件        1498  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcomzsecontrollerController$13.class
     文件        2897  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcomzsecontrollerController$14.class
     文件        1513  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcomzsecontrollerController$15.class
     文件        2521  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcomzsecontrollerController$16.class
     文件        2509  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcomzsecontrollerController$17.class
     文件        1032  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcomzsecontrollerController$18$1.class
     文件        2300  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcomzsecontrollerController$18$2.class
     文件        4414  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcomzsecontrollerController$18.class
     文件        1277  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcomzsecontrollerController$19.class
     文件        2818  2016-12-28 17:37  数据库课程设计源码studentManageSysteminstudentManageSystemcomzsecontrollerController$2.class
............此处省略50个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)