Vous êtes sur la page 1sur 197

A Project Report on

VIDEO LIBRARY MANAGEMENT SYSTEM


in the Partial Fulfillment of Requirement for the Degree of

BACHELOR OF TECHNOLOGY(B.TECH)
(2009-12)

Under the Supervision of:

Internal Supervisor
Mrs. Vandana Dabbas Assistant Professor, B.TECH Dept. P. D. M. College of Engg Bahadurgarh

External Supervisor
Mr. Raj Kumar Baluja Labs Institute of Technology and Management

Submitted by:
RAVI VIRMANI 9113,CSE-2 B.TECH P. D. M. College of Engg, Bahadurgarh

BACHELOR OF TECHNOLOGY(B.TECH) P.D.M. COLLEGE OF ENGG,BAHADURGARH


(Affiliated to Maharshi Dayanand University, Rohtak)

Certificate
This is to certify that the project entitled "VIDEO LIBRARY MANAGEMENT SYSTEM" is a bonafide work carried out by me at BALUJA LABS TECHNOLOGY AND

MANAGEMENT in the partial fulfillment of the requirement for the award of the degree of BACHELOR OF TECHNOLOGY. The matter embodied in this project report has not been submitted elsewhere by anybody for the award of any other degree.

(RAVI VIRMANI)

Certified that the Project Report entitled VIDEO LIBRARY MANAGEMENT SYSTEM by RAVI VIRMANI is completed under my guidance.

ACKNOWLEDGEMENT
With Candor and Pleasure I take opportunity to express my sincere thanks and obligation to my esteemed guide GURVINDER BALUJA. It is because of his able and mature guidance and cooperation without which it would not have been possible for me to complete my project.

It is my pleasant duty to thank all the staff member of the computer center who never hesitated me from time during the project.

Finally, I gratefully acknowledge the support, encouragement & patience of my family, and as always, nothing in my life would be possible without God, Thank You!

INDEX

COMPANY PROFILE:
Balujalabs is a global IT based Company Specializes in the field of Website development Promotion, It Training & consultancy. Baluja Labs is among the top 'outsourcing web development services' companies based in India. We provide outstanding outsourcing web development designs with cost-effective solutions for our clients in India, Europe and USA. We also provide outsourcing services using BOT (built operate transfer) model, including website development, web design, offshore development design services, custom software application programming, information technology applications using PHP, MySQL, .net, J2EE, etc. Besides this, we also offer other outsource web design and development services. Baluja Labs, a professional web design and website development company is focused on small to mid-size businesses contributing website design and online marketing services to clients. Today, we are proud to support many other software companies for their critical IT requirements. We provide conceptual, functional and presentational development for the global business community through out-of-the-box web strategy, design and technology solutions. Combining diverse expertise in business strategy, technology, usability and design, Pegasus InfoCorp produces highly scalable business solutions and online positive user experiences. Your online success is our top priority. We are providing professional web solutions to help businesses and individuals discover and expand into the area of interactive web business or to improve on their existing websites. Our team is trained to be highly communicative and responsive using advanced technologies in telecommunications and the Internet. We employ the professionals with state-of-the-art technologies in the market today. Baluja Labs adopted the onshore / offshore model to optimize efficiency, quality and cost where it makes sense. We deploy part of the project resources onsite. These resources are dedicated to communication with the end-users, study and analysis of the business, the creation of test plans and integration testing. We believe that delivering quality services is our mission. Baluja Labs has been proud to dedicate its resources and talented team of experts to the service of the software industry. We have always strived hard to accommodate the specific needs of each customer.

Services Provided by the Company:Search Engine Optimization Search Engine Optimization (or SEO) is a series of techniques used to improve the ranking of your website listing in search engines like Google, Yahoo and MSN. Recent surveys show that more than 87% of Internet users use search engines to find services, products and information. Unless your site appears prominently on the search engines, potential customers will go elsewhere. Link Building/Popularity Building permanent and relevant inbound links to your website yields a steady flow of traffic. Clients who use our link building service achieve higher search engine rankings and benefit from more targeted prospects and potentially higher sales. Website Designing Balujalabs is a unique and professional Web design company offering a variety of services from basic Website Design to complete e-commerce stores. We specialize in best-in-class website design, online marketing, Flash multimedia, corporate identity and print graphics. Internet Marketing Internet Marketing is an inclusive discipline that uses SEO and other online marketing tools to gain the attention of both potential customers and the search engines. These tools work to drive motivated traffic to your website, allow you to compete more effectively and increase sales. Increase Traffic/Leads/Sales Along with link popularity, there are many effective tactics to increase traffic to your website. However, a comprehensive strategy to increase traffic, leads, sales or other conversions is our true focus. Content Development A requirement for marketing success is website content. Your site must be rich in content and contain all relevant keywords to increase your sites visibility and readership. We integrate your keywords into your website content so they flow seamlessly to deliver your message to your prospects. E-commerce Solutions Balujalabs is an e-commerce solution and service provider to small and medium sized businesses worldwide and market leading line of e-commerce solution provides organizations of all types the power to create e-commerce systems that leverage the capabilities of the Internet to grow their businesses.

INTRODUCTION
The Video Library Management System deals in management of records. The records include videos which are required by different customers accordingly. Maintaining these records manually becomes difficult thus we are proving such system a computerized backend. A library database needs to store information pertaining to its users. (or customers), its workers, the physical locations of its branches, and the media stored in those locations. The library must keep track of the status of each media item: its location, status, descriptive attributes, and cost for losses and late returns.In order to allow multiple copies of the same video, each media item will have a unique ID number. Customers will provide their name, address, phone number, and password when signing up for a library card. They will then be assigned a unique login id and password.Each library card will have its own fines, but active fines on any of a customer's cards will prevent the customer from using the library's services.

Goal
To develop an Video Library Management System . The Library Management deals in management of records. Records include videos required by customers accordingly. Maintaining these records manually becomes difficult. Automated systems help in maintaining these records easily. Thus a lot of time can be saved and correct information about the student can be accessed .

Objectives
To ensure the following :  Ease of maintenance of records by library.  Ease of maintenance of charges for late return.  Ease of use.  Ease of management.

 Ease of upgrade.  Saving the valuable time of the library.  All of the above while keeping the system scalable.

Operations that can be performed


1.) By administrator: a) adding new cassette. b) deleting old cassette. c) editing old cassette with new name . d) editing a user. e) deleting existing user. f) enabling a user. g) disabling a user. 2.) By user: a) issue a cassette. b) return a cassette. c) paying the bill issued.

Input & Output Design (Screen Layouts)


Snapshots:
HOME PAGE:-

WHEN ADMINISTRATOR LOGGED IN:-

AUTHORIZATION TO THE ADMINISTRATOR TO ACCESS:-

IF WRONG PASSWORD IS ENTERED:-

OPERATIONS THAT ADMINISTRATOR CAN PERFORM:-

