• 大小: 5.6MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-01
  • 语言: Java
  • 标签: 网站  

资源简介

JSP+SERVLET+JAVABEAN

资源截图

代码片段和文件信息

package com.fendou.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;

import com.fendou.exception.GoodsException;
import com.fendou.exception.UserException;
import com.fendou.platform.DBConnection;
import com.fendou.vo.OrderCarryMode;
import com.fendou.vo.Address;
import com.fendou.vo.GoodsType;
import com.fendou.vo.OrderPayMode;

public class DwrCommon {
private Connection conn;

private Statement stm;
private ResultSet rs;
private DBConnection db=DBConnection.getInstance();

public int isMember(String name)throws UserException{

String sql = “select count(MemberID) from T_Member where MemberName=‘“+name+“‘“; 

        try{
         conn=db.getConnection();
         stm = conn.createStatement();
         rs=stm.executeQuery(sql);
         int count=0;
         while(rs.next()){
         count=rs.getInt(1);
         }
         return count;
        }catch(SQLException e){
         throw new UserException(“isMember error“);
        }finally{
         db.closeConnection(conn stm rs);        
        }
}

public List getGoodsType(String ParentID)  throws GoodsException{
        String sql = “select * from T_GoodsType where ParentID=‘“+ParentID+“‘“; 
        
        List list=new ArrayList();
        try{
         conn=db.getConnection();
         stm = conn.createStatement();
         rs=stm.executeQuery(sql);        
         while(rs.next()){
         GoodsType type=new GoodsType();
         type.setTypeCode(rs.getString(“TypeCode“));
         type.setTypeName(rs.getString(“TypeName“));
         list.add(type);
         }
         return list;
        }catch(SQLException e){
         throw new GoodsException(“getGoodsType error“);
        }finally{
         db.closeConnection(conn stm rs);        
        }
}
public List
 getProvinceType(){
String sql=“select * from T_Province“;
List
 list=new ArrayList
();
try{
conn=db.getConnection();
stm=conn.createStatement();
rs=stm.executeQuery(sql);
while(rs.next()){
Address address=new Address();
address.setProvinceCode(rs.getString(“ProvinceCode“));
address.setProvinceName(rs.getString(“Province“));
list.add(address);
}
}catch(SQLException e){
System.out.print(e);
}finally{
db.closeConnection(conn stmrs);
}
return list;
}
public List
 getCityType(String id){
String sql=“select * from T_City where CityCode like ‘“+id+“%‘“;
List
 list=new ArrayList
();
try{
conn=db.getConnection();
stm=conn.createStatement();
rs=stm.executeQuery(sql);
while(rs.next()){
Address address=new Address();
address.setCityCode(rs.getString(“CityCode“));
address.setCityName(rs.getString(

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1211  2010-03-30 20:52  myshop\.classpath

     文件        292  2010-05-11 21:14  myshop\.mymetadata

     文件       1224  2009-05-11 13:25  myshop\.project

     文件       1040  2010-05-05 12:35  myshop\.settings\com.genuitec.eclipse.j2eedt.core.prefs

     文件         82  2009-05-11 13:25  myshop\.settings\org.eclipse.core.resources.prefs

     文件       7041  2009-05-11 13:25  myshop\server.xml

     文件       5437  2009-05-11 13:25  myshop\src\com\fendou\dao\DwrCommon.java

     文件      10125  2009-05-11 13:25  myshop\src\com\fendou\dao\GoodsManage.java

     文件      10952  2009-05-11 13:25  myshop\src\com\fendou\dao\MemberManage.java

     文件      18476  2009-05-11 13:25  myshop\src\com\fendou\dao\OrderManage.java

     文件       4222  2009-05-11 13:25  myshop\src\com\fendou\dao\PlacardManage.java

     文件       1713  2009-05-11 13:25  myshop\src\com\fendou\dao\TypeManage.java

     文件       2024  2009-05-11 13:25  myshop\src\com\fendou\dao\UserManage.java

     文件        466  2009-05-11 13:25  myshop\src\com\fendou\exception\GoodsException.java

     文件        477  2009-05-11 13:25  myshop\src\com\fendou\exception\MemberException.java

     文件        449  2009-05-11 13:25  myshop\src\com\fendou\exception\UserException.java

     文件       1201  2009-05-11 13:25  myshop\src\com\fendou\manage\servlet\AddGoodsGuidServlet.java

     文件       1453  2009-05-11 13:25  myshop\src\com\fendou\manage\servlet\AddGoodsNumberGuidServlet.java

     文件       2077  2009-05-11 13:25  myshop\src\com\fendou\manage\servlet\AddGoodsNumberServlet.java

     文件       3757  2009-05-11 13:25  myshop\src\com\fendou\manage\servlet\AddGoodsServlet.java

     文件       1083  2009-05-11 13:25  myshop\src\com\fendou\manage\servlet\AddPlacardGuidServlet.java

     文件       3100  2009-05-11 13:25  myshop\src\com\fendou\manage\servlet\AddPlacardServlet.java

     文件       1050  2009-05-11 13:25  myshop\src\com\fendou\manage\servlet\DeleteGoodsGuidServlet.java

     文件       1742  2009-05-11 13:25  myshop\src\com\fendou\manage\servlet\DeleteGoodsServlet.java

     文件       1550  2009-05-11 13:25  myshop\src\com\fendou\manage\servlet\DeleteMemberGuidServlet.java

     文件       1579  2009-05-11 13:25  myshop\src\com\fendou\manage\servlet\DeletePlacardServlet.java

     文件       1957  2009-05-11 13:25  myshop\src\com\fendou\manage\servlet\GoodsDetailServlet.java

     文件       2109  2009-05-11 13:25  myshop\src\com\fendou\manage\servlet\GoodsListServlet.java

     文件       1522  2009-05-11 13:25  myshop\src\com\fendou\manage\servlet\GoodsModifyServlet.java

     文件       1634  2009-05-11 13:25  myshop\src\com\fendou\manage\servlet\GoodTypeMenuServlet.java

............此处省略346个文件信息

评论

共有 条评论