web用户管理系统源代码.doc//.tools;;;;lassDBUtil{onnectiongetConnection()throwsClassNotFoundException,SQLException{//•包//();〃 (njdbc:oracle:thin:***@localhost:1521:orcl”,^scott11,HtigerH);returnconn;//.dao;;;;;;;;;.;.;lassEmpDAO{publicstaticvoidmain(String[]args)throwsClassNotFoundException,SQLException{EmpDAOdao=newEmpDAO();();publicArrayList<Emp>queryAll()throwsClassNotFoundException,ption{Connectionconn=DBUtiLgetConnection();//=();//="select*fromemp";//=(sql);ArrayList<Emp>list=newArrayList<Emp>();while(()){Empc=newEmp();((nempnoM));((MenameH));(("job"));((Hmgrn));(("salu));(rs>getFloat(HcomrnM));Datedate=(HhiredateH);(()+1900+”年”+(()+1)+"月"+()+”日”);((Hdeptnou));(c);}//();();();returnlist;}publicEmpfindById(intid)throwsClassNotFoundException,SQLException{Connectionconn=DBUtiLgetConnection();//SQL语句生成Stringsql=nselect*fromempwhereempno=?H;tps=(sql);(l,id);ResultSetrs=;Empe=newEmp();if(()){((HempnoH));((nenameH));((,fjobM));((umgrH));(("salu));(rs>getFloat(McommM));Dated=(MhiredateH);=(());Stringstr=()+1900+ +(()+1)+ +();
web用户管理系统源代码 来自淘豆网www.taodocs.com转载请标明出处.