Skip to content

Commit 9f5a818

Browse files
Backend added of Branch and Branch Manger creation and connected with DB.
1 parent 2c63857 commit 9f5a818

File tree

6 files changed

+7
-4
lines changed

6 files changed

+7
-4
lines changed

mysql-connector-j-9.0.0.jar

2.47 MB
Binary file not shown.

src/main/java/DB/DBConnection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public Connection getConnection() {
6060
}
6161
return connection;
6262
}
63-
63+
// hey
6464
public void closeConnection() {
6565
try {
6666
if (connection != null && !connection.isClosed()) {

src/main/java/DB/DBHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void InsertBranchManager(String name, String email, String password, Stri
5555
alert.setHeaderText("Branch ID does not exist.");
5656
alert.show();
5757
}
58-
58+
// wow
5959
// Close ResultSet and PreparedStatement
6060
rs.close();
6161
ppt.close();

src/main/java/com/example/project_pos/POS.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import java.io.IOException;
99
import java.sql.Connection;
10-
10+
// mo
1111
public class POS extends Application {
1212
@Override
1313

src/main/java/controller/SuperAdmin.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ public void branchManagersubmission(ActionEvent e) throws IOException {
210210
stage.setScene(scene);
211211
stage.show();
212212
}
213+
// hello.
213214
}
214215
public void branch_back(ActionEvent e) throws IOException {
215216
root= FXMLLoader.load(getClass().getResource("/com/example/project_pos/SuperAdmin_UI.fxml"));

src/main/java/services/InventoryDAO.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/*
12
package services;
23
34
import model.Product;
@@ -23,7 +24,7 @@ public Inventory getAllProducts() {
2324
String query = "SELECT * FROM products";
2425
try (Statement stmt = connection.createStatement(); ResultSet rs = stmt.executeQuery(query)) {
2526
while (rs.next()) {
26-
Product product = new Product();
27+
Product product = new Product();
2728
product.setProductId(rs.getString("product_id"));
2829
product.setName(rs.getString("name"));
2930
product.setCategory(rs.getString("category"));
@@ -112,3 +113,4 @@ public boolean updateProductQuantity(String productId, int quantity) {
112113
return false;
113114
}
114115
}
116+
*/

0 commit comments

Comments
 (0)