Package com.lei.entity

Examples of com.lei.entity.Product


 

  private class ProductRowMapper implements RowMapper<Product>{
 
    public Product mapperRow(ResultSet rs) throws SQLException {
      Product p = new Product();
      p.setId(rs.getString("id"));
      p.setName(rs.getString("name"));
      p.setPrice(rs.getFloat("price"));
      p.setShangjia(rs.getBoolean("shangjia"));
      return p;
    }
View Full Code Here


  private void add(HttpServletRequest request, HttpServletResponse response) throws IOException {
    String id=request.getParameter("proid");
    String name=request.getParameter("proname");
    String price=request.getParameter("proprice");
   
    Product pro=new Product();
    ProductDao pd=new ProductDao();
    pro.setId(id);
    pro.setName(name);
    pro.setPrice(2);
    pro.setShangjia(true);
 
    pd.save(pro);
    response.sendRedirect("product.jspx?task=all");
  }
View Full Code Here

    String id=new String(request.getParameter("id").getBytes("ISO8859-1"),"UTF-8");
    String name=request.getParameter("name");
    float price=Float.parseFloat(request.getParameter("price"));
   
    Product pro=new Product();
    ProductDao pd=new ProductDao();
   
    pro.setId(id);
    pro.setName(name);
    pro.setPrice(price);
    pro.setShangjia(true);
    pd.save(pro);
   
    List<Product> list=pd.findAll();
   
    PrintWriter out=response.getWriter();
View Full Code Here

TOP

Related Classes of com.lei.entity.Product

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.