?? restaurantmenu12.java
字號:
package restaurant;
import java.io.*;
import java.sql.*;
import javax.swing.JOptionPane;
import java.util.Vector;
public class RestaurantMenu12{
private DBCon con;
private Read read;
private Write write;
private Exit exit;
private Common common;
ResultSet rs=null;
public void selectLogInfo(){
String sql="select * from system";
con = new DBCon();
read = new Read(con.getConnection());
rs=read.executeQuery(sql);
}
public Vector getLogInfo(){
Vector vec = new Vector();
try{
while(rs.next()){
vec.addElement(rs.getString("information"));
}
}catch(SQLException e){
System.err.println(e.getMessage());
}
exit = new Exit(con.getConnection());
exit.Close();
return vec;
}
public void clearLog(String operator){
common = new Common();
operator=common.toChinese(operator);
String sql="delete from system";
con = new DBCon();
write = new Write(con.getConnection());
write.executeUpdate(sql);
exit = new Exit(con.getConnection());
exit.Close();
common.WriteSystemLog("酒店經理:"+operator+"清空了日志");
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -