高等院校计算机专业毕业设计指导及开发实例丛书-公司人事管理系统
源代码在线查看: dd.jsp
personAdd1
String personID = new String((request.getParameter("personID")).getBytes("ISO8859-1"),"gb2312");
String personname=request.getParameter("personname");
String ID=request.getParameter("ID");
int sex=Integer.parseInt(request.getParameter("sex"));
String Syear=request.getParameter("Syear");
String Smonth=request.getParameter("Smonth");
String Sday=request.getParameter("Sday");
String Eyear=request.getParameter("Eyear");
String Emonth=request.getParameter("Emonth");
String Eday=request.getParameter("Eday");
String Byear=request.getParameter("Byear");
String Bmonth=request.getParameter("Bmonth");
String Bday=request.getParameter("Bday");
int web=Integer.parseInt(request.getParameter("web"));
int marries=Integer.parseInt(request.getParameter("marries"));
String school=request.getParameter("school");
String level = request.getParameter("level");
String telephone=request.getParameter("telephone");
String mtel=request.getParameter("mtel");
String room=request.getParameter("room");
String password = request.getParameter("password");
String username=request.getParameter("username");
String Sdate;
Sdate=Syear+Smonth+Sday;
String Edate;
Edate=Eyear+Emonth+Eday;
String Bdate;
Bdate=Byear+Bmonth+Bday;
String sql=sql+"insert into wglPERSON ";
sql=sql+"(EMP_CODE,";
sql=sql+"EMP_NAME,";
sql=sql+"EMP_DEPT,";
sql=sql+"EMP_SEX,";
sql=sql+"EMP_BIRTHDAY,";
sql=sql+"EMP_INDATE,";
sql=sql+"EMP_WEB,";
sql=sql+"EMP_MARRY,";
sql=sql+"EMP_SCHOOL,";
sql=sql+"EMP_RADUATION,";
sql=sql+"EMP_EDUCATION,";
sql=sql+"EMP_TEL,";
sql=sql+"EMP_HANDTEL,";
sql=sql+"EMP_ADRESS,";
sql=sql+"EMP_LOGNAME,";
sql=sql+"EMP_PASSWORD)";
sql=sql+" values(";
sql=sql+"'"+personID+"',";
sql=sql+"'"+personname+"',";
sql=sql+"'"+ID +"',";
sql=sql+"" + sex + ",";
sql=sql+"'"Bdate)+"',";
sql=sql+"'"Sdate)+"',";
sql=sql+"" + web + ",";
sql=sql+"" + marries + ",";
sql=sql+"'"+school+"',";
sql=sql+"'"+Edate+"',";
sql=sql+"'"+level+"',";
sql=sql+"'"+telephone+"',";
sql=sql+"'"+mtel+"',";
sql=sql+"'"+room+"',";
sql=sql+"'"+username+"',";
sql=sql+"'"+password+"')";
ResultSet rs=db.executeQuery(sql);
%>
您已经插入成功!
返回