Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Airlines-Reservation-System-Java-Project.zip
Binary file not shown.
Binary file added feereport/bin/FeeReportProject.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
52 changes: 52 additions & 0 deletions feereport/bin/feereport_accountant.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 17, 2016 at 08:39 AM
-- Server version: 5.5.16
-- PHP Version: 5.4.0beta2-dev

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `test`
--

-- --------------------------------------------------------

--
-- Table structure for table `feereport_accountant`
--

CREATE TABLE IF NOT EXISTS `feereport_accountant` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
`contactno` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `feereport_accountant`
--

INSERT INTO `feereport_accountant` (`id`, `name`, `password`, `email`, `contactno`) VALUES
(1, 'prateek', 'prateek', 'prateek@gmail.com', '9199291212'),
(2, 'sonoo', 'sonoo123', 'sonoo@gmail.com', '939292932'),
(3, 'salman', 'salman', 'salman@gmail.com', '939929322'),
(4, 'varun', 'varun', 'varun@gmail.com', '9399239239'),
(5, 'abhi', 'abhi', 'abhi@gmail.com', '93923923'),
(6, 'Roshan', 'roshan', 'roshan@gmail.com', '9953030303');

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
57 changes: 57 additions & 0 deletions feereport/bin/feereport_student.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 17, 2016 at 08:39 AM
-- Server version: 5.5.16
-- PHP Version: 5.4.0beta2-dev

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `test`
--

-- --------------------------------------------------------

--
-- Table structure for table `feereport_student`
--

