?? showboss.java
字號:
package swing;
import com.zh.conpool.Condata;
import java.sql.ResultSet;
import swing.ShowBeanEat;
import java.sql.Connection;
public class ShowBoss implements java.io.Serializable{
ResultSet rs=null;
String ids="";
Condata con=new Condata();
Connection conn=null;
ShowBeanEat show=new ShowBeanEat();
public ShowBoss(){
try{
con.getConnection();
}catch(Exception e){
e.getStackTrace();
}
}
public ShowBeanEat toShow(String id){
this.ids=id;
String sql="select * from tb_th_boss where ID='"+ids+"'";
try{
rs=con.executeQuery(sql);
if(rs.next()){
show.setA(rs.getString("Name"));
show.setB(rs.getString(3));
show.setC(rs.getString(4));
show.setD(rs.getString(5));
show.setE(rs.getString(6));
show.setF(rs.getString(7));
show.setG(rs.getString(8));
show.setL(rs.getString(9));
show.setI(rs.getString(10));
}
}catch(Exception eee){
show.setA(sql);
eee.getStackTrace();//.getMessage();
}finally{
try{
if(rs!=null)
rs.close();
rs=null;
}catch(Exception e1){
rs=null;
}
try{
if(con!=null)
con.close();
con=null;
}catch(Exception e2){
con=null;
}
try{
if(conn!=null)
conn.close();
conn=null;
}catch(Exception e2){
conn=null;
}
}
return show;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -