Professional Documents
Culture Documents
DAVY Inventory Management
DAVY Inventory Management
VISAKHAPATNAM
YEAR 2019-20
Internal Examiner
External Examiner
The success and final outcome of this project required a lot of guidance and
assistance from many people and I am extremely privileged to have got this
all along the completion of my project, but also throughout the academic year
of 2019-2020. All that I have done is only due to such supervision and
assistance and I would not forget to thank them.
I would also like to thanks my family and friends who helped me in some or
the other manner in successful completion of this project
use DAVY;
Item_Name varchar(60),
price decimal(7,2),
Quantity int(5));
password varchar(20)
);
Coding
import com.mysql.jdbc.Connection;
import com.mysql.jdbc.Statement;
import java.sql.*;
import javax.swing.JOptionPane;
InvalidL.setText("");
String ID = IDTF.getText();
ResultSet rs = null;
try {
Class.forName("java.sql.Driver");
rs = stmt.executeQuery(sql);
rs.next();
str = rs.getString("Password");
rs.close();
stmt.close();
conn.close();
if(str.equals(PWord))
k.setVisible(true);
this.setVisible(false);
else
PassWordTF.setText("");
IDTF.setText("");
} catch (Exception e)
Coding
Coding
import java.sql.*;
Coding
public class Delete_Item extends javax.swing.JFrame {
ResultSet rs = null;
public Delete_Item() {
initComponents();
try{
Class.forName("java.sql.Driver");
stmt=con.createStatement();
rs=stmt.executeQuery(query);
if(rs.next())
String a=rs.getString("I_Code");
String b=rs.getString("Item_name");
String c=rs.getString("price");
String d=rs.getString("quantity");
txt2.setText(b);
txt3.setText(c);
txt4.setText(d);
cmddelete.setEnabled(true);
txt2.setEditable(false);
txt3.setEditable(false);
txt4.setEditable(false);
} else
txt2.setText("");
txt3.setText("");
txt4.setText("");
a.setVisible(true);
cmdsearch.doClick();
if (res == JOptionPane.YES_OPTION)
try
stmt.executeUpdate(query);
catch(Exception e){
txt2.setText("");
txt3.setText("");
txt4.setText("");
Coding
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
import java.sql.ResultSet;
import javax.swing.table.DefaultTableModel;
import javax.swing.JOptionPane;
Coding
import java.sql.*;
import javax.swing.table.DefaultTableModel;
import javax.swing.JOptionPane;
con=DriverManager.getConnection("jdbc:mysql://localhost/davy","root","oakri
dge");
stmt=con.createStatement();
String query="Select * from item where I_Code ="+txt1.getText()+";";
rs=stmt.executeQuery(query);
}catch (Exception e)
{
JOptionPane.showMessageDialog(this, "Error in connectivity");
}
}
Coding
import java.sql.*;
con=DriverManager.getConnection("jdbc:mysql://localhost/davy","root","oakri
dge");
stmt=con.createStatement();
String query="Select * from Item where I_code ="+txt1.getText()+";";
rs=stmt.executeQuery(query);
if(rs.next())
{
String a=rs.getString("I_Code");
String b=rs.getString("Item_name");
String c=rs.getString("price");
String d=rs.getString("quantity");
txt2.setText(b);
txt3.setText(c);
txt4.setText(d);
cmdupdate.setEnabled(true);
}
else
}catch (Exception e)
{
jOptionPane1.showMessageDialog(this, "Error in connectivity");
}
}
End