Press "Enter" to skip to content

Return book of library management system.

Importance of return book library management system

The Features and Advantages of Library Management System:
Removes guide process of issuing books and simplifies the way of issuing e-book to shop time and effort. The machine lets you find the great levied by using mechanically counting days from the date of problem in case of past due go back of the book.

To get help you can see the video.

Source code for add new student in library page.

  1. Connect with connection class…

Connection con;
ResultSet rs;
PreparedStatement pst;

public Return() {
initComponents();
con = Connect.dbConnect();
middle();
}

public void middle() {
setLocationRelativeTo(null);
}

 

2. Return book code…

String sql = "select * from issue where Student_ID=?";
try {
pst = con.prepareStatement(sql);
pst.setString(1, jTextField1.getText());
rs = pst.executeQuery();
if (rs.next()) {
String add1 = rs.getString("SName");
jTextField2.setText(add1);
String add2 = rs.getString("FName");
jTextField3.setText(add2);
String add3 = rs.getString("Course");
jTextField4.setText(add3);
String add4 = rs.getString("Branch");
jTextField5.setText(add4);
String add5 = rs.getString("Year");
jTextField6.setText(add5);
String add6 = rs.getString("Semester");
jTextField7.setText(add6);
String add7 = rs.getString("Book_ID");
jTextField8.setText(add7);
String add8 = rs.getString("Name");
jTextField9.setText(add8);
String add9 = rs.getString("Edition");
jTextField10.setText(add9);
String add10 = rs.getString("Publisher");
jTextField11.setText(add10);
String add11 = rs.getString("Price");
jTextField12.setText(add11);
String add12 = rs.getString("Pages");
jTextField13.setText(add12);
String add13 = rs.getString("DateofIssue");
jTextField14.setText(add13);

rs.close();
pst.close();
} else {
JOptionPane.showMessageDialog(null, "Student is not Issue With this Student ID");
}
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
}
String sql = "Insert into returnbook(Student_ID,Name,FName,Course,Branch,Year,Semester,Book_ID,BName,Edition,Publisher,Price,Pages,DOI,DOR) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
try {
pst = con.prepareStatement(sql);
pst.setString(1, jTextField1.getText());
pst.setString(2, jTextField2.getText());
pst.setString(3, jTextField3.getText());
pst.setString(4, jTextField4.getText());
pst.setString(5, jTextField5.getText());
pst.setString(6, jTextField6.getText());
pst.setString(7, jTextField7.getText());
pst.setString(8, jTextField8.getText());
pst.setString(9, jTextField9.getText());
pst.setString(10, jTextField10.getText());
pst.setString(11, jTextField11.getText());
pst.setString(12, jTextField12.getText());
pst.setString(13, jTextField13.getText());
pst.setString(14, jTextField14.getText());
pst.setString(15, ((JTextField) jDateChooser1.getDateEditor().getUiComponent()).getText());
pst.execute();
//Delete();
JOptionPane.showMessageDialog(null, "Book Returned");
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
}

Interface of after run the return book page.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *