use of com.zyf.bean.Medicalhistory in project HeartWatchdogJsp by Viczyf.
the class MedicalhistoryDao method queryList.
public List queryList(int uid) {
String sql = "select * from medicalhistory where uid='" + uid + "' order by id desc";
ArrayList list = new ArrayList();
Medicalhistory mhis = null;
ResultSet rs = this.connection.executeQuery(sql);
if (rs != null) {
try {
while (rs.next()) {
mhis = new Medicalhistory();
mhis.setId(rs.getInt("id"));
mhis.setUid(rs.getInt("uid"));
mhis.setCity(rs.getString("city"));
mhis.setDate(rs.getString("date"));
mhis.setHospital(rs.getString("hospital"));
mhis.setOffice(rs.getString("office"));
mhis.setDoctor(rs.getString("doctor"));
mhis.setConclusion(rs.getString("conclusion"));
list.add(mhis);
}
} catch (SQLException e) {
e.printStackTrace();
}
}
return list;
}
Aggregations