ADDING A NEW CASSETTE TO THE LIBRARY:-

EDITTING AN OLD CASSETTE WITH A NEW NAME:-

CASSETTE RECORD UPDATED:-

DELETING AN EXISTING CASSETTE:-

EDITTING AN OLD USER WITH NEW NAME:-

1.) CHECKING FOR THE AVAILABILITY OF NEW ID:-

2.) VALID PASSWORD ENTERED:-

3.) RECORD ENTERED:-

NEW USER RECORD ENTERED:-

1.)CHECKING FOR AVAILABILITY OF ID

2.)VALIDITY OF PASSWORD CHECKED:-

3.)RECORD ENTERED:-

DELETING THE EXISTING USERS:-

USER DELETED:-

DISABLING THE ACTIVATED USER:-

USER DISABLED:-

WHEN USER IS DISABLED BY ADMINISTRATOR:-

ACTIVATING THE DISABLED USER:-

USER ENABLED:-

LOGIN ID OF USER:-

WHEN USER LOGGED IN:-

USER AUTHORIZED TO ACCESS:-

MAIN MENU:-

WHEN USER ISSUED THE CASSETTE:-

WHEN USER RETURNED CASSETTE:-

BILL TO BE PAYED BY THE USER AFTER RETURNING THE CASSETTE:-

SEARCHING FOR A CASSETTE CODE:-

CODE FOUND:-

ASKING FOR THE CASSETTE BY GIVING ITS CODE:-

CASSETTE ISSUED:-

BOLLYWOOD CASSETTE IN THE LIBRARY:-

WHEN PREVIOUS CASSETTE IS NOT RETURNED,THIS ERROR MESSAGE IS SHOWN:-

CASSETTE ISSUED FROM BOLLYWOOD TRACKS:-

CASSETTE RETURNED:-

BILL ISSUED:-

HOLLYWOOD CASSETTE IN THE LIBRARY:-

CASSETTE ISSUED FROM HOLLYWOOD TRACKS:-

CASSETTE RETURNED:-

BILL ISSUED:-

BHAKTI CASSETTE IN THE LIBRARY:-

CASSETTE ISSUED FROM BHAKTI TRACKS:-

CASSETTE RETURNED:-

BILL ISSUED:-

OTHER CASSETTE IN THE LIBRARY:-

CASSETTE ISSUED FROM OTHER TRACKS:-

CASSETTE RETURNED:-

BILL ISSUED:-

LOGGING OUT:-

CODING import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.IOException; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; import java.util.Arrays; import javax.swing.*; import com.mysql.jdbc.Connection; import com.mysql.jdbc.ResultSet;

