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

📄 storeorder.java

📁 这是一个小程序 网上书店用的 我们学生做的一个小实验
💻 JAVA
字号:
package bean;
import java.util.*;
import java.sql.*;

/** 
 * This bean represents a heavyweight customer.
 * @author  ProjectGroup
 * @version 1.0.0
 */
public class StoreOrder{
    
    /**
     * class StoreCustomer constructor
     */
    public StoreOrder() 
    {}
    /**
     * addCustomer add a new customer to the table
     * @param num int num of customer to create
     * @retrun boolean
     */
    public static boolean addOrder(String inNum,String incnum, String inAddress, String incardnum, String inShipdate,
		  String inPlacedate, String inShipmethod, double inCost)
	throws Exception {
	
	DBWrapper myConnection = DBWrapper.Instance();
	String sqlQuery = "insert into order values('"+inNum+"','"+incnum+"','"+inAddress+"','"+incardnum+"','"+inShipdate+"','"+null+"','"+inShipmethod+"','"+inCost+"')";
	boolean r=false;
	r = myConnection.runUpdate(sqlQuery); 
	return r;
    }
}

⌨️ 快捷键说明

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