Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Servlet-Interview-Questions Java Hospital management system
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


manigandan
Java Hospital management system
3 Answer(s)      2 years and 10 months ago
Posted in : Servlet Interview Questions


hospital management


Advertisement
View Answers

January 29, 2012 at 7:05 PM


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.*" %>

<!DOCTYPE html>

<html>

   <body>


        <form action="rejijav.jsp">
            <table border="2" align="center">
                <tr><td>id</td><td><input type="text" name="id" class="txt"/></td></tr>
                <tr><td>fname</td><td><input type="text" name="fname" class="txt"/></td></tr>
                <tr><td>lname</td><td><input type="text" name="lname" class="txt"/></td></tr>
                <tr><td>age</td><td><input type="text" name="age" class="txt"/></td></tr>
                <tr><td>dob</td><td><input type="text" name="dob" class="txt"/></td></tr>
                <tr><td>address</td><td><input type="text" name="address" class="txt"/></td></tr>                          
                <tr><td><input type="submit" value="submit"/></td></tr>
            </table>
            <%
Connection con;
    Statement st;
    ResultSet rs;
    PreparedStatement pst=null;
String id,lname,fname,age,dob,address;
id=request.getParameter("id");
fname=request.getParameter("fname");
lname=request.getParameter("lname");
age=request.getParameter("age");
dob=request.getParameter("dob");
address=request.getParameter("address");
if(id!=null && id!="")
       {
    int id1=Integer.parseInt(id);
    try
       {   
    String Url="jdbc:mysql://localhost:3306/mobile";
    Class.forName("com.mysql.jdbc.Driver");   
    con=DriverManager.getConnection(Url,"root","root123");
    st=con.createStatement();
    if(fname!=null && fname!="")
               {
            pst=con.prepareStatement("update register set fname=? where id=?");
            pst.setString(1,fname);
            pst.setInt(2,id1);
            pst.executeUpdate();
               }
    if(lname!=null && lname!="")
               {
            pst=con.prepareStatement("update register set lname=? where id=?");
            pst.setString(1,lname);
            pst.setInt(2,id1);
            pst.executeUpdate();
              }
    if(age!=null && age!="")
               {
                int age1=Integer.parseInt(age);
                pst=con.prepareStatement("update register set age=? where id=?");
                pst.setInt(1,age1);
                pst.setInt(2,id1);
                pst.executeUpdate();
                }
                 if(dob!=null && dob!="")
                     {
                     pst=con.prepareStatement("update register set dob=? where id=?");
                     pst.setString(1,dob);
                     pst.setInt(2,id1);
                     pst.executeUpdate();
                     }
                if(address!=null && address!="")
                    {
                pst=con.prepareStatement("update register set address=? where id=?");
                pst.setString(1,address);
                pst.setInt(2,id1);
                pst.executeUpdate();
                     }

            out.print("Sucessfull!!!");
}catch(Exception e)
       {
    out.print(e);
       }
}%>
                </form>
       </body>
</html>


January 29, 2012 at 7:05 PM


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.*" %>

<!DOCTYPE html>

<html>

   <body>


        <form action="rejijav.jsp">
            <table border="2" align="center">
                <tr><td>id</td><td><input type="text" name="id" class="txt"/></td></tr>
                <tr><td>fname</td><td><input type="text" name="fname" class="txt"/></td></tr>
                <tr><td>lname</td><td><input type="text" name="lname" class="txt"/></td></tr>
                <tr><td>age</td><td><input type="text" name="age" class="txt"/></td></tr>
                <tr><td>dob</td><td><input type="text" name="dob" class="txt"/></td></tr>
                <tr><td>address</td><td><input type="text" name="address" class="txt"/></td></tr>                          
                <tr><td><input type="submit" value="submit"/></td></tr>
            </table>
            <%
Connection con;
    Statement st;
    ResultSet rs;
    PreparedStatement pst=null;
String id,lname,fname,age,dob,address;
id=request.getParameter("id");
fname=request.getParameter("fname");
lname=request.getParameter("lname");
age=request.getParameter("age");
dob=request.getParameter("dob");
address=request.getParameter("address");
if(id!=null && id!="")
       {
    int id1=Integer.parseInt(id);
    try
       {   
    String Url="jdbc:mysql://localhost:3306/mobile";
    Class.forName("com.mysql.jdbc.Driver");   
    con=DriverManager.getConnection(Url,"root","root123");
    st=con.createStatement();
    if(fname!=null && fname!="")
               {
            pst=con.prepareStatement("update register set fname=? where id=?");
            pst.setString(1,fname);
            pst.setInt(2,id1);
            pst.executeUpdate();
               }
    if(lname!=null && lname!="")
               {
            pst=con.prepareStatement("update register set lname=? where id=?");
            pst.setString(1,lname);
            pst.setInt(2,id1);
            pst.executeUpdate();
              }
    if(age!=null && age!="")
               {
                int age1=Integer.parseInt(age);
                pst=con.prepareStatement("update register set age=? where id=?");
                pst.setInt(1,age1);
                pst.setInt(2,id1);
                pst.executeUpdate();
                }
                 if(dob!=null && dob!="")
                     {
                     pst=con.prepareStatement("update register set dob=? where id=?");
                     pst.setString(1,dob);
                     pst.setInt(2,id1);
                     pst.executeUpdate();
                     }
                if(address!=null && address!="")
                    {
                pst=con.prepareStatement("update register set address=? where id=?");
                pst.setString(1,address);
                pst.setInt(2,id1);
                pst.executeUpdate();
                     }

            out.print("Sucessfull!!!");
}catch(Exception e)
       {
    out.print(e);
       }
}%>
                </form>
       </body>