public class vdo extends JFrame implements ActionListener { JFrame fm,fm1,fm2,fm3,fm4,fm5,fm6,fm7,fm8,fm9,fm10,fm11,f m12,fm13,fm14,fm15,fm16,fm17,fm18,fm19,fm20; JButton b,b1,b2,b3,b4,b5,b6,b7; JButton b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18,b19,b20,b21 ,b22,b23,b24,b25,b26,b27,b28,b29,b30; JButton b31,b32,b33,b34,b35,b36,b37,b38,b39,b40,b41,b42,b43,b

44,b45,b46,b47,b48,b49,b50,b51,b52,b53,b54,b55,b56,b5 7,b58,b59,b60; JButton b61,b62,b63,b64,b65,b66,b67,b68,b69,b70,b71,b72,b73,b 74,b75,b76,b77,b78,b79,b80; JLabel l,l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13,l14,l15,l16,l17,l18,l 19,l20,l21,l22,l23,l24,l25,l26,l27,l28,l29,l30,l31,l32,l33,l34, l35,l36,l37,l38,l39,l40; JTextField t,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t1 8,t19,t20; JTextField t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t 36,t37,t38,t39,t40; JPasswordField p,p1,p2,adpass,p3,p4,p5; JTextArea ta,ta1; JRadioButton r,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15; Connection con = null; String url = "jdbc:mysql://localhost:3306/videolib1"; String driver = "com.mysql.jdbc.Driver"; String user = "root"; String pass = "1234"; ButtonGroup group,group1, gp;

public static void main(String args[])throws IOException { vdo v=new vdo(); }

public vdo() { fm=new JFrame("LOGIN"); fm.setSize(500,500); fm.setVisible(true); fm.setLayout(null); fm.setBackground(Color.lightGray); l5=new JLabel("New User"); fm.add(l5); l5.setBounds(100, 100, 100, 40); b=new JButton("Sign Up"); fm.add(b); b.setBounds(200,100,100,40); l6=new JLabel("Login ID"); fm.add(l6); l6.setBounds(100, 175, 100, 40); t3=new JTextField(30); fm.add(t3); t3.setBounds(200, 175, 150, 40); l7=new JLabel("Password"); fm.add(l7); l7.setBounds(100, 225, 100, 40); p2=new JPasswordField(30); fm.add(p2); p2.setBounds(200, 225, 150, 40); b1=new JButton("Login"); fm.add(b1); b1.setBounds(100,300,100,40); b2=new JButton("Exit"); fm.add(b2); b2.setBounds(270,300,100,40); b15=new JButton("Admin Login"); fm.add(b15);

b15.setBounds(370, 410, 110, 30); b.addActionListener(this); b1.addActionListener(this); b2.addActionListener(this); b15.addActionListener(this); } public void v1() { fm1=new JFrame("new member"); fm1.setSize(620,550); fm1.setVisible(true); fm1.setLayout(null); fm1.setBackground(Color.lightGray); l=new JLabel("Enter User ID"); fm1.add(l); l.setBounds(80, 70, 200, 40); t=new JTextField(30); fm1.add(t); t.setBounds(250,70,200,40); b5=new JButton("Check Availability"); fm1.add(b5); b5.setBounds(460, 70, 150, 40); l1=new JLabel("Desired Password"); fm1.add(l1); l1.setBounds(80, 140, 200, 40); p=new JPasswordField(20); fm1.add(p); p.setFont(new Font("monospaced", Font.BOLD, 20)); p.setBounds(250,140,200,40); l2=new JLabel("Verify Password"); fm1.add(l2);

l2.setBounds(80, 210, 200, 40); p1=new JPasswordField(20); fm1.add(p1); p1.setFont(new Font("monospaced", Font.BOLD, 20)); p1.setBounds(250,210,200,40); l3=new JLabel("Address"); fm1.add(l3); l3.setBounds(80,280,200,40 ); t1=new JTextField(30); fm1.add(t1); t1.setBounds(250, 280, 200, 40); l4=new JLabel("Mobile No."); fm1.add(l4); l4.setBounds(80,350,200,40 ); t2=new JTextField(30); fm1.add(t2); t2.setBounds(250, 350, 200, 40); b3=new JButton("Submit"); fm1.add(b3); b3.setBounds(90,440,100,40); b4=new JButton("Exit"); fm1.add(b4); b4.setBounds(270,440,100,40); b3.addActionListener(this); b4.addActionListener(this); b5.addActionListener(this); }

public void cas1() { fm3=new JFrame("cassette"); fm3.setSize(500, 500);

fm3.setVisible(true); fm3.setLayout(null); fm3.setBackground(Color.lightGray); l5=new JLabel("Cassette Code"); fm3.add(l5); l5.setBounds(70, 70, 100, 30); t4=new JTextField(30); fm3.add(t4); t4.setBounds(200, 70, 100, 30); l6=new JLabel("Name"); fm3.add(l6); l6.setBounds(70, 120, 100, 30); t5=new JTextField(30); fm3.add(t5); t5.setBounds(200, 120, 100, 30); l7=new JLabel("Copies"); fm3.add(l7); l7.setBounds(70,170 ,100, 30); t6=new JTextField(30); fm3.add(t6); t6.setBounds(200, 170, 100, 30); l8=new JLabel("Cost"); fm3.add(l8); l8.setBounds(70, 220, 100, 30); t7=new JTextField(30); fm3.add(t7); t7.setBounds(200, 220, 100, 30); l9=new JLabel("tag"); fm3.add(l9); l9.setBounds(70, 270, 100, 30); group = new ButtonGroup(); r = new JRadioButton("Bollywood", true); group.add(r); fm3.add(r);

r.setBounds(200, 270, 100, 30); r.setActionCommand("bollywood"); r1 = new JRadioButton("Hollywood", false); group.add(r1); fm3.add(r1); r1.setBounds(200, 310, 100, 30); r1.setActionCommand("hollywood"); r2 = new JRadioButton("Bhakti", false); group.add(r2); fm3.add(r2); r2.setBounds(310, 270, 100, 30); r2.setActionCommand("bhakti"); r3 = new JRadioButton("Others", false); group.add(r3); fm3.add(r3); r3.setBounds(310, 310, 100, 30); r3.setActionCommand("others"); b13=new JButton("ADD"); fm3.add(b13); b13.setBounds(70, 350, 100, 30); b14=new JButton("Exit"); fm3.add(b14); b14.setBounds(200, 350, 100, 30); b13.addActionListener(this); b14.addActionListener(this); } public void editcas() { fm6=new JFrame("Admin"); fm6.setSize(500,500); fm6.setVisible(true); fm6.setLayout(null); fm6.setBackground(Color.lightGray);

l17=new JLabel("Old Cassette Code"); fm6.add(l17); l17.setBounds(70, 30, 120, 30); t13=new JTextField(30); fm6.add(t13); t13.setBounds(220, 30, 100, 30); l12=new JLabel("New Cassette Code"); fm6.add(l12); l12.setBounds(70, 70, 120, 30); t9=new JTextField(30); fm6.add(t9); t9.setBounds(220, 70, 100, 30); l13=new JLabel("New Name"); fm6.add(l13); l13.setBounds(70, 120, 100, 30); t10=new JTextField(30); fm6.add(t10); t10.setBounds(220, 120, 100, 30); l14=new JLabel("New Copies"); fm6.add(l14); l14.setBounds(70,170 ,100, 30); t11=new JTextField(30); fm6.add(t11); t11.setBounds(220, 170, 100, 30); l15=new JLabel("New Cost"); fm6.add(l15); l15.setBounds(70, 220, 100, 30); t12=new JTextField(30); fm6.add(t12); t12.setBounds(220, 220, 100, 30); l16=new JLabel("New Tag"); fm6.add(l16); l16.setBounds(70, 270, 100, 30); group1 = new ButtonGroup();

r4 = new JRadioButton("Bollywood", true); group1.add(r4); fm6.add(r4); r4.setBounds(200, 270, 100, 30); r4.setActionCommand("bollywood"); r5 = new JRadioButton("Hollywood", false); group1.add(r5); fm6.add(r5); r5.setBounds(200, 310, 100, 30); r5.setActionCommand("hollywood"); r6 = new JRadioButton("Bhakti", false); group1.add(r6); fm6.add(r6); r6.setBounds(310, 270, 100, 30); r6.setActionCommand("bhakti"); r7 = new JRadioButton("Others", false); group1.add(r7); fm6.add(r7); r7.setBounds(310, 310, 100, 30); r7.setActionCommand("others"); b24=new JButton("Update"); fm6.add(b24); b24.setBounds(70, 350, 100, 30); b25=new JButton("Exit"); fm6.add(b25); b25.setBounds(200, 350, 100, 30); b24.addActionListener(this); b25.addActionListener(this); } public void admin() { fm4=new JFrame("Administrator"); fm4.setSize(500, 500);

fm4.setVisible(true); fm4.setLayout(null); fm4.setBackground(Color.lightGray); l10=new JLabel("Admin ID"); fm4.add(l10); l10.setBounds(100,100,100,40); t8=new JTextField(30); fm4.add(t8); t8.setBounds(200,100,170,40); l11=new JLabel("Password"); fm4.add(l11); l11.setBounds(100, 200, 100, 40); adpass= new JPasswordField(30); fm4.add(adpass); adpass.setBounds(200, 200,170,40); b16=new JButton("Login"); fm4.add(b16); b16.setBounds(100, 300, 100, 40); b17=new JButton("Exit"); fm4.add(b17); b17.setBounds(270, 300, 100, 40); b16.addActionListener(this); b17.addActionListener(this); }

public void disuser() { fm10=new JFrame("Disable User Acct."); fm10.setSize(500,500); fm10.setVisible(true); fm10.setLayout(null); fm10.setBackground(Color.lightGray); l26=new JLabel("User ID");

fm10.add(l26); l26.setBounds(150, 100, 100, 30); t20=new JTextField(30); fm10.add(t20); t20.setBounds(250, 100, 150, 30); b34=new JButton("Disable"); fm10.add(b34); b34.setBounds(100, 200, 100, 30); b35=new JButton("Exit"); fm10.add(b35); b35.setBounds(300, 200, 100,30); b34.addActionListener(this); b35.addActionListener(this); } public void enuser() { fm11=new JFrame("Enable User Acct."); fm11.setSize(500,500); fm11.setVisible(true); fm11.setLayout(null); fm11.setBackground(Color.lightGray); l27=new JLabel("User ID"); fm11.add(l27); l27.setBounds(150, 100, 100, 30); t21=new JTextField(30); fm11.add(t21); t21.setBounds(250, 100, 150, 30); b36=new JButton("Enable"); fm11.add(b36); b36.setBounds(100, 200, 100, 30); b37=new JButton("Exit"); fm11.add(b37); b37.setBounds(300, 200, 100,30); b36.addActionListener(this);

b37.addActionListener(this); } public void ad1() { fm5=new JFrame("Admin"); fm5.setSize(500,500); fm5.setVisible(true); fm5.setLayout(null); fm5.setBackground(Color.lightGray); b18=new JButton("Add Cassette"); fm5.add(b18); b18.setBounds(70, 70, 140, 40); b19=new JButton("Edit Cassette"); fm5.add(b19); b19.setBounds(250, 70, 140, 40); b20=new JButton("Delete Cassette"); fm5.add(b20); b20.setBounds(70, 150, 140, 40); b21=new JButton("Edit User"); fm5.add(b21); b21.setBounds(250, 150, 140, 40); b22=new JButton("Delete User"); fm5.add(b22); b22.setBounds(70, 220, 140, 40); b33=new JButton("Disable User"); fm5.add(b33); b33.setBounds(250, 220, 140, 40); b38=new JButton("Enable User"); fm5.add(b38); b38.setBounds(70, 290, 140, 40); b23=new JButton("LogOut"); fm5.add(b23); b23.setBounds(400, 400, 80, 30); b18.addActionListener(this);

b19.addActionListener(this); b20.addActionListener(this); b21.addActionListener(this); b22.addActionListener(this); b23.addActionListener(this); b33.addActionListener(this); b38.addActionListener(this); } public void delcas() { fm7=new JFrame("Delete Cassette"); fm7.setSize(500,500); fm7.setVisible(true); fm7.setLayout(null); fm7.setBackground(Color.lightGray); l18=new JLabel("Cassette Code"); fm7.add(l18); l18.setBounds(100, 100, 120, 30); t14=new JTextField(30); fm7.add(t14); t14.setBounds(250, 100, 120, 30); b26=new JButton("Delete Record"); fm7.add(b26); b26.setBounds(100, 200, 120, 40); b27=new JButton("Exit"); fm7.add(b27); b27.setBounds(250, 200, 120, 40); b26.addActionListener(this); b27.addActionListener(this); } public void edituser() {

fm8=new JFrame("Edit User"); fm8.setSize(550,550); fm8.setVisible(true); fm8.setLayout(null); fm8.setBackground(Color.lightGray); l19=new JLabel("Old User ID"); fm8.add(l19); l19.setBounds(80, 70, 150, 30); t15=new JTextField(30); fm8.add(t15); t15.setBounds(250,70,150,30); l20=new JLabel("New User ID"); fm8.add(l20); l20.setBounds(80, 120, 150, 30); t16=new JTextField(30); fm8.add(t16); t16.setBounds(250,120,150,30); b28=new JButton("Check Avail."); fm8.add(b28); b28.setBounds(410, 120, 120, 30); l21=new JLabel("Desired Password"); fm8.add(l21); l21.setBounds(80, 170, 200, 30); p3=new JPasswordField(20); fm8.add(p3); p3.setFont(new Font("monospaced", Font.BOLD, 20)); p3.setBounds(250,170,200,30); l22=new JLabel("Verify Password"); fm8.add(l22); l22.setBounds(80, 220, 200, 30); p4=new JPasswordField(20); fm8.add(p4);

p4.setFont(new Font("monospaced", Font.BOLD, 20)); p4.setBounds(250,220,200,30); l23=new JLabel("Address"); fm8.add(l23); l23.setBounds(80,270,200,30 ); t17=new JTextField(30); fm8.add(t17); t17.setBounds(250, 270, 200, 30); l24=new JLabel("Mobile No."); fm8.add(l24); l24.setBounds(80,320,200,30 ); t18=new JTextField(30); fm8.add(t18); t18.setBounds(250, 320, 200, 30); b29=new JButton("Submit"); fm8.add(b29); b29.setBounds(90,370,80,30); b30=new JButton("Exit"); fm8.add(b30); b30.setBounds(250,370,80,30); b28.addActionListener(this); b29.addActionListener(this); b30.addActionListener(this); } public void deluser() { fm9=new JFrame("Edit User"); fm9.setSize(500,500); fm9.setVisible(true); fm9.setLayout(null); fm9.setBackground(Color.lightGray); l25=new JLabel("User ID");

fm9.add(l25); l25.setBounds(150, 100, 100, 30); t19=new JTextField(30); fm9.add(t19); t19.setBounds(250, 100, 150, 30); b31=new JButton("Delete"); fm9.add(b31); b31.setBounds(100, 200, 100, 30); b32=new JButton("Exit"); fm9.add(b32); b32.setBounds(300, 200, 100,30); b31.addActionListener(this); b32.addActionListener(this); } public void v2() { fm2=new JFrame("Liberary"); fm2.setSize(500,500); fm2.setVisible(true); fm2.setLayout(null); fm2.setBackground(Color.lightGray); ta = new JTextArea(" welcome! ",40, 40); ta.setEditable(false); fm2.add(ta); ta.setBounds(10, 20, 60, 20); b12=new JButton("Log Out"); fm2.add(b12); b12.setBounds(400, 10, 80, 30); b12.addActionListener(this); l4=new JLabel("Search"); fm2.add(l4); l4.setBounds(80, 30, 100, 50); t3=new JTextField(30); fm2.add(t3);

t3.setBounds(130, 30, 180, 40); b73=new JButton("Search"); fm2.add(b73); b73.setBounds(315, 35, 80, 30); ImageIcon i= new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (5).jpg"); b6=new JButton(i); fm2.add(b6); b6.setBounds(30, 80, 150, 113); ImageIcon i1=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (10).jpg"); b7=new JButton(i1); fm2.add(b7); b7.setBounds(310, 80, 150, 113); ImageIcon i2=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (16).jpg"); b8=new JButton(i2); fm2.add(b8); b8.setBounds(30, 200, 150, 113); ImageIcon i3=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (23).jpg"); b9=new JButton(i3); fm2.add(b9); b9.setBounds(310, 200, 150, 113); ImageIcon i4=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (21).jpg"); b10=new JButton(i4); fm2.add(b10); b10.setBounds(30, 320, 150, 113);

