diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..8611362 --- /dev/null +++ b/.classpath @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae3c172 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/.project b/.project new file mode 100644 index 0000000..0dd718e --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + Bank-Management-System + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/BM_System/.classpath b/BM_System/.classpath new file mode 100644 index 0000000..2b36060 --- /dev/null +++ b/BM_System/.classpath @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/BM_System/.gitignore b/BM_System/.gitignore new file mode 100644 index 0000000..ae3c172 --- /dev/null +++ b/BM_System/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/BM_System/.project b/BM_System/.project new file mode 100644 index 0000000..fd5637a --- /dev/null +++ b/BM_System/.project @@ -0,0 +1,17 @@ + + + BM_System + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/BM_System/src/def_pkg/Accountant.java b/BM_System/src/def_pkg/Accountant.java index 508316e..fdce039 100644 --- a/BM_System/src/def_pkg/Accountant.java +++ b/BM_System/src/def_pkg/Accountant.java @@ -4,7 +4,7 @@ public class Accountant { - public String name; + private String name; public Accountant( ) { this.name = ""; @@ -17,6 +17,9 @@ public Accountant( String name) { public String getName() { return this.name; } + public void setName(String name) { + this.name = name; + } // Search Account function Bank_Account searchAccount1(String accountNum, String CNIC) { diff --git a/BM_System/src/def_pkg/DB_Handler.java b/BM_System/src/def_pkg/DB_Handler.java index 3aa5d08..7d8a813 100644 --- a/BM_System/src/def_pkg/DB_Handler.java +++ b/BM_System/src/def_pkg/DB_Handler.java @@ -11,25 +11,26 @@ import com.itextpdf.html2pdf.HtmlConverter; public class DB_Handler { - - private String url = "jdbc:mysql://localhost:3307/bank_schema"; - private String username = "root"; - private String password = "sunshine"; + private static DB_Handler dataBaseHandler; private Connection conn; - - - public DB_Handler() { - try { - conn = DriverManager.getConnection(url, username, password); - System.out.println("Connection established successfully!"); - } - catch (SQLException e) { - throw new IllegalStateException("Unable to connect to the database. " + e.getMessage()); - } + private DB_Handler() { + } + public DB_Handler getDataBaseHandler() { + if(this.dataBaseHandler == null) { + dataBaseHandler = new DB_Handler(); + } + return dataBaseHandler; + } + public boolean createConnection() throws SQLException{ + if(conn == null) { + conn = DriverManager.getConnection("","",""); + } + return true; + } public Login_Account signIn( String username, String password ) { Login_Account user = new Login_Account(); diff --git a/BM_System/src/def_pkg/ImageDB.java b/BM_System/src/def_pkg/ImageDB.java new file mode 100644 index 0000000..70f9e0d --- /dev/null +++ b/BM_System/src/def_pkg/ImageDB.java @@ -0,0 +1,7 @@ +package def_pkg; + +public class ImageDB { + + public void setIconImage(TiFFImage) {//metodo legacy que se utilizaria si es compatible el formato TIFF} +} +} \ No newline at end of file diff --git a/BM_System/src/def_pkg/Seteable.java b/BM_System/src/def_pkg/Seteable.java new file mode 100644 index 0000000..c9ffa9f --- /dev/null +++ b/BM_System/src/def_pkg/Seteable.java @@ -0,0 +1,5 @@ +package def_pkg; + +public interface Seteable { + +} diff --git a/BM_System/src/def_pkg/TIFFAdapter.java b/BM_System/src/def_pkg/TIFFAdapter.java new file mode 100644 index 0000000..8e60f29 --- /dev/null +++ b/BM_System/src/def_pkg/TIFFAdapter.java @@ -0,0 +1,5 @@ +package def_pkg; + +public class TIFFAdapter { + +} diff --git a/BM_System/src/def_pkg/image.java b/BM_System/src/def_pkg/image.java new file mode 100644 index 0000000..ab03a71 --- /dev/null +++ b/BM_System/src/def_pkg/image.java @@ -0,0 +1,5 @@ +package def_pkg; + +public class image { + +}