</html>


January 29, 2012 at 7:07 PM


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.*" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body >
        <form action="delete2.jsp">
        <table>
        <tr><td>id</td><td><input type="text" name="id" class="txt"/></td></tr>

        </table>
        <input type="submit" value="Delete"/>
        </form>
        <%
    Connection con;
    Statement st;
    PreparedStatement pst=null;
    String id=request.getParameter("id");
    if(id!=null && id!="")
               {
        int id1=Integer.parseInt(id);

        try
       {   
    String Url="jdbc:mysql://localhost:3306/mobile";
    Class.forName("com.mysql.jdbc.Driver");   
    con=DriverManager.getConnection(Url,"root","root123");
    st=con.createStatement();
    pst=con.prepareStatement("delete from  register where id=?");
    pst.setInt(1,id1);
    pst.executeUpdate();

    out.println("Deleted Sucessfully");
    }catch(Exception e)
       {
    out.print(e);
       }

}%>
    </body>
</html>


Related Tutorials/Questions & Answers:
Java Hospital management system
Java Hospital management system  hospital management    <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page import="java.sql.*" %> <!DOCTYPE html> <html> <body>
hospital Management System
hospital Management System  hello sir i want hospital management system Source code in java swing Back-end Oracle 9i. i want these type of model 1. Username and password 2. staff details i. Doctor details ii. nurse
Advertisements
hospital management bill
hospital management bill  bill preperation
hospital management bill
hospital management bill  bill preperation
hospital management bill
hospital management bill  bill preperation
hospital management bill
hospital management bill  bill preperation    <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page import="java.sql.*" %> <!DOCTYPE html> <html> <head> <meta
Payroll and Leave management system in java web application
Payroll and Leave management system in java web application  Hi Can any one help me with leave management and payroll management system sample source...) as per now to me. And also let me know which technology in java for best fit
for management system
for management system  i need to store some data and to display the stored data and again to modify the data that have been stored and also with either java swing or java awt in format of similar to tat of form
Attendence Management system
Attendence Management system  coding for Attendance management system using java applet
Bank Management System
Bank Management System  I need a Bank Management System Project in Java Swing
i need attendce management system source code in java
i need attendce management system source code in java  i need attendance management system source code in java
Pharmacy Management System
Pharmacy Management System  hi all i wanna Pharmacy management system in java or vb.net or web application >> << thx all
Employee Management System
Employee Management System  coding for employee management system
Employee Management System
Employee Management System  coding for employee management system
coding for employee management system
coding for employee management system  coding for employee management system
library management system
library management system  coding for library management system
material management system
material management system  hi frnds i need a mini project based on material management system if u have the project please post to me on java beginners
web based java application for Leava and Payroll management system
web based java application for Leava and Payroll management system  Hello Team Good Morning, Can any one please help me with the source code for web based java application for Leava and Payroll management system. Thank you
library management system jsp project
library management system jsp project  i need a project of library management system using jsp/java bean
library management system jsp project
library management system jsp project  i need a project of library management system using jsp/java bean
library management system jsp project
library management system jsp project  i need a project of library management system using jsp/java bean
attendance management system
attendance management system  i want to project demo on attendance management system
contact and activity management system
contact and activity management system  how to make a web application on contact and activity management system. can anyone help me
generic workflow management system
generic workflow management system  How to design a generic workflow system for applying scholarship and its processes in online
generic workflow management system
generic workflow management system  How to design a generic workflow system for applying scholarship and its processes in online
Fleek Management System(FMS)
Fleek Management System(FMS)  Hi, Please anybody can reply....I wanna develop a project(FMS) in Java , which was already developed in PHP. Now what technologies should i apply for developing this project. The main aim
Complaint Management System
Complaint Management System  Hi......i have to create a complaint management system where the user calls a toll free number and a computerized voice... with the complaint number. I have no idea as to how I should go about this system
STUDENT MANAGEMENT SYSTEM
STUDENT MANAGEMENT SYSTEM  can any one help me with the coding if this using awt please!!!!!!! STUDENT MANAGEMENT SYSTEM Table details Student (STUDENTID, NAME, ADDRESS, PHONE, MAILID, COURSEID (Foreign Key)) Course (COURSEID
Hospital project
Hospital project  hello sir i want hospital management system Source code in C # swing Back-end sql sever 2005. i want these type of model 1. Username and password 2. staff details i. Doctor details ii. nurse details iii
resume management system
resume management system  hey coders im making an web application for managing resumes.. the application should be able to manage all incoming resumes and information from the client.. m using java as the front end and oracle
Hostel management information system
Hostel management information system  Can u send me mvc based project of hostel management systenm source code
 

 

 

DMCA.com