ImageIcon i5=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (18).jpg"); b11=new JButton(i5); fm2.add(b11); b11.setBounds(310, 320, 150, 113); b39=new JButton("View Record"); fm2.add(b39); b39.setBounds(195,100,110,40); b40=new JButton("Return"); fm2.add(b40); b40.setBounds(200, 390, 100, 40); b47=new JButton("Bollywood"); fm2.add(b47); b47.setBounds(200, 170, 100, 30); b48=new JButton("Hollywood"); fm2.add(b48); b48.setBounds(200, 210, 100, 30); b49=new JButton("Bhakti"); fm2.add(b49); b49.setBounds(200, 250, 100, 30); b50=new JButton("Others"); fm2.add(b50); b50.setBounds(200, 290, 100, 30); b39.addActionListener(this); b47.addActionListener(this); b48.addActionListener(this); b49.addActionListener(this); b50.addActionListener(this); b6.addActionListener(this); b40.addActionListener(this); b7.addActionListener(this); b8.addActionListener(this); b9.addActionListener(this);

b10.addActionListener(this); b11.addActionListener(this); b73.addActionListener(this); } public void info() { fm16=new JFrame("Information"); fm16.setSize(500,500); fm16.setVisible(true); fm16.setLayout(null); fm16.setBackground(Color.lightGray); l28=new JLabel("Cassette Code"); fm16.add(l28); l28.setBounds(100, 30, 100, 30); t22=new JTextField(30); fm16.add(t22); t22.setBounds(220, 30, 150, 30); b51=new JButton("Return"); fm16.add(b51); b51.setBounds(250, 70, 100, 30); b52=new JButton("Issue"); fm16.add(b52); b52.setBounds(130, 70, 100, 30); b52.addActionListener(this); b51.addActionListener(this);

} public void bolly() { fm12=new JFrame("Bollywood Tracks"); fm12.setSize(500,500); fm12.setVisible(true);

fm12.setLayout(null); fm12.setBackground(Color.lightGray); ta = new JTextArea(" Bollywood Tracks ",40, 40); ta.setEditable(false); fm12.add(ta); ta.setFont(new Font("monospaced", Font.BOLD+Font.ITALIC, 20)); ta.setBounds(150, 30, 210, 30); ImageIcon i= new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1.jp g"); b41=new JButton(i); fm12.add(b41); b41.setBounds(30, 80, 150, 113); ImageIcon i1=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (1).jpg"); b42=new JButton(i1); fm12.add(b42); b42.setBounds(310, 80, 150, 113); ImageIcon i2=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (3).jpg"); b43=new JButton(i2); fm12.add(b43); b43.setBounds(30, 200, 150, 113); ImageIcon i3=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (4).jpg"); b44=new JButton(i3); fm12.add(b44); b44.setBounds(310, 200, 150, 113);

