Update Client.java

This commit is contained in:
xixu-me committed 2024-07-03 01:52:43 +08:00
1 parent 82aca181c9
commit 0ec28b7367
1 file changed
+13 -3
+13 -3
View File
@@ -82,6 +82,7 @@ public class Client {
export();
break;
default:
System.out.println("Invalid input!");
break;
}
choose = menu();
@@ -217,9 +218,12 @@ public class Client {
sql = "SELECT * FROM book WHERE oldprice = ?";
System.out.println("Please enter the price:");
break;
default:
case 5:
System.out.println("Returning to previous menu.");
break;
default:
System.out.println("Invalid input!");
break;
}
if (!sql.isEmpty()) {
ps = con.prepareStatement(sql);
@@ -287,9 +291,12 @@ public class Client {
case 3:
updatePrice(title);
break;
default:
case 4:
System.out.println("Returning to previous menu.");
break;
default:
System.out.println("Invalid input!");
break;
}
} catch (Exception e) {
e.printStackTrace();
@@ -346,9 +353,12 @@ public class Client {
case 2:
ExportToXLS.to("SELECT * FROM book", "output.xls");
break;
default:
case 3:
System.out.println("Returning to previous menu.");
break;
default:
System.out.println("Invalid input!");
break;
}
}
}