<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*"%> NURSE PROFILE WINDOW

NURSE PROFILE WINDOW




1
<%!String a="",b="",d="",e="",f="",g="",h="",i="",j=""; %>


<% try{ a=request.getParameter("Button1"); String str1= request.getParameter("t1"); String str2= request.getParameter("t2"); String str3= request.getParameter("t3"); String str4= request.getParameter("t4"); String str5= request.getParameter("t5"); String str6= request.getParameter("t6"); String str7= request.getParameter("t7"); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); Statement s= c.createStatement(); if(a.equals("ADD NURSE PROFILE")) { if(str1!=""&&str2!=""&&str3!=""&&str4!=""&&str5!=""&&str6!=""&&str7!="") { String sql="insert into nurse values("+str1+",'"+str2+"','"+str3+"','"+str4+"',"+str5+",'"+str6+"',"+str7+")"; out.println(sql); s.execute(sql); %> <% } else { %> <% } } else if(a.equals("DELETE NURSE PROFILE")) { if(str1!="") { String sq="select * from nurse where nur_id="+str1+""; ResultSet rs1=s.executeQuery(sq); if(rs1.next()) { String sql="delete from nurse where nur_id="+str1+""; s.execute(sql); %> <% } else { %> <% } } else { %> <% } } else if(a.equals("EDIT NURSE PROFILE")) { if(str1!="") { String sq="select * from nurse where nur_id="+str1+""; ResultSet rs1=s.executeQuery(sq); if(rs1.next()) { String sql="delete from nurse where nur_id="+str1+""; s.execute(sql); String sql1="insert into nurse values("+str1+",'"+str2+"','"+str3+"','"+str4+"',"+str5+",'"+str6+"',"+str7+")"; s.execute(sql1); %> <% } else { %> <% } } else { %> <% } } }catch(Exception e) {} %>
NURSE ID

NURSE DETAILS









<% try { a=request.getParameter("Button1"); if(a.equals("SEARCH NURSE PROFILE")) { String str1= request.getParameter("t1"); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); Statement s= c.createStatement(); if(str1!="") { String sql2="select * from nurse where nur_id='"+str1+"'"; ResultSet r=s.executeQuery(sql2); if(r.next()) { j=r.getString(1); b=r.getString(2); d=r.getString(3); e=r.getString(4); f=r.getString(5); g=r.getString(6); h=r.getString(7); } else { %> <% } } else { %> <% } } }catch(Exception e) {} %>


NURSE NAME>
NURSE EDUQUALIFICATION>
DATE OF BIRTH>
SALARY>
FATHER'S NAME>
DEPARTMENT ID>