ImageIcon i4=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (5).jpg"); b45=new JButton(i4); fm12.add(b45); b45.setBounds(30, 320, 150, 113); ImageIcon i5=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (10).jpg"); b46=new JButton(i5); fm12.add(b46); b46.setBounds(310, 320, 150, 113); b41.addActionListener(this); b42.addActionListener(this); b43.addActionListener(this); b44.addActionListener(this); b45.addActionListener(this); b46.addActionListener(this); } public void holly() { fm13=new JFrame("Hollywood Tracks"); fm13.setSize(500,500); fm13.setVisible(true); fm13.setLayout(null); fm13.setBackground(Color.lightGray); ta = new JTextArea(" Hollywood Tracks ",40, 40); ta.setEditable(false); fm13.add(ta); ta.setFont(new Font("monospaced", Font.BOLD+Font.ITALIC, 20)); ta.setBounds(150, 30, 210, 30);

ImageIcon i= new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (2).jpg"); b71=new JButton(i); fm13.add(b71); b71.setBounds(30, 80, 150, 113); ImageIcon i1=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (6).jpg"); b72=new JButton(i1); fm13.add(b72); b72.setBounds(310, 80, 150, 113); ImageIcon i2=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (7).jpg"); b53=new JButton(i2); fm13.add(b53); b53.setBounds(30, 200, 150, 113); ImageIcon i3=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (8).jpg"); b54=new JButton(i3); fm13.add(b54); b54.setBounds(310, 200, 150, 113); ImageIcon i4=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (9).jpg"); b55=new JButton(i4); fm13.add(b55); b55.setBounds(30, 320, 150, 113); ImageIcon i5=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (11).jpg"); b56=new JButton(i5);

fm13.add(b56); b56.setBounds(310, 320, 150, 113); b71.addActionListener(this); b72.addActionListener(this); b53.addActionListener(this); b54.addActionListener(this); b55.addActionListener(this); b56.addActionListener(this); } public void bhakti() { fm14=new JFrame("Bhakti Tracks"); fm14.setSize(500,500); fm14.setVisible(true); fm14.setLayout(null); fm14.setBackground(Color.lightGray); ta = new JTextArea(" Bhakti Tracks ",40, 40); ta.setEditable(false); fm14.add(ta); ta.setFont(new Font("monospaced", Font.BOLD+Font.ITALIC, 20)); ta.setBounds(150, 30, 210, 30); ImageIcon i= new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (12).jpg"); b57=new JButton(i); fm14.add(b57); b57.setBounds(30, 80, 150, 113); ImageIcon i1=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (13).jpg"); b58=new JButton(i1); fm14.add(b58);

b58.setBounds(310, 80, 150, 113); ImageIcon i2=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (14).jpg"); b59=new JButton(i2); fm14.add(b59); b59.setBounds(30, 200, 150, 113); ImageIcon i3=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (15).jpg"); b60=new JButton(i3); fm14.add(b60); b60.setBounds(310, 200, 150, 113); ImageIcon i4=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (16).jpg"); b61=new JButton(i4); fm14.add(b61); b61.setBounds(30, 320, 150, 113); ImageIcon i5=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (17).jpg"); b62=new JButton(i5); fm14.add(b62); b62.setBounds(310, 320, 150, 113); b57.addActionListener(this); b58.addActionListener(this); b59.addActionListener(this); b60.addActionListener(this); b61.addActionListener(this); b62.addActionListener(this); } public void others()

{ fm15=new JFrame("Other Tracks"); fm15.setSize(500,500); fm15.setVisible(true); fm15.setLayout(null); fm15.setBackground(Color.lightGray); ta = new JTextArea(" Other Tracks ",40, 40); ta.setEditable(false); fm15.add(ta); ta.setFont(new Font("monospaced", Font.BOLD+Font.ITALIC, 20)); ta.setBounds(150, 30, 210, 30); ImageIcon i= new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (21).jpg"); b63=new JButton(i); fm15.add(b63); b63.setBounds(30, 80, 150, 113); ImageIcon i1=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (22).jpg"); b64=new JButton(i1); fm15.add(b64); b64.setBounds(310, 80, 150, 113); ImageIcon i2=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (23).jpg"); b65=new JButton(i2); fm15.add(b65); b65.setBounds(30, 200, 150, 113); ImageIcon i3=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (18).jpg"); b66=new JButton(i3);

fm15.add(b66); b66.setBounds(310, 200, 150, 113); ImageIcon i4=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (19).jpg"); b67=new JButton(i4); fm15.add(b67); b67.setBounds(30, 320, 150, 113); ImageIcon i5=new ImageIcon("C:\\Users\\acer\\workspace\\video\\img\\1 (20).jpg"); b68=new JButton(i5); fm15.add(b68); b68.setBounds(310, 320, 150, 113); b64.addActionListener(this); b65.addActionListener(this); b66.addActionListener(this); b67.addActionListener(this); b68.addActionListener(this); b63.addActionListener(this); } public void actionPerformed(ActionEvent e) { if(e.getSource()==b) { v1(); } if(e.getSource()==b47) { bolly(); } if(e.getSource()==b48) { holly();

} if(e.getSource()==b49) { bhakti(); } if(e.getSource()==b50) { others(); } if(e.getSource()==b22) { deluser(); } if(e.getSource()==b21) { edituser(); } if(e.getSource()==b38) { enuser(); } if(e.getSource()==b18) // add cassette { cas1(); } if(e.getSource()==b20) { delcas(); } if(e.getSource()==b33) { disuser(); }

