摘要:
package cn.itcast.web.controller;import java.io.IOException;import javax.servlet.ServletException;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import cn.itcast.domain.Customer;import cn.itcast.serivce.BusinessService 阅读全文
posted @ 2013-07-07 11:19
亂舞春秋
阅读(292)
评论(0)
推荐(0)
摘要:
package cn.itcast.utils;import java.util.Date;import java.util.Enumeration;import java.util.UUID;import javax.servlet.http.HttpServletRequest;import org.apache.commons.beanutils.BeanUtils;import org.apache.commons.beanutils.ConvertUtils;import org.apache.commons.beanutils.locale.converters.DateLocal 阅读全文
posted @ 2013-07-07 11:16
亂舞春秋
阅读(379)
评论(0)
推荐(0)
摘要:
package cn.itcast.utils;import java.io.InputStream;import java.sql.Connection;import java.sql.DriverManager;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;import java.util.Properties;public class JdbcUtils { private static String url = null; private static... 阅读全文
posted @ 2013-07-07 11:15
亂舞春秋
阅读(247)
评论(0)
推荐(0)
摘要:
//得到总记录数 public int getTotalrecord(){ Connection conn = null; PreparedStatement st = null; ResultSet rs = null; try{ conn = JdbcUtils.getConnection(); String sql = "select count(*) from customer"; st = conn.prepareStatement(sql); ... 阅读全文
posted @ 2013-07-07 11:08
亂舞春秋
阅读(311)
评论(0)
推荐(0)
摘要:
//获取分页数据 public List getPageData(int startindex,int pagesize){ Connection conn = null; PreparedStatement st = null; ResultSet rs = null; try{ conn = JdbcUtils.getConnection(); String sql = "select * from customer limit ?,?"; st = conn.p... 阅读全文
posted @ 2013-07-07 11:06
亂舞春秋
阅读(331)
评论(0)
推荐(0)
摘要:
public Customer find(String id){ Connection conn = null; PreparedStatement st = null; ResultSet rs = null; try{ conn = JdbcUtils.getConnection(); String sql = "select * from customer where id=?"; st = conn.prepareStatement(sql); ... 阅读全文
posted @ 2013-07-07 11:05
亂舞春秋
阅读(233)
评论(0)
推荐(0)
摘要:
public void delete(String id){ Connection conn = null; PreparedStatement st = null; ResultSet rs = null; try{ conn = JdbcUtils.getConnection(); String sql = "delete from customer where id=?"; st = conn.prepareStatement(sql); st.... 阅读全文
posted @ 2013-07-07 11:04
亂舞春秋
阅读(255)
评论(0)
推荐(0)
摘要:
public void update(Customer c){ Connection conn = null; PreparedStatement st = null; ResultSet rs = null; try{ conn = JdbcUtils.getConnection(); String sql = "update customer set name=?,gender=?,birthday=?,cellphone=?,email=?,preference=?,type=?,desc... 阅读全文
posted @ 2013-07-07 11:03
亂舞春秋
阅读(274)
评论(0)
推荐(0)
浙公网安备 33010602011771号