├── .idea
├── .gitignore
├── vcs.xml
├── misc.xml
├── modules.xml
└── uiDesigner.xml
├── images
├── login.png
├── veritabanı.png
├── addreservation.png
└── Turizm Acente 2024-04-30 21-41-19.mp4
├── src
├── postgresql-42.7.3 (1).jar
├── view
│ ├── SeasonView.java
│ ├── SeasonView.form
│ ├── Layout.java
│ ├── FeatureView.java
│ ├── PensionView.java
│ ├── LoginView.java
│ ├── RoomView.java
│ ├── UserView.java
│ ├── PensionView.form
│ ├── FeatureView.form
│ ├── ReservationView.java
│ ├── RoomView.form
│ ├── UserView.form
│ ├── OtelView.java
│ ├── LoginView.form
│ ├── ReservationView.form
│ ├── OtelView.form
│ ├── EmployeeView.form
│ ├── EmployeeView.java
│ ├── AdminView.form
│ └── AdminView.java
├── App.java
├── core
│ ├── JListItem.java
│ ├── ComboItem.java
│ ├── Db.java
│ └── Helper.java
├── entity
│ ├── Feature.java
│ ├── Pension.java
│ ├── Room.java
│ ├── Season.java
│ ├── User.java
│ ├── Reservation.java
│ └── Otel.java
├── business
│ ├── SeasonManager.java
│ ├── PensionManager.java
│ ├── FeatureManager.java
│ ├── RoomManager.java
│ ├── UserManager.java
│ ├── ReservationManager.java
│ └── OtelManager.java
└── dao
│ ├── SeasonDao.java
│ ├── PensionDao.java
│ ├── FeatureDao.java
│ ├── RoomDao.java
│ ├── UserDao.java
│ ├── ReservationDao.java
│ └── OtelDao.java
├── .gitignore
├── TurizmAcenteProjesi.iml
├── README.md
└── turizmacente.sql
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/images/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Snmzgrkn/Turizm_Acente_Sistemi/HEAD/images/login.png
--------------------------------------------------------------------------------
/images/veritabanı.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Snmzgrkn/Turizm_Acente_Sistemi/HEAD/images/veritabanı.png
--------------------------------------------------------------------------------
/images/addreservation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Snmzgrkn/Turizm_Acente_Sistemi/HEAD/images/addreservation.png
--------------------------------------------------------------------------------
/src/postgresql-42.7.3 (1).jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Snmzgrkn/Turizm_Acente_Sistemi/HEAD/src/postgresql-42.7.3 (1).jar
--------------------------------------------------------------------------------
/images/Turizm Acente 2024-04-30 21-41-19.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Snmzgrkn/Turizm_Acente_Sistemi/HEAD/images/Turizm Acente 2024-04-30 21-41-19.mp4
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ### IntelliJ IDEA ###
2 | out/
3 | !**/src/main/**/out/
4 | !**/src/test/**/out/
5 |
6 | ### Eclipse ###
7 | .apt_generated
8 | .classpath
9 | .factorypath
10 | .project
11 | .settings
12 | .springBeans
13 | .sts4-cache
14 | bin/
15 | !**/src/main/**/bin/
16 | !**/src/test/**/bin/
17 |
18 | ### NetBeans ###
19 | /nbproject/private/
20 | /nbbuild/
21 | /dist/
22 | /nbdist/
23 | /.nb-gradle/
24 |
25 | ### VS Code ###
26 | .vscode/
27 |
28 | ### Mac OS ###
29 | .DS_Store
--------------------------------------------------------------------------------
/src/view/SeasonView.java:
--------------------------------------------------------------------------------
1 | package view;
2 |
3 | import business.SeasonManager;
4 | import entity.Season;
5 |
6 | import javax.swing.*;
7 |
8 | public class SeasonView extends Layout{
9 | private JPanel container;
10 | private Season season;
11 | private SeasonManager seasonManager;
12 | public SeasonView(Season season){
13 | this.seasonManager = new SeasonManager();
14 | this.add(container);
15 | this.guiInitilaze(300,400);
16 | this.season = season;
17 |
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/App.java:
--------------------------------------------------------------------------------
1 | import business.UserManager;
2 | import core.Db;
3 | import core.Helper;
4 | import entity.User;
5 | import view.AdminView;
6 | import view.LoginView;
7 |
8 | import javax.swing.*;
9 | import java.sql.Connection;
10 |
11 | public class App {
12 | public static void main(String[] args) {
13 | Helper.setTheme();
14 | LoginView loginView = new LoginView();
15 | //UserManager userManager = new UserManager();
16 | //AdminView adminView = new AdminView(userManager.findByLogin("gsonmez","12345"));
17 | }
18 | }
--------------------------------------------------------------------------------
/src/core/JListItem.java:
--------------------------------------------------------------------------------
1 | package core;
2 |
3 | public class JListItem {
4 | private int key;
5 | private String value;
6 |
7 | public JListItem(int key, String value) {
8 | this.key = key;
9 | this.value = value;
10 | }
11 |
12 | public int getKey() {
13 | return key;
14 | }
15 |
16 | public String getValue() {
17 | return value;
18 | }
19 | public String getDeger(){
20 | return this.value;
21 | }
22 |
23 | @Override
24 | public String toString() {
25 | return value;
26 | }
27 | }
--------------------------------------------------------------------------------
/src/view/SeasonView.form:
--------------------------------------------------------------------------------
1 |
2 |
13 |
--------------------------------------------------------------------------------
/src/entity/Feature.java:
--------------------------------------------------------------------------------
1 | package entity;
2 |
3 | public class Feature {
4 | private int id;
5 | private String name;
6 |
7 | public Feature(int id, String name) {
8 | this.id = id;
9 | this.name = name;
10 | }
11 | public Feature(String name) {
12 | this.name = name;
13 | }
14 |
15 | public Feature() {
16 | }
17 |
18 | public int getId() {
19 | return id;
20 | }
21 |
22 | public void setId(int id) {
23 | this.id = id;
24 | }
25 |
26 | public String getName() {
27 | return name;
28 | }
29 |
30 | public void setName(String name) {
31 | this.name = name;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/entity/Pension.java:
--------------------------------------------------------------------------------
1 | package entity;
2 |
3 | public class Pension {
4 | private int id;
5 | private String name;
6 |
7 | public Pension(int id, String name) {
8 | this.id = id;
9 | this.name = name;
10 | }
11 | public Pension(String name) {
12 | this.name = name;
13 | }
14 |
15 | public Pension() {
16 | }
17 |
18 | public int getId() {
19 | return id;
20 | }
21 |
22 | public void setId(int id) {
23 | this.id = id;
24 | }
25 |
26 | public String getName() {
27 | return name;
28 | }
29 |
30 | public void setName(String name) {
31 | this.name = name;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/TurizmAcenteProjesi.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/core/ComboItem.java:
--------------------------------------------------------------------------------
1 | package core;
2 |
3 | public class ComboItem {
4 | private int key;
5 | private String value;
6 | private int price;
7 | public ComboItem(int key,String value,int price){
8 | this.key=key;
9 | this.value=value;
10 | this.price=price;
11 | }
12 |
13 | public ComboItem(int key,String value){
14 | this.key=key;
15 | this.value=value;
16 | }
17 |
18 | public int getKey() {
19 | return key;
20 | }
21 |
22 | public void setKey(int key) {
23 | this.key = key;
24 | }
25 |
26 | public String getValue() {
27 | return value;
28 | }
29 |
30 | public void setValue(String value) {
31 | this.value = value;
32 | }
33 |
34 | @Override
35 | public String toString() {
36 | return value;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/entity/Room.java:
--------------------------------------------------------------------------------
1 | package entity;
2 |
3 | public class Room {
4 | private int id;
5 | private String name;
6 | private int price;
7 | private int stock;
8 |
9 | public int getStock() {
10 | return stock;
11 | }
12 |
13 | public void setStock(int stock) {
14 | this.stock = stock;
15 | }
16 |
17 | public Room(String name, int price, int stock) {
18 | this.name = name;
19 | this.price = price;
20 | this.stock=stock;
21 | }
22 | public Room(int id, String name, int price,int stock) {
23 | this.id = id;
24 | this.name = name;
25 | this.price = price;
26 | this.stock=stock;
27 | }
28 |
29 | public Room() {
30 |
31 | }
32 |
33 | public int getId() {
34 | return id;
35 | }
36 |
37 | public void setId(int id) {
38 | this.id = id;
39 | }
40 |
41 | public String getName() {
42 | return name;
43 | }
44 |
45 | public void setName(String name) {
46 | this.name = name;
47 | }
48 |
49 | public int getPrice() {
50 | return price;
51 | }
52 |
53 | public void setPrice(int price) {
54 | this.price = price;
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/core/Db.java:
--------------------------------------------------------------------------------
1 | package core;
2 |
3 | import java.io.FileInputStream;
4 | import java.io.FileNotFoundException;
5 | import java.io.IOException;
6 | import java.sql.Connection;
7 | import java.sql.DriverManager;
8 | import java.sql.SQLException;
9 | import java.util.Properties;
10 |
11 | public class Db {
12 | //Singleton Design Pattern
13 | private static Db instance = null;
14 | private Connection connection;
15 | private final String DB_URL="jdbc:postgresql://localhost:5432/turizmacente";
16 | private final String DB_USERNAME="postgres";
17 | private final String DB_PASS = "1";
18 |
19 | public Db(){
20 | try{
21 | this.connection = DriverManager.getConnection(DB_URL,DB_USERNAME,DB_PASS);
22 | }catch (SQLException e){
23 | e.printStackTrace();
24 | }
25 | }
26 |
27 | public Connection getConnection() {
28 | return connection;
29 | }
30 |
31 | public static Connection getInstance() {
32 | try {
33 | if(instance ==null || instance.getConnection().isClosed()){
34 | instance = new Db();
35 | }
36 | }catch (SQLException e){
37 | System.out.println(e.getMessage());
38 | }
39 |
40 | return instance.getConnection();
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/business/SeasonManager.java:
--------------------------------------------------------------------------------
1 | package business;
2 |
3 | import core.Helper;
4 | import dao.FeatureDao;
5 | import dao.SeasonDao;
6 | import entity.Feature;
7 | import entity.Season;
8 |
9 | import java.util.ArrayList;
10 |
11 | public class SeasonManager {
12 | private final SeasonDao seasonDao;
13 |
14 | public SeasonManager(){
15 | this.seasonDao=new SeasonDao();
16 | }
17 |
18 | public ArrayList findAll(){
19 | return this.seasonDao.findAll();
20 | }
21 | public boolean save(Season season){
22 | if(season.getId() != 0){
23 | Helper.showMessage("error");
24 | }
25 | return this.seasonDao.save(season);
26 | }
27 |
28 | public Season findById(int id){
29 | return this.seasonDao.findById(id);
30 | }
31 |
32 | public ArrayList