91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

電廠培訓管理系統+說明 MYSQL數據庫 針對電廠員員工培訓 有權限管理 職員角色職位管理 Java可視化編程(winbuilder)視頻教程+實踐項目視頻教程 https://download.csdn.net/download/qq_39526676/10530574

資源截圖

代碼片段和文件信息

package?connectDB;


import?java.awt.Font;
import?java.sql.Connection;
import?java.sql.PreparedStatement;
import?java.sql.ResultSet;

import?javax.swing.JOptionPane;
import?javax.swing.UIManager;
import?javax.swing.plaf.FontUIResource;

import?DisposeData.RegisterUser00;



public?class?AddUserToDB?{

private?static?DbUtil?dbUtil=new?DbUtil();

//private?static?RegisterUser類不能用?registerUser;

/**
?*?添加用戶
?*?@param?book
?*?@return
?*?@throws?Exception
?*/
private?static?int?addUser(RegisterUser00?registerUser00)throws?Exception{

Connection?con=dbUtil.getCon();?//?獲取連接
String?sql=“insert?into?user?values(null???????)“;
PreparedStatement?pstmt=con.prepareStatement(sql);
pstmt.setString(1registerUser00.getName());??//?給第一個坑設置值
pstmt.setString(2?registerUser00.getGender());??//?給第二個坑設置值
pstmt.setString(3?registerUser00.getBirthday());?//?給第三個坑設置值
????pstmt.setLong(4? registerUser00.getTelephone() );??//?給第四個坑設置值
pstmt.setString(5registerUser00.getPassword());?
pstmt.setInt(6??registerUser00.getDepartmentId());?
pstmt.setString(7registerUser00.getIdnumber());?
???? pstmt.executeUpdate();



String?sql2;
sql2?=“select?max(id)?from?user“;
????PreparedStatement?pstmt2?=?con.prepareStatement(sql2);
ResultSet?rs?=?pstmt2.executeQuery();????????????????????//?返回結果集ResultSet
rs.next();
int?id=?rs.getInt(1);

String?sql3;
sql3=“insert?into?role?values(‘“+id+“‘‘“+“普通員工“+“‘null)“;
PreparedStatement?pstmt3=con.prepareStatement(sql3);
int?result=pstmt3.executeUpdate();


if(result==1){

???UIManager.put(“OptionPane.buttonFont“?new?FontUIResource(new?Font(“宋體“?Font.PLAIN?23)));
UIManager.put(“OptionPane.messageFont“?new?FontUIResource(new?Font(“宋體“?Font.PLAIN?24)));
JOptionPane.showMessageDialog(null?“注冊成功你的賬號是“+id);

}

?????????????



dbUtil.close(pstmt?con);

return?result;
}



public??void?getdate(RegisterUser00?registerUser00?)?throws?Exception
{



int?result=addUser(?registerUser00);
if(result==1){
System.out.println(“添加成功!“);
}else{
System.out.println(“添加失敗!“);
}
}













/*public?AddUser(User?user)?throws?Exception{

System.out.println(“11111“);

int?result=addUser(user);
if(result==1){
System.out.println(“添加成功!“);
}else{
System.out.println(“添加失敗!“);
}
}*/



}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-07-10?17:29??電廠培訓管理系統\
?????目錄???????????0??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\
?????文件?????????446??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\.classpath
?????文件?????????386??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\.project
?????目錄???????????0??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\.settings\
?????文件?????????598??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\.settings\org.eclipse.jdt.core.prefs
?????目錄???????????0??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\
?????目錄???????????0??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\connectDB\
?????文件????????3275??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\connectDB\AddUserToDB.class
?????文件????????1772??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\connectDB\DbUtil.class
?????文件????????1908??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\connectDB\EnterDB.class
?????文件????????5638??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\connectDB\EssentialPalntDataDB.class
?????文件????????6973??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\connectDB\GradeDataDB.class
?????文件????????2904??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\connectDB\IndexDataDB.class
?????文件????????2460??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\connectDB\OutputUserInformationFromBD.class
?????文件????????5874??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\connectDB\RoleManageDB.class
?????文件????????6262??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\connectDB\StudentDataDB.class
?????文件????????6312??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\connectDB\TrainPlantDateList.class
?????文件????????2780??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\connectDB\TutorDataDB.class
?????文件????????1951??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\connectDB\UpdateOfUser.class
?????目錄???????????0??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\DisposeData\
?????文件????????3553??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\DisposeData\EssentialPalntData.class
?????文件????????3768??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\DisposeData\RegisterUser00.class
?????文件????????1599??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\DisposeData\RoleManage.class
?????文件????????2012??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\DisposeData\ShowGrade.class
?????文件????????1156??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\DisposeData\ShowIndexData.class
?????文件????????2702??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\DisposeData\ShowsuAndChangeUserInformation.class
?????文件????????1698??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\DisposeData\StudentData.class
?????文件????????1525??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\DisposeData\TrainPlantData.class
?????目錄???????????0??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\UI\
?????文件?????????768??2018-07-10?17:14??電廠培訓管理系統\PowerPlant\bin\UI\abcde$1.class
............此處省略141個文件信息

評論

共有 條評論