if(e.getSource()==b73) //search { try { String s1,s2,s3; s1 = t3.getText(); Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); if(s1.equals("")) { JOptionPane.showMessageDialog(fm2,"Enter any word!"); } else { ResultSet res= (ResultSet) st.executeQuery("select * from cas where name='"+s1+"'"); if (res.next()!=false) { s2=res.getString("id"); s3=res.getString("name"); if(s1.equals(s3)) {

JOptionPane.showMessageDialog(fm2,"Cassette Code is :"+s2); t3.setText(""); } } else { JOptionPane.showMessageDialog(fm2,"No Result found"); t3.setText(""); } } con.close(); } catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b3) // ADD USER { try { String s,s1,s2,s3,s4,s5; s4="false"; s5="false";

int i=0; char[] pas,pas1; s=t.getText(); pas=p.getPassword(); pas1=p1.getPassword(); boolean check = Arrays.equals(pas, pas1); s1=t1.getText(); s2=t2.getText(); if(check == true && pas.length>7) { JOptionPane.showMessageDialog(fm1,"Valid Password "); s3=new String(pas); if((s.equals(""))||(s1.equals(""))||(s2.equals(""))) { JOptionPane.showMessageDialog(fm1,"fill all textfields correctly!"); } else if(s2.length()<9) { JOptionPane.showMessageDialog(fm1,"fill mobile number correctly!"); t2.setText(null); } else { Class.forName(driver);

con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); st.executeUpdate("INSERT INTO user VALUES ('"+s+"','"+s3+"','"+s1+"','"+s2+"','"+s4+"','"+s5+"'," +i+")"); con.close(); JOptionPane.showMessageDialog(fm1,"record entered"); fm1.setVisible(false); } } else { JOptionPane.showMessageDialog(fm1,"Invalid Password (length must be greater than 7) "); } } catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } }

if(e.getSource()==b29) // Edit USER { try { String s0,s,s1,s2,s3,s4,s5; int i=0; s4="false"; s5="false"; char[] pas,pas1; s0=t15.getText(); s=t16.getText(); pas=p3.getPassword(); pas1=p4.getPassword(); boolean check = Arrays.equals(pas, pas1); s1=t17.getText(); s2=t18.getText(); if(check == true && pas.length>7) { JOptionPane.showMessageDialog(fm8,"Valid Password "); s3=new String(pas); if((s.equals(""))||(s1.equals(""))||(s2.equals(""))) { JOptionPane.showMessageDialog(fm8,"fill all textfields correctly!"); } else if(s2.length()<9) {

JOptionPane.showMessageDialog(fm8,"fill mobile number correctly!"); t2.setText(null); } else { Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement();

st.executeUpdate("UPDATE user set uid='"+s+"',password='"+s3+"',addrs='"+s1+"', mobile='"+s2+"', status='"+s4+"', record='"+s5+"', credit="+i+" where uid='"+s0+"'"); con.close(); JOptionPane.showMessageDialog(fm8,"record entered"); fm8.setVisible(false); } } else { JOptionPane.showMessageDialog(fm8,"Invalid Password (length must be greater than 7) "); } }

catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b15) // Admin login { admin(); } if(e.getSource()==b13) // ADD Cassette { try { String s,s1,s2,s3,s4; int i,i1; s=t4.getText(); s1=t5.getText(); s2=t6.getText(); s3=t7.getText(); s4=group.getSelection().getActionCommand(); i=Integer.parseInt(s2); i1=Integer.parseInt(s3); if((s.equals(""))||(s1.equals(""))||(s2.equals(""))||(s3.equa ls(""))) { JOptionPane.showMessageDialog(fm3,"fill all textfields correctly!");

} else { Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); st.executeUpdate("INSERT INTO cas VALUES ('"+s+"','"+s1+"',"+i+","+i1+",'"+s4+"')"); con.close(); JOptionPane.showMessageDialog(fm3,"record entered"); fm3.setVisible(false); } }

catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b2)

{ fm.setVisible(false); } if(e.getSource()==b32) { fm9.setVisible(false); } if(e.getSource()==b30) { fm8.setVisible(false); } if(e.getSource()==b17) { fm4.setVisible(false); } if(e.getSource()==b35) { fm10.setVisible(false); } if(e.getSource()==b34) //disable user { try { String s1,s2,s; s="dis"; s1=t20.getText(); Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st,st1; st = con.createStatement(); st1=con.createStatement();

ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user " ); while (res.next()) { s2=res.getString("uid"); if((s1.equals(s2))) { st1.executeUpdate("update user set status='"+s+"' where uid='"+s1+"' "); JOptionPane.showMessageDialog(fm10,"Successful ly Done!"); fm10.setVisible(false); } } con.close(); } catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b36) //enable user { try { String s1,s2,s; s="false"; s1=t21.getText();

Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st,st1; st = con.createStatement(); st1=con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user " ); while (res.next()) { s2=res.getString("uid"); if((s1.equals(s2))) { st1.executeUpdate("update user set status='"+s+"' where uid='"+s1+"' "); JOptionPane.showMessageDialog(fm11,"Successful ly Done!"); fm11.setVisible(false); } } con.close(); } catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b12) // user Log Out

{ try { String s2,s3; s2="false"; s3="true"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st,st1; st = con.createStatement(); st1 = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user where status='"+s3+"'" ); while (res.next()) { //s1=res.getString("status"); st1.executeUpdate("update user set status='"+s2+"' "); JOptionPane.showMessageDialog(fm2,"Successfull y Log Out"); fm2.setVisible(false); vdo v1= new vdo(); break; } con.close(); } catch(ClassNotFoundException cnf) { cnf.printStackTrace();

} catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b4) { fm1.setVisible(false); } if(e.getSource()==b14) { fm3.setVisible(false); } if(e.getSource()==b1) //user login { try { String s,s1,s2,s3,s4,s5,s6; s4="true"; s6="dis"; s=t3.getText(); //uid char[] pas; pas=p2.getPassword(); s3=new String(pas); Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st,st1; st = con.createStatement(); st1 = con.createStatement();

ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user where uid='"+s+"'" ); while (res.next()) { s1=res.getString("uid"); s2=res.getString("password"); s5=res.getString("status"); if((s.equals(""))||(s3.equals(""))) { JOptionPane.showMessageDialog(fm1,"fill all textfields correctly!"); break; } else if(s5.equals(s6) || (s5.equals(s4))) { JOptionPane.showMessageDialog(fm1,"Can't access account.\nContact Administrator !"); break; } if(s3.equals(s2) && (s.equals(s1))) { JOptionPane.showMessageDialog(fm,"Authorised"); st1.executeUpdate("update user set status='"+s4+"' where uid='"+s+"' && password='"+s3+"'"); fm.setVisible(false); v2(); break; } else

