forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGysRegist.java
More file actions
38 lines (36 loc) · 1003 Bytes
/
GysRegist.java
File metadata and controls
38 lines (36 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.mingri.info;
import com.mingri.dbconn.DBResult;
import java.sql.*;
public class GysRegist
{
private GysinfoBean gysinfo;
DBResult rst=new DBResult();
public void setGysinfo(GysinfoBean gysinfo)
{
this.gysinfo=gysinfo;
}
public void regist()throws Exception
{
String sql="insert into tb_supplier values(?,?,?,?,?,?,?,?,?,?)";
try
{
PreparedStatement pstmt=rst.getPreparedStatement(sql);
pstmt.setString(1,gysinfo.getGysname());
pstmt.setString(2,gysinfo.getJc());
pstmt.setString(3,gysinfo.getAddress());
pstmt.setString(4,gysinfo.getPostcode());
pstmt.setString(5,gysinfo.getTel());
pstmt.setString(6,gysinfo.getFax());
pstmt.setString(7,gysinfo.getLxr());
pstmt.setString(8,gysinfo.getLxrtel());
pstmt.setString(9,gysinfo.getKhyh());
pstmt.setString(10,gysinfo.getEamil());
pstmt.executeUpdate();
}
catch(Exception e)
{
e.printStackTrace();
throw e;
}
}
}