From 9669d977eaa8880e74a6c5d6d640774cea01b847 Mon Sep 17 00:00:00 2001 From: JRNitre Date: Fri, 20 Dec 2024 08:37:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20src/ElmBusinessEntry.java?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ElmBusinessEntry.java | 56 +++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/ElmBusinessEntry.java b/src/ElmBusinessEntry.java index cd62849..6951abc 100644 --- a/src/ElmBusinessEntry.java +++ b/src/ElmBusinessEntry.java @@ -1,5 +1,5 @@ /* - * Date: 2024-06-18 + * Date: 2024-12-20 * Design By JRNitre * */ @@ -20,7 +20,7 @@ public class ElmBusinessEntry { Display dis = new Display('+', '-', 30); BusinessView buv = new BusinessView(); - // Login 方法登录系统 + // Login 鏂规硶鐧诲綍绯荤粺 Business business = new BusinessView().login(); // Business business = new Business(); @@ -36,49 +36,49 @@ public class ElmBusinessEntry { int key; while (true){ dis.titleLine("Business - " + dis.deleteSpaceToString(business.getBusinessName()), true); - dis.showItem("[0] 查看商家信息", true); - dis.showItem("[1] 修改商家信息", true); - dis.showItem("[2] 修改商家密码", true); - dis.showItem("[3] 管理食品信息", true); - dis.showItem("[" + exitCode + "] 退出系统", true); + dis.showItem("[0] 鏌ョ湅鍟嗗淇℃伅", true); + dis.showItem("[1] 淇敼鍟嗗淇℃伅", true); + dis.showItem("[2] 淇敼鍟嗗瀵嗙爜", true); + dis.showItem("[3] 绠$悊椋熷搧淇℃伅", true); + dis.showItem("[" + exitCode + "] 閫鍑虹郴缁", true); dis.showLine(true); key = dis.getKeyNumber(); switch (key){ - // 查看商家信息 + // 鏌ョ湅鍟嗗淇℃伅 case 0: buv.printBusinessInfo(business); break; - // 修改商家信息 + // 淇敼鍟嗗淇℃伅 case 1: buv.updateBusinessInfo(business); break; - // 修改商家密码 + // 淇敼鍟嗗瀵嗙爜 case 2: buv.updatePassword(business); break; - // 管理食品信息 + // 绠$悊椋熷搧淇℃伅 case 3: food_work(business); break; case exitCode: - if (dis.MessageYesOrNo("提示", "是否确定退出系统?")) { - dis.titleLine("提示", true); - System.out.println("+ 系统退出"); + if (dis.MessageYesOrNo("鎻愮ず", "鏄惁纭畾閫鍑虹郴缁?")) { + dis.titleLine("鎻愮ず", true); + System.out.println("+ 绯荤粺閫鍑"); System.exit(0); } break; default: dis.titleLine("ERROR", true); - System.out.println("+ 操作数不合法!"); + System.out.println("+ 鎿嶄綔鏁颁笉鍚堟硶!"); break; } } } else { dis.titleLine("ERROR", true); - System.out.println("+ 错误次数过多! 退出系统"); + System.out.println("+ 閿欒娆℃暟杩囧! 閫鍑虹郴缁"); System.exit(0); } } @@ -89,40 +89,40 @@ public class ElmBusinessEntry { int key; while (true){ - dis.titleLine("商家食品管理", true); - dis.showItem("[0] 查看食品列表", true); - dis.showItem("[1] 添加食品", true); - dis.showItem("[2] 修改食品信息", true); - dis.showItem("[3] 删除食品", true); - dis.showItem("[" + exitCode + "] 返回上级菜单", true); + dis.titleLine("鍟嗗椋熷搧绠$悊", true); + dis.showItem("[0] 鏌ョ湅椋熷搧鍒楄〃", true); + dis.showItem("[1] 娣诲姞椋熷搧", true); + dis.showItem("[2] 淇敼椋熷搧淇℃伅", true); + dis.showItem("[3] 鍒犻櫎椋熷搧", true); + dis.showItem("[" + exitCode + "] 杩斿洖涓婄骇鑿滃崟", true); key = dis.getKeyNumber(); switch ( key ){ - // 查看食品列表 + // 鏌ョ湅椋熷搧鍒楄〃 case 0: buv.printAllBusinessFoodInfo(business); break; - // 添加食品 + // 娣诲姞椋熷搧 case 1: buv.addBusinessNewFood(business); break; - // 修改食品信息 + // 淇敼椋熷搧淇℃伅 case 2: buv.updateBusinessFoodInfo(business); break; - // 删除食品 + // 鍒犻櫎椋熷搧 case 3: buv.deleteFood(business); break; case exitCode: - if (dis.MessageYesOrNo("提示", "确定返回上级菜单?")) { + if (dis.MessageYesOrNo("鎻愮ず", "纭畾杩斿洖涓婄骇鑿滃崟?")) { return; } break; default: dis.titleLine("ERROR", true); - System.out.println("+ 操作数不合法!"); + System.out.println("+ 鎿嶄綔鏁颁笉鍚堟硶!"); break; } }