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

📄 restaurantmenu41.java

📁 酒店管理asp的源代码和各种文档说明,很齐全的,只要你解压后就能运行程序.
💻 JAVA
字号:
package restaurant;
import java.io.*;
import java.sql.*;
import javax.swing.JOptionPane;
import java.util.Vector;

public class RestaurantMenu41{

	private DBCon con;
	private Read read;
	private Exit exit;
	private Common common;
    ResultSet rs=null;

	public void selectFoodInfo(String customerType){
	     String sql="select * from sales where foodType='"+customerType+"'";

         con = new DBCon();
	     read = new Read(con.getConnection());    
         rs=read.executeQuery(sql);       
    }
      
    public int getFoodInfo(){
    	int total=0;
    	try{
    		while(rs.next()){
    			total+=rs.getInt("amount") * rs.getInt("pay");
    		}
        }catch(SQLException e){
		   System.err.println(e.getMessage());
		}
		exit = new Exit(con.getConnection());
        exit.Close();
		
		return total;
    } 
}

⌨️ 快捷键说明

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