?? tb_init_boss_sql.java
字號:
package swing;
import com.bwm.string.Str;
import com.zh.conpool.*;
import java.sql.Connection;
import java.sql.ResultSet;
public class tb_init_boss_sql{
private String sql="";
private ResultSet rs=null;
private int del=0;
private String delid="";
private String edit="";
private String[] rest=new String[9];
private String like="";
Condata con=new Condata();
Connection conn=null;
Str str=new Str();
public ResultSet toRs(String sqls){
this.sql=sqls;
try{
con.getConnection();
rs=con.executeQuery(sql);
}catch(Exception eee){
System.out.println(eee.getMessage());
}
return rs;
}
public String[] toEdit(String edit){
this.edit=edit;
try{
sql="select * from tb_th_boss where ID='"+edit+"'";
con.getConnection();
rs=con.executeQuery(sql);
if(rs.next()){
rest[0]=rs.getString(2);
rest[1]=rs.getString(3);
rest[2]=rs.getString(4);
rest[3]=rs.getString(5);
rest[4]=rs.getString(6);
rest[5]=rs.getString(7);
rest[6]=rs.getString(8);
rest[7]=rs.getString(9);
rest[8]=rs.getString(10);
}
}catch(Exception eee){
System.out.println(eee.getMessage());
}
return rest;
}
public int toDel(String id){
this.delid=id;
try{
sql="delete from tb_th_boss where ID='"+delid+"'";
con.getConnection();
del=con.executeUpdate(sql);
}catch(Exception eee){
System.out.println(eee.getMessage());
}
return del;
}
public void close(){
try{
conn=null;
}catch(Exception e){
System.out.print("f1");
}
try{
con.close();
con=null;
}catch(Exception ee){
System.out.print("f");
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -