資源簡介
大三實訓課所寫項目,基于Servlet編寫,有最基礎的增刪改查功能,以及登錄驗證,驗證碼,cookies等,適合新手練習學習參考,代碼簡單易懂
代碼片段和文件信息
package?dao;
import?user.employee;
import?java.sql.ResultSet;
import?java.sql.SQLException;
import?java.sql.Statement;
public?class?addemployee?{
????public?boolean?add(employee?user)?throws?SQLException?{
????????connect?con?=new?connect();
????????Statement?s1=con.getcon();
????????if(user.getDepart().equals(“技術部“)){
????????????user.setDepart_id(2);
????????}else?if(user.getDepart().equals(“開發部“)){
????????????user.setDepart_id(3);
????????}else?if(user.getDepart().equals(“銷售部“)){
????????????user.setDepart_id(1);
????????}
????????if(user.getPosition().equals(“設計師“)){
????????????user.setPos_id(1);
????????}else?if(user.getPosition().equals(“程序員“)){
????????????user.setPos_id(2);
????????}else?if(user.getPosition().equals(“銷售員“)){
????????????user.setPos_id(3);
????????}
????????String?str=“INSERT?INTO?talents?(namedepart_idpos_idsexualbirthdayedu_backgroundunemploy_datebody_heightbody_weightstatus)??VALUES?(‘“+user.getName()+“‘‘“+user.getDepart_id()+“‘‘“+user.getPos_id()+“‘‘“+user.getSexual()+“‘‘“+user.getBirthday()+“‘‘“+user.getEdu_background()+“‘‘“+user.getUnemploy_date()+“‘‘“+user.getBody_height()+“‘‘“+user.getBody_weight()+“‘‘“+user.getstatus()+“‘)“;
????????????int?b1=s1.executeUpdate(str);
????????????if(b1>0){
????????????????return?true;
????????????}else{
????????????????return?false;
????????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????489??2018-06-12?09:56??hr\.idea\artifacts\hr_war_exploded.xm
?????文件????????279??2018-06-12?09:56??hr\.idea\misc.xm
?????文件????????244??2018-06-12?09:56??hr\.idea\modules.xm
?????文件???????8792??2018-06-12?09:56??hr\.idea\uiDesigner.xm
?????文件??????72086??2018-06-15?11:53??hr\.idea\workspace.xm
?????文件???????1275??2018-06-12?09:55??hr\hr.iml
?????文件???????7869??2018-06-13?21:43??hr\out\artifacts\hr_war_exploded\assets\img\backtop.png
?????文件??????30720??2018-06-15?10:42??hr\out\artifacts\hr_war_exploded\chart.jsp
?????文件??????44417??2018-06-15?08:46??hr\out\artifacts\hr_war_exploded\department.jsp
?????文件??????40513??2018-06-15?08:08??hr\out\artifacts\hr_war_exploded\department_form.jsp
?????文件??????45336??2018-06-15?08:46??hr\out\artifacts\hr_war_exploded\employee_tranform.jsp
?????文件??????46577??2018-06-15?08:12??hr\out\artifacts\hr_war_exploded\form.jsp
?????文件???????1884??2018-06-13?21:43??hr\out\artifacts\hr_war_exploded\index.jsp
?????文件??????26413??2018-06-14?21:14??hr\out\artifacts\hr_war_exploded\Main.jsp
?????文件??????46365??2018-06-15?08:46??hr\out\artifacts\hr_war_exploded\person.jsp
?????文件??????43546??2018-06-15?08:46??hr\out\artifacts\hr_war_exploded\positions.jsp
?????文件??????39826??2018-06-15?08:12??hr\out\artifacts\hr_war_exploded\positions_form.jsp
?????文件?????197513??2018-06-15?02:49??hr\out\artifacts\hr_war_exploded\static\css\bootstrap.css
?????文件???????2025??2018-06-13?21:43??hr\out\artifacts\hr_war_exploded\static\css\component.css
?????文件????????136??2018-06-13?21:43??hr\out\artifacts\hr_war_exploded\static\css\custom-landing.css
?????文件????????136??2018-06-13?21:43??hr\out\artifacts\hr_war_exploded\static\css\custom.css
?????文件????????587??2018-06-13?21:43??hr\out\artifacts\hr_war_exploded\static\css\demo.css
?????文件??????72418??2018-06-13?21:43??hr\out\artifacts\hr_war_exploded\static\css\icons.css
?????文件??????55838??2018-06-13?21:43??hr\out\artifacts\hr_war_exploded\static\css\landing.css
?????文件??????73696??2018-06-13?21:43??hr\out\artifacts\hr_war_exploded\static\css\main.css
?????文件???????1825??2018-06-13?21:43??hr\out\artifacts\hr_war_exploded\static\css\normalize.css
?????文件?????188319??2018-06-13?21:43??hr\out\artifacts\hr_war_exploded\static\css\plugins.css
?????文件???????1738??2018-06-13?21:43??hr\out\artifacts\hr_war_exploded\static\css\sprflat-theme\images\animated-overlay.gif
?????文件????????498??2018-06-13?21:43??hr\out\artifacts\hr_war_exploded\static\css\sprflat-theme\images\handle.png
?????文件????????212??2018-06-13?21:43??hr\out\artifacts\hr_war_exploded\static\css\sprflat-theme\images\ui-bg_flat_0_aaaaaa_40x100.png
............此處省略2341個文件信息
評論
共有 條評論