Fee Management Report
Fee Management Report
java
try
String a = t1.getText();
String b = t2.getText();
String c = t3.getText();
String d = t4.getText();
String e = t5.getText();
String f = t6.getText();
String g = t7.getText();
String h = t8.getText();
String i = t9.getText();
Class.forName("com.mysql.jdbc.Driver");
try (Connection con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/personal","root","")) {
pst.setString(1,a);
pst.setString(2,b);
pst.setString(3,c);
pst.setString(4,d);
pst.setString(5,e);
pst.setString(6,f);
pst.setString(7,g);
pst.setString(8,h);
pst.setString(9,i);
int u= pst.executeUpdate();
if(u>0)
JOptionPane.showMessageDialog(null,"Data Inserted..","Msg",1);
==========================================================================
Update.java
try
String a =t1.getText();
String b =t2.getText();
String c =t3.getText();
String d =t4.getText();
String e =t5.getText();
String f =t6.getText();
String g =t7.getText();
String h =t8.getText();
String i =t9.getText();
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/personal","root","");
pst.setString(1,b);
pst.setString(2,c);
pst.setString(3,d);
pst.setString(4,e);
pst.setString(5,f);
pst.setString(6,g);
pst.setString(7,h);
pst.setString(8,i);
pst.setString(9,a);
int u=pst.executeUpdate();
if(u>0)
JOptionPane.showMessageDialog(null,"Data Updated..","Msg",1);
t1.setText("");
else
JOptionPane.showMessageDialog(null,""+ett,"Msg",1);
Search.java
try
String a =t1.getText();
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/personal","root","");
pst.setString(1,a);
ResultSet rs=pst.executeQuery();
if(rs.next())
t2.setText(rs.getString(2));
t3.setText(rs.getString(3));
t4.setText(rs.getString(4));
t5.setText(rs.getString(5));
t6.setText(rs.getString(6));
t7.setText(rs.getString(7));
t8.setText(rs.getString(8));
t9.setText(rs.getString(9));
else
JOptionPane.showMessageDialog(null,""+ett,"Msg",1);
}
Delete.java
try
String a = t1.getText();
Class.forName("com.mysql.jdbc.Driver");
pst.setString(1,a);
int u= pst.executeUpdate();
if(u>0)
JOptionPane.showMessageDialog(null,"Data Deleted..","Msg",1);
JOptionPane.showMessageDialog(null,""+ett,"Msg",1);