{ JOptionPane.showMessageDialog(fm,"not Authorised"); break; } } con.close(); } catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b5) // id avail. { try { String s1,s2; s1=t.getText(); Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user" ); while (res.next())

{ s2=res.getString("uid"); if((s1.equals(s2))) { JOptionPane.showMessageDialog(fm1,"Enter Another ID"); } else { JOptionPane.showMessageDialog(fm1, "ID is Available"); break; } } con.close(); } catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } }

if(e.getSource()==b28) availability { try

// (edit) user id

{ String s,s1,s2; s=t15.getText(); s1=t16.getText(); Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user" ); while (res.next()) { s2=res.getString("uid"); if((s1.equals(s))) { JOptionPane.showMessageDialog(fm8,"Same ID"); } else if(s1.equals(s2)) { JOptionPane.showMessageDialog(fm8, "Enter Another ID"); break; } else {

JOptionPane.showMessageDialog(fm8, "ID is available"); break; } } con.close(); } catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b16) { String s,s1; s=t8.getText(); s1="project"; char[] input=adpass.getPassword(); char [] pass={'v','i','d','e','o','l','i','b'}; boolean check = Arrays.equals(input, pass); if((check == true) &&( s1.equals(s))) { JOptionPane.showMessageDialog(fm4,"Logged in as ADMINISTRATOR "); ad1(); }

else if(s.equals("")) { JOptionPane.showMessageDialog(fm4,"pls fill all fields "); } else { JOptionPane.showMessageDialog(fm4,"wrong password"); } fm4.setVisible(false); } if(e.getSource()==b23) { fm4.setVisible(false); fm5.setVisible(false); } if(e.getSource()==b19) { editcas(); } if(e.getSource()==b39) { info(); } if(e.getSource()==b25) { fm6.setVisible(false); } if(e.getSource()==b27) {

fm7.setVisible(false); } if(e.getSource()==b37) { fm11.setVisible(false); } if(e.getSource()==b24) { try { String s0,s,s1,s2,s3,s4; int i,i1; s0=t13.getText(); s=t9.getText(); s1=t10.getText(); s2=t11.getText(); s3=t12.getText(); s4=group1.getSelection().getActionCommand(); i=Integer.parseInt(s2); i1=Integer.parseInt(s3); if((s.equals(""))||(s1.equals(""))||(s2.equals(""))||(s3.equa ls(""))) { JOptionPane.showMessageDialog(fm6,"fill all textfields correctly!"); } else { Class.forName(driver);

con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement();

st.executeUpdate("update cas set id='"+s+"',name='"+s1+"',copies="+i+", cost="+i1+", tag='"+s4+"' where id='"+s0+"'"); con.close(); JOptionPane.showMessageDialog(fm6,"record updated"); fm6.setVisible(false); } }

catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } }

if(e.getSource()==b31) { try {

String s1; s1 = t19.getText(); Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); st.executeUpdate("delete from user where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm9,"record deleted"); fm9.setVisible(false); con.close(); } catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b52) //ISSUE { try { String s1,s2,s3,s4,s5,s6,s7; s4="true"; int i,i1,bill,j; s6=t22.getText();

Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; if(s6.equals("")) { JOptionPane.showMessageDialog(fm16,"Pls. enter the code"); } else { st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where cas.id='"+s6+"' && user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s7=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm16,"Pls. return

already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0)) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm16,"Cassette "+s7+ " issued to: "+s1); break; } else if(j==0) { JOptionPane.showMessageDialog(fm16, "out of stock"); break; }

} con.close(); } } catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b51) //Return { try { String s1,s2,s3,s4,s5,s7; s4="false"; String s6="true"; int i,i1,i2; double bill,j; i2=0; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st=null; st = con.createStatement(); ResultSet res = null; res = (ResultSet)st.executeQuery("SELECT * FROM user,

cas, issue where user.uid=issue.uid && cas.id=issue.id"); if(res.next()!=false) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); j=res.getInt("credit"); s7=res.getString("name"); if(s2.equals(s6)&& (s5.equals(s6))) { t22.setText(s3); i1=i+1; bill=j+(j*(0.04)); Statement s,sa,sb; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("delete from issue where uid='"+s1+"'"); sb.executeUpdate("update user set record='"+s4+"',credit="+i2+" where uid='"+s1+"'");

JOptionPane.showMessageDialog(fm16,"Cassette Returned "+s7); JOptionPane.showMessageDialog(fm16,"Bill: Rs "+bill); } } else { JOptionPane.showMessageDialog(fm16,"Nothing to return"); }

con.close(); } catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b40) { try { //Return

String s1,s2,s3,s4,s5,s7; s4="false"; String s6="true"; int i,i1,i2; double bill,j; i2=0; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st=null; st = con.createStatement(); ResultSet res = null; res = (ResultSet)st.executeQuery("SELECT * FROM user, cas, issue where user.uid=issue.uid && cas.id=issue.id"); if(res.next()!=false) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); j=res.getInt("credit"); s7=res.getString("name"); if(s2.equals(s6)&& (s5.equals(s6))) { i1=i+1; bill=j+(j*(0.04)); Statement s,sa,sb; s= con.createStatement();

sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("delete from issue where uid='"+s1+"'"); sb.executeUpdate("update user set record='"+s4+"',credit="+i2+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm2,"Cassette Returned "+s7); JOptionPane.showMessageDialog(fm2,"Bill: Rs "+bill); } } else { JOptionPane.showMessageDialog(fm2,"Nothing to return"); }

con.close(); } catch(ClassNotFoundException cnf) { cnf.printStackTrace();

} catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b6) //ISSUE on button click munna bhai { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="1004"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies");

s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm2,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm2,"Cassette "+s6+ " issued to: "+s1);

break; } else if(j==0) { JOptionPane.showMessageDialog(fm2, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b44) //ISSUE on button click munna bhai { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="1004"; Class.forName(driver);

con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name");

if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm12,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1;

Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm12,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) { JOptionPane.showMessageDialog(fm12, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace();

} catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b7) //ISSUE on button click heyy babby { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="1005"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies");

s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm2,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm2,"Cassette "+s6+" issued to: "+s1);

break; } else if(j==0) { JOptionPane.showMessageDialog(fm2, "out of stock"); break; } } con.close(); } catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b46) //ISSUE on button click heyy babby { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="1005"; Class.forName(driver);

con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm12,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;;

s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm12,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) { JOptionPane.showMessageDialog(fm12, "out of stock"); break; } } con.close(); } catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) {

se.printStackTrace(); } } if(e.getSource()==b8) //ISSUE on button click jmd { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="3003"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies");

s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm2,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm2,"Cassette "+s6+" issued to: "+s1); break; }

else if(j==0) { JOptionPane.showMessageDialog(fm2, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b9) //ISSUE on button click shreya ghoshal { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="4005"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s);

Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm2,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement();

sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm2,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) { JOptionPane.showMessageDialog(fm2, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) {

se.printStackTrace(); } } if(e.getSource()==b10) //ISSUE on button click enrique { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="4002"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies");

