freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于java的餐廳點菜系統(tǒng)-資料下載頁

2025-06-24 15:35本頁面
  

【正文】 onPerformed(ActionEvent e) { String cmd = ()。 if ((確 定)) { if (menu != null) {// 保存數(shù)據(jù) (op)。 } } else if ((結 帳)) { new jiezhang()。 } else if((取消)){ try { ()。//裝載數(shù)據(jù)庫驅(qū)動程序 //建立一個數(shù)據(jù)庫連接 Connection con = (jdbc:odbc:jiudian, test, 1234)。 Statement stmt = ()。//創(chuàng)建一個Statement對象 (delete from jiudian )。//向數(shù)據(jù)庫發(fā)送SQL語句——刪除記錄 }catch (Exception em) { } clean()。} }}public class MenuInfo { // 標志哪道菜被點了? private boolean[] remark = new boolean[]。 // 每道菜對應的價格 private int[] price = {45, 58, 36, 36,30,48,15,55,18,25}。 // 每道菜對應的菜名 private String[] name = { 球溪鰱魚 , 黑椒牛排 , 澳洲小龍蝦 , 秘制小肉丸,重慶辣子雞,尖椒臘肉,魚香土豆,燒豬蹄,生燜藕片,番茄菜花}。 /*** * 如果菜名、價錢從數(shù)據(jù)庫中讀取請在此構造函數(shù)中初始化 * */ public MenuInfo() { // 創(chuàng)建時默認為 false for (int i = 0。 i 。 i++) remark[i] = false。 } /** * 標志第幾道菜被點了 * */ public void setOrderMenu(int item) { // 點了的就取消 ,沒點的就點上 remark[item] = !remark[item]。 } /** * 標志第幾道菜被點了 * * @param item * 菜單索引值 * @param mark * false 沒點 true 已點 */ public void setOrderMenu(int item, boolean mark) { remark[item] = mark。 } /** * 按確定時保存數(shù)據(jù) * * @param item * 餐桌號 */ public void save(int item) { // 數(shù)據(jù)庫操作 try { //裝載數(shù)據(jù)庫驅(qū)動程序 ()。 //建立一個數(shù)據(jù)庫連接Connection con = (jdbc:odbc:jiudian, test, 1234)。 Statement stmt = ()。 //創(chuàng)建一個Statement對象 String SQLOrder。//字符串變量,存放SQL語句 // 保存點中的菜 for (int i = 0。 i 。 i++) { if (remark[i]) { //執(zhí)行Insert語句 SQLOrder = Insert Into jiudian Values ( + item + ,39。+ name[i] + 39。, + price[i] + )。 (SQLOrder)。//向數(shù)據(jù)庫中寫入語句 } } // 關閉數(shù)據(jù)庫連接 ()。 ()。 } catch (Exception em) { } }}結賬功能:public class jiezhang implements ActionListener { private JDialog Dialog。 private JLabel L1, L2, L3, L4, L5。 private JTextField F1 = new JTextField()。 public jiezhang() { Dialog = new JDialog()。 (結賬)。 Container dialogPane = ()。 ()。 (new GridLayout(4, 2))。 L1 = new JLabel(請輸入您的桌號, )。 L2 = new JLabel(您總共消費了:, )。 L4 = new JLabel(您總共點了:, )。 L3 = new JLabel( , )。 L5 = new JLabel( , )。 ()。 (L1)。 (F1)。 (L2)。 (L3)。 (L4)。 (L5)。 JButton b1 = new JButton(確定)。 ()。 (b1)。 JButton b2 = new JButton(取消)。 ()。 (b2)。 (this)。 (this)。 ().setDefaultButton(b1)。 //設置窗體回車對應按鈕 (400, 400, 300, 300)。 (true)。 } public void actionPerformed(ActionEvent e) { String cmd = ()。 if ((確定)) { try { //裝載數(shù)據(jù)庫驅(qū)動程序 ()。 //建立一個數(shù)據(jù)庫連接 Connection con = (jdbc:odbc:jiudian, test, 1234)。 Statement stmt = ()。//創(chuàng)建一個Statement對象 int sa=(())。 //執(zhí)行查詢語句,保存查詢返回的結果 ResultSet rs=(select sum(values) from jiudian)。 while(()){ //移動指針,依次訪問結果集中的每一行 ( +(1)+元)。 } ResultSet rr = (select * from jiudian)。 int j = 0。 while (()){ j = j + 1。 } ( + j + 份菜)。 (delete from jiudian )。//向數(shù)據(jù)庫發(fā)送SQL語句——刪除記錄 (Dialog, 謝謝惠顧!, ,)。 ()。 ()。 } catch (Exception em) { } } if ((取消)) { ()。 } }}
點擊復制文檔內(nèi)容
畢業(yè)設計相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1