public faurerMember findequipmentFacturer(String equipmentFacturer) {
String sql = "select * from equipmentFacturer where equipmentFacturer=?";
ResultSet rs = execQuery(sql, new Object[] { equipmentFacturer });
try {
if (rs.next()) {
faurerMember fmb = new faurerMember();
fmb.setEquipmentFacturer(rs.getString("equipmentFacturer"));
fmb.setEquipmentFacturerName(rs .getString("equipmentFacturerName"));
fmb.setEquipmentFacturerAddress(rs .getString("equipmentFacturerAddress"));
fmb.setEquipmentFacturerPostcode(rs .getString("equipmentFacturerPostcode"));
fmb.setEquipmentFacturerPhone(rs .getString("equipmentFacturerPhone"));
fmb.setEquipmentFacturerPerson(rs .getString("equipmentFacturerPerson"));
fmb.setAgentName(rs.getString("agentName"));
fmb.setAgentAddress(rs.getString("agentAddress"));
fmb.setAgentPostcode(rs.getString("agentPostcode"));
fmb.setAgentPhone(rs.getString("agentPhone"));
fmb.setAgentPerson(rs.getString("agentPerson"));
fmb.setAfterServiceName(rs.getString("afterServiceName"));
fmb.setAfterServiceAddress(rs.getString("afterServiceAddress"));
fmb.setAfterServicePostcode(rs .getString("afterServicePostcode"));
fmb.setAfterServicePhone(rs.getString("afterServicePhone"));
fmb.setProduct(rs.getString("product"));
fmb.setRemark1(rs.getString("remark1"));
return fmb;
}
}
catch (SQLException e) {
// TODO Auto-generated catch block e.printStackTrace();
}finally {
super.clossAll();
} return null;
}
public List<faurerMember> findequipmentFacturerName(String name) {
String sql = "select * from equipmentFacturer where equipmentFacturerName like ?";
Object[] params = {"%"+name+"%"};
ResultSet rs = super.execQuery(sql, params);
List<faurerMember> flist = new ArrayList<faurerMember>();
try { while(rs.next()) {
faurerMember fmb = new faurerMember();
fmb.setEquipmentFacturer(rs.getString("equipmentFacturer"));
fmb.setEquipmentFacturerName(rs .getString("equipmentFacturerName"));
fmb.setEquipmentFacturerAddress(rs .getString("equipmentFacturerAddress"));
fmb.setEquipmentFacturerPostcode(rs .getString("equipmentFacturerPostcode"));
fmb.setEquipmentFacturerPhone(rs .getString("equipmentFacturerPhone"));
fmb.setEquipmentFacturerPerson(rs .getString("equipmentFacturerPerson"));
fmb.setAgentName(rs.getString("agentName"));
fmb.setAgentAddress(rs.getString("agentAddress"));
fmb.setAgentPostcode(rs.getString("agentPostcode"));
fmb.setAgentPhone(rs.getString("agentPhone"));
fmb.setAgentPerson(rs.getString("agentPerson"));
fmb.setAfterServiceName(rs.getString("afterServiceName"));
fmb.setAfterServiceAddress(rs.getString("afterServiceAddress"));
fmb.setAfterServicePostcode(rs .getString("afterServicePostcode"));
fmb.setAfterServicePhone(rs.getString("afterServicePhone"));
fmb.setProduct(rs.getString("product"));
fmb.setRemark1(rs.getString("remark1"));
flist.add(fmb);
}
} catch (SQLException e) {
// TODO Auto-generated catch block e.printStackTrace();
} finally { super.clossAll();
} return flist;
}