📄 showplan.java
字号:
package swing;
import com.zh.conpool.Condata;
import java.sql.ResultSet;
import swing.ShowBeanCut;
import java.sql.Connection;
public class ShowPlan implements java.io.Serializable{
ResultSet rs=null;
String ids="";
Condata con=new Condata();
Connection conn=null;
ShowBeanCut show=new ShowBeanCut();
public ShowPlan(){
try{
con.getConnection();
}catch(Exception e){
e.getStackTrace();
}
}
public ShowBeanCut toShow(String id){
this.ids=id;
String sql="select * from tb_th_plan where ID='"+ids+"'";
try{
rs=con.executeQuery(sql);
if(rs.next()){
show.setA(rs.getString(2));
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;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -