文档介绍:-
. z.
/*==================
wh_remark te*t null,
constraint PK_TB_WH primary key nonclustered (wh_id)
)
go
package .;
import ;
import ;
import ;
-
. z.
import *ception;
import ;
public class DBUtil {
private static final String DRIVER = ".";
private static final String USER = "sa";
private static final String PASSWORD = "admin123";
private static final String URL = "jdbc:sqlserver://localhost:1433;database=db_csms";
static {
try {
(DRIVER);
} catch (ClassNotFoundE*ception e) {
();
}
}
public static Connection getConn() {
Connection conn = null;
try {
conn = (URL, USER, PASSWORD);
} catch (SQLE*ception e) {
();
}
return conn;
}
public static void close(ResultSet rs, Statement st, Connection conn) {
try {
if (rs != null) {
();
}
if (st != null) {
();
}
if (conn != null) {
();
}
} catch (SQLE*ception e) {
();
}
}
}
package .;
public class WareHouseDTO {
// 仓库编号
private int whId;
// 仓库名称
private String whName;
// 仓库总量
-
. z.
private int whTotalNum;
// 仓库地址
private String whAddr;
// 仓库库存量
private int whNum;
// 仓库备注
private String whRemark;
// 无参数的构造方法
public WareHouseDTO() {
}
// 全参数的构造方法
public WareHouseDTO(int whId, String whName, int whTotalNum, String whAddr,
int whNum, String whRemark) {
= whId;
= whName;