public class StudentController { public static void Form(String name, String address, String gender,String age){ new Model.AddRecord().Form(name,address,gender,age); JOptionPane.showMessageDialog(null, "New Record has been inserted ", "Successfull", JOptionPane.INFORMATION_MESSAGE); }
public static void deleteStudent(String name){ new Model.DeleteRecord().Form(name); JOptionPane.showMessageDialog(null,"New Record has been Deleted","Successful",JOptionPane.INFORMATION_MESSAGE); }
"; echo $str2," is a server side Script"; echo" "; print $str1." is a server side Script"; echo" "; print "$str3 is a server side Script"; echo" "; print '$str1 is a server side Script'; echo" "; ?>
import View.Home;
ReplyDeleteimport Model.DbConnection;
import Model.DBSearch;
import java.awt.Frame;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import View.Login;
public class LoginController {
public static void login(String usName,String pass){
try{
String username =null;
String password = null;
ResultSet rs = new DBSearch().searchLogin(usName);
while(rs.next()){
username = rs.getString("username");
password = rs.getString("password");
}
if(username!= null && password != null){
if(password.equals(pass)){
System.out.println("Login Successfull ");
Login.getFrames()[1].dispose();
new Home().setVisible(true);
}
else{
JOptionPane.showMessageDialog(null, "Please check the credentials ", "Error ", JOptionPane.ERROR_MESSAGE);
}
}
else{
JOptionPane.showMessageDialog(null, "Please check the credentials ", "Error ", JOptionPane.ERROR_MESSAGE);
}
DbConnection.closeCon();
}
catch(SQLException ex){
Logger.getLogger(LoginController.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
import Controller.LoginController;
ReplyDeleteimport View.Home;
import java.util.logging.Level;
import java.util.logging.Logger;
LoginController.Login(userNameTF.getText(),pWTF.getText());
ReplyDeletepackage Controller;
ReplyDeleteimport javax.swing.JOptionPane;
public class StudentController {
public static void Form(String name, String address, String gender,String age){
new Model.AddRecord().Form(name,address,gender,age);
JOptionPane.showMessageDialog(null, "New Record has been inserted ", "Successfull", JOptionPane.INFORMATION_MESSAGE);
}
public static void deleteStudent(String name){
new Model.DeleteRecord().Form(name);
JOptionPane.showMessageDialog(null,"New Record has been Deleted","Successful",JOptionPane.INFORMATION_MESSAGE); }
}
PHP
ReplyDelete";
echo $str2," is a server side Script";
echo"
";
print $str1." is a server side Script";
echo"
";
print "$str3 is a server side Script";
echo"
";
print '$str1 is a server side Script';
echo"
";
?>