📄 amentgatherswatch.java~4~
字号:
package scout.operation.gather_swatch;
import java.util.*;
import scout.util.*;
import scout.database.util.*;
import java.sql.*;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2006</p>
*
* <p>Company: Chongqing Kemeida corporation</p>
*
* @author Leizhao
* @version 1.0
*/
public class AmentGatherSwatch {
public AmentGatherSwatch() {
}
Connection con = null;
/** 返回所有数据 */
public Vector getResult(String id) {
Vector v = new Vector();
ConnDataBase db = new ConnDataBase();
this.con = db.getConnection();
QueryData qd = new QueryData(con);
String sql = "select * from swatchlist where swatchNoteID =" + id;
System.out.println("sql:"+sql);
ResultSet rs = qd.getResultSet(sql);
try {
while (rs.next()) {
Object[] obj = new Object[5];//读取两个数据。
obj[0] = rs.getString("number");
obj[1] = rs.getString("swatchClass");
obj[2] = rs.getString("swatchNumber");
obj[3] = rs.getInt("packClass");
obj[4] = rs.getString("id");
//查找与之对应的权限名称。
System.out.println("obj[0]: " + obj[0]);
System.out.println("obj[4]: " + obj[5]);
v.add(obj);
}
rs.close();
con.close();
} catch (Exception ex) {
ex.printStackTrace();
}
return v;
}
public static void main(String[] args) {
AmentGatherSwatch ae = new AmentGatherSwatch();
Vector v = new Vector();
v = ae.getResult("1");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -