Package com.hygj.bean

Examples of com.hygj.bean.ProductsBean


    try {
      pt=conn.prepareStatement("select * from products");
      rs=pt.executeQuery();
      products=new ArrayList();
      while(rs.next()){
        product=new ProductsBean(rs.getInt(1),rs.getString(2),rs.getFloat(3),rs.getInt(4));
        products.add(product);       
      }
    } catch (SQLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here


    try {
      pt=conn.prepareStatement("select * from products where productId=?");
      pt.setInt(1,productId);
      rs=pt.executeQuery();
      if(rs.next()){
        product=new ProductsBean(rs.getInt(1),rs.getString(2),rs.getFloat(3),rs.getInt(4));
      }
    } catch (SQLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }finally{
View Full Code Here

TOP

Related Classes of com.hygj.bean.ProductsBean

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.