s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm2,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm2,"Cassette "+s6+" issued to: "+s1); break; }

else if(j==0) { JOptionPane.showMessageDialog(fm2, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b11) //ISSUE on button click shakira { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="4001"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s);

Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm2,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement();

sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm2,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) { JOptionPane.showMessageDialog(fm2, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); }

} if(e.getSource()==b41) //ISSUE on button click phir hera pheri { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="1002"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4))

{ JOptionPane.showMessageDialog(fm12,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm12,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) {

JOptionPane.showMessageDialog(fm12, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b42) //ISSUE on button click kal ho na ho { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="1003"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement();

ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm12,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement();

sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm12,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) { JOptionPane.showMessageDialog(fm12, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); }

} if(e.getSource()==b43) //ISSUE on button click om shanti om { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="1001"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4))

{ JOptionPane.showMessageDialog(fm12,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm12,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) {

JOptionPane.showMessageDialog(fm12, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } }

if(e.getSource()==b44) //ISSUE on button click krrish { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="1006"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s);

Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm12,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement();

sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm12,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) { JOptionPane.showMessageDialog(fm12, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) {

se.printStackTrace(); } } if(e.getSource()==b71) //ISSUE on button click titanic { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="2001"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies");

s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm13,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm13,"Cassette "+s6+" issued to: "+s1); break; }

else if(j==0) { JOptionPane.showMessageDialog(fm13, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b72) //ISSUE on button click the mummy { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="2002"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s);

Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm13,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement();

sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm13,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) { JOptionPane.showMessageDialog(fm13, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) {

se.printStackTrace(); } } if(e.getSource()==b53) //ISSUE on button click the shaggy dog { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="2005"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies");

s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm13,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm13,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0)

{ JOptionPane.showMessageDialog(fm13, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b54) //ISSUE on button click failure to launch { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="2006"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s);

Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm13,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement();

sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm13,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) { JOptionPane.showMessageDialog(fm13, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) {

se.printStackTrace(); } } if(e.getSource()==b55) //ISSUE on button click pirates of carribean { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="2003"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies");

s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm13,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm13,"Cassette "+s6+" issued to: "+s1); break; }

else if(j==0) { JOptionPane.showMessageDialog(fm13, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b56) //ISSUE on button click mi3 { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="2004"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s);

Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm13,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement();

sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm13,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) { JOptionPane.showMessageDialog(fm13, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) {

se.printStackTrace(); } } if(e.getSource()==b57) //ISSUE on button click hanuman { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="3001"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name");

if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm14,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm14,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0)

{ JOptionPane.showMessageDialog(fm14, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b58) //ISSUE on button click om { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="3006"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st;

st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm14,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement();

sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm14,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) { JOptionPane.showMessageDialog(fm14, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); }

} if(e.getSource()==b59) //ISSUE on button click ganesh { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="3002"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4))

{ JOptionPane.showMessageDialog(fm14,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm14,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) {

JOptionPane.showMessageDialog(fm14, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b60) //ISSUE on button click gayatri mantra { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="3005"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement();

ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm14,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement();

sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm14,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) { JOptionPane.showMessageDialog(fm14, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); }

} if(e.getSource()==b61) //ISSUE on button click jmd { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="3003"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4))

{ JOptionPane.showMessageDialog(fm14,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm14,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) {

JOptionPane.showMessageDialog(fm14, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b62) //ISSUE on button click guru sahib { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="3004"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement();

ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm14,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement();

sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm14,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) { JOptionPane.showMessageDialog(fm14, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); }

} if(e.getSource()==b63) //ISSUE on button click enrique { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="4002"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name");

if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm15,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm15,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) {

JOptionPane.showMessageDialog(fm15, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b64) //ISSUE on button click lata { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="4004"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement();

ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm15,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement();

sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm15,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) { JOptionPane.showMessageDialog(fm15, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); }

} if(e.getSource()==b65) //ISSUE on button click shreya { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="4005"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4))

{ JOptionPane.showMessageDialog(fm15,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm15,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) {

JOptionPane.showMessageDialog(fm15, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b66) //ISSUE on button click shakira { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="4001"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement();

ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm15,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement();

sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm15,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) { JOptionPane.showMessageDialog(fm15, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); }

} if(e.getSource()==b67) //ISSUE on button click sonu { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="4006"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement(); ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4))

{ JOptionPane.showMessageDialog(fm15,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement(); sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm15,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) {

JOptionPane.showMessageDialog(fm15, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); } } if(e.getSource()==b68) //ISSUE on button click bryan adams { try { String s1,s2,s3,s4,s5,s6; s4="true"; int i,i1,bill,j; String z1; z1="4003"; Class.forName(driver); con = (Connection)DriverManager.getConnection(url,user,pas s); Statement st; st = con.createStatement();

ResultSet res = (ResultSet) st.executeQuery("SELECT * FROM user, cas where user.status='"+s4+"' "); while (res.next()) { s1=res.getString("uid"); s2=res.getString("status"); s3=res.getString("id"); i=res.getInt("copies"); s5=res.getString("record"); bill=res.getInt("cost"); j=res.getInt("copies"); s6=res.getString("name"); if(s5.equals(s4)) { JOptionPane.showMessageDialog(fm15,"Pls. return already issued cassete\nOnly then u can issue new cassette."); break; } if(s2.equals("true") &&(j>0) &&(s3.equals(z1))) { i1=i-1; Statement s,sa,sb;; s= con.createStatement(); sa= con.createStatement();

sb=con.createStatement(); s.executeUpdate("update cas set copies="+i1+" where id='"+s3+"'"); sa.executeUpdate("insert into issue values ('"+s1+"','"+s3+"')"); sb.executeUpdate("update user set record='"+s4+"', credit="+bill+" where uid='"+s1+"'"); JOptionPane.showMessageDialog(fm15,"Cassette "+s6+" issued to: "+s1); break; } else if(j==0) { JOptionPane.showMessageDialog(fm15, "out of stock"); break; } } con.close();

} catch(ClassNotFoundException cnf) { cnf.printStackTrace(); } catch(SQLException se) { se.printStackTrace(); }

} } }

CONCLUSION

This project is designed to meet the requirements of the users. The software project is very big and includes almost all the ways of video library management. It has been developed in JAVA keeping in mind the specifications of the system. Overall the project teaches us the essential skills like:

Using system analysis and design techniques like data flow diagram in designing the system. Understanding the database handling and query processing using My SQL.

SCOPE OF FUTURE APPLICATION


This project can be used in the Libraries with adding some more useful modules in the project. Utmost care and back-up procedures must be established to ensure 100% successful implementation of the video Library Management System.

In case of system failure, the organization should be in a position to process the transaction with another organization or if the worst comes to the worst, it should be in a position to complete it manually.

Vous aimerez peut-être aussi