CREATE TABLE IF NOT EXISTS `feereport_student` (
`rollno` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(200) NOT NULL,
`email` varchar(200) NOT NULL,
`course` varchar(100) NOT NULL,
`fee` int(10) NOT NULL,
`paid` int(10) NOT NULL,
`due` int(10) NOT NULL,
`address` varchar(300) NOT NULL,
`city` varchar(200) NOT NULL,
`state` varchar(200) NOT NULL,
`country` varchar(100) NOT NULL,
`contactno` varchar(20) NOT NULL,
`registereddate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`rollno`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `feereport_student`
--

INSERT INTO `feereport_student` (`rollno`, `name`, `email`, `course`, `fee`, `paid`, `due`, `address`, `city`, `state`, `country`, `contactno`, `registereddate`) VALUES
(1, 'Prateek Kumar', 'prateekpathak0451@gmail.com', 'Java', 11000, 11000, 0, 'D-23, Sec-18, Noida ', 'Noida', 'UP', 'INDIA', '9329293900', '2016-12-07 09:28:13'),
(2, 'sallu', 'sallu@gmail.com', 'java', 9000, 9000, 0, 'abc ', 'noida', 'UP', 'India', '32923923', '2016-12-06 09:06:47'),
(3, 'Mayank', 'mayank@gmail.com', 'Java', 11000, 10000, 1000, '', 'noida', 'UP', 'India', '9329392932', '2016-12-17 08:38:47');

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Binary file added feereport/jgoodies-common-1.8.0-sources.jar
Binary file not shown.
Binary file added feereport/jgoodies-common-1.8.0.jar
Binary file not shown.
Binary file added feereport/jgoodies-forms-1.8.0-sources.jar
Binary file not shown.
Binary file added feereport/jgoodies-forms-1.8.0.jar
Binary file not shown.
Binary file added feereport/src/FeeReportProject.jar
Binary file not shown.
45 changes: 45 additions & 0 deletions feereport/src/com/javatpoint/feereport/Accountant.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package com.javatpoint.feereport;

public class Accountant {
private int id;
private String name,password,email,contactno;
public Accountant() {}
public Accountant(String name, String password, String email, String contactno) {
super();
this.name = name;
this.password = password;
this.email = email;
this.contactno = contactno;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getContactno() {
return contactno;
}
public void setContactno(String contactno) {
this.contactno = contactno;
}

}
67 changes: 67 additions & 0 deletions feereport/src/com/javatpoint/feereport/AccountantDao.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package com.javatpoint.feereport;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;

public class AccountantDao {
public static Connection getCon(){
Connection con=null;
try{
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","","");
}catch(Exception e){System.out.println(e);}
return con;
}
public static boolean validate(String name,String password){
boolean status=false;
try{
Connection con=getCon();
PreparedStatement ps=con.prepareStatement("select * from feereport_accountant where name=? and password=?");
ps.setString(1,name);
ps.setString(2,password);
ResultSet rs=ps.executeQuery();
status=rs.next();
con.close();
}catch(Exception e){System.out.println(e);}


return status;
}
public static int save(Accountant a){
int status=0;
try{
Connection con=getCon();
PreparedStatement ps=con.prepareStatement("insert into feereport_accountant(name,password,email,contactno) values(?,?,?,?)");
ps.setString(1,a.getName());
ps.setString(2,a.getPassword());
ps.setString(3,a.getEmail());
ps.setString(4,a.getContactno());
status=ps.executeUpdate();
con.close();
}catch(Exception e){System.out.println(e);}
return status;
}
public static List<Accountant> view(){
List<Accountant> list=new ArrayList<>();
try{
Connection con=getCon();
PreparedStatement ps=con.prepareStatement("select * from feereport_accountant");
ResultSet rs=ps.executeQuery();
while(rs.next()){
Accountant a=new Accountant();
a.setId(rs.getInt(1));
a.setName(rs.getString(2));
a.setPassword(rs.getString(3));
a.setEmail(rs.getString(4));
a.setContactno(rs.getString(5));
list.add(a);
}
con.close();
}catch(Exception e){System.out.println(e);}
return list;
}
}
132 changes: 132 additions & 0 deletions feereport/src/com/javatpoint/feereport/AccountantLogin.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
package com.javatpoint.feereport;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JLabel;
import javax.swing.JOptionPane;

import java.awt.Color;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JPasswordField;
import javax.swing.JButton;
import javax.swing.LayoutStyle.ComponentPlacement;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class AccountantLogin extends JFrame {
static AccountantLogin frame;
private JPanel contentPane;
private JTextField textField;
private JPasswordField passwordField;

/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
frame = new AccountantLogin();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}

/**
* Create the frame.
*/
public AccountantLogin() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 300);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);

JLabel lblAccountantLogin = new JLabel("Accountant Login");
lblAccountantLogin.setFont(new Font("Tahoma", Font.PLAIN, 20));
lblAccountantLogin.setForeground(Color.DARK_GRAY);

JLabel lblName = new JLabel("Name:");

textField = new JTextField();
textField.setColumns(10);

JLabel lblPassword = new JLabel("Password:");

passwordField = new JPasswordField();

JButton btnLogin = new JButton("login");
btnLogin.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
String name=textField.getText();
String password=String.valueOf(passwordField.getPassword());
boolean status=AccountantDao.validate(name, password);
if(status){
AccountantSection.main(new String[]{});
frame.dispose();
}else{
JOptionPane.showMessageDialog(AccountantLogin.this,"Sorry, username or password error!","Login error!",JOptionPane.ERROR_MESSAGE);
}
}
});

JButton btnBack = new JButton("back");
GroupLayout gl_contentPane = new GroupLayout(contentPane);
gl_contentPane.setHorizontalGroup(
gl_contentPane.createParallelGroup(Alignment.LEADING)
.addGroup(gl_contentPane.createSequentialGroup()
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
.addGroup(gl_contentPane.createSequentialGroup()
.addGap(28)
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
.addComponent(lblPassword)
.addGroup(gl_contentPane.createSequentialGroup()
.addComponent(lblName)
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
.addGroup(gl_contentPane.createSequentialGroup()
.addGap(76)
.addComponent(lblAccountantLogin))
.addGroup(gl_contentPane.createSequentialGroup()
.addGap(54)
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING, false)
.addComponent(passwordField)
.addComponent(textField, GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE)))))))
.addGroup(gl_contentPane.createSequentialGroup()
.addGap(158)
.addComponent(btnLogin, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE)
.addGap(52)
.addComponent(btnBack)))
.addContainerGap(78, Short.MAX_VALUE))
);
gl_contentPane.setVerticalGroup(
gl_contentPane.createParallelGroup(Alignment.LEADING)
.addGroup(gl_contentPane.createSequentialGroup()
.addContainerGap()
.addComponent(lblAccountantLogin)
.addGap(18)
.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)
.addComponent(lblName)
.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addGap(18)
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
.addComponent(lblPassword)
.addComponent(passwordField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(ComponentPlacement.UNRELATED)
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
.addComponent(btnLogin, GroupLayout.PREFERRED_SIZE, 32, GroupLayout.PREFERRED_SIZE)
.addComponent(btnBack))
.addContainerGap(96, Short.MAX_VALUE))
);
contentPane.setLayout(gl_contentPane);
}
}
Loading