⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 payfor.java

📁 基于java的超市购物进销存管理系统 java 超市进销存
💻 JAVA
字号:
package lgcsgwxt.means;
import lgcsgwxt.*;
import java.sql.*;

public class PayFor {
private static final String SQL_SAVE = "INSERT INTO PaymentList(OddNumber,Victualer,Coin,PaymentValues,PaymentFashion,ChequeNumber,Dates,DealWithMan,MakeLiseMan) VALUES(?, ?, ?,?, ?, ?, ?, ?,?);";
public static boolean save(int oddNumber,String victualer,String coin,String PaymentValues,String paymentFashion,String chequeNumber,String dates,String dealWithMan,String makeLiseMan){
            boolean issuccess=false;
            Connection conn=null;
            PreparedStatement pstmt=null;
            DBAccess dd=new DBAccess();
            conn=dd.getConnection();
            try {
                pstmt = conn.prepareStatement(SQL_SAVE);
                pstmt.setInt(1,oddNumber);
                pstmt.setString(2,victualer);
                pstmt.setString(3,coin);
                pstmt.setString(4,PaymentValues);
                pstmt.setString(5,paymentFashion);
                pstmt.setString(6,chequeNumber);
                pstmt.setString(7,dates);
                pstmt.setString(8,dealWithMan);
                pstmt.setString(9,makeLiseMan);
                int result=pstmt.executeUpdate();
                if(result!=0){
                    issuccess=true;
                }
              } catch (Exception ex) {
                ex.printStackTrace();
            }finally{
                try {
                    if(pstmt!=null){
                        pstmt.close();
                    }
                    if(conn!=null){
                        conn.close();
                    }
                } catch (Exception ex) {

                }
            }
        return issuccess;

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -