<%@ page language="java" contentType="text/html" %>
<%@ page import="com.softwareag.tamino.api.dom.*" %>
<%@ page import="org.w3c.dom.*" %>
<%@ page import="taminoproject.BeanInsert" %>
<%@ page import="taminoproject.Query" %>
<%@ page import = "com.docuverse.dom.*" %>
<% BeanInsert bi = new BeanInsert();%>
<%@ include file="Template.html"%>
<% String modify = request.getParameter("choice"); %>
<%TaminoResult tr = null;
TaminoResult tru = null;
String qname = "";
boolean conf = true;
Element firstname = null;
TaminoClient tam = new TaminoClient("http://localhost/tamino/Employees/Employees");
tam.startSession();
tam.setPageSize(5);%>
<% tr = tam.query("Employees[FirstName=\""+modify+"\"]");%>
<%while(tr.hasMoreElements()){%>
<% firstname = (Element)tr.getNextElement();%>
<%Element nam = (Element)firstname.getElementsByTagName("FirstName").item(0);%>
<%Element nam1 = (Element)firstname.getElementsByTagName("LastName").item(0);%>
Update : <%= nam.getFirstChild().getNodeValue()%> <%=nam1.getFirstChild().getNodeValue()%>
<%Element employeeNo = (Element)firstname.getElementsByTagName("EmployeeNo").item(0);%>
<%Element Name = (Element)firstname.getElementsByTagName("FirstName").item(0);%>
<%="First Name" + Name%>
<%="First Name" + firstname%>
<%Element lastName = (Element)firstname.getElementsByTagName("LastName").item(0);%>
<%Element idno = (Element)firstname.getElementsByTagName("IdNumber").item(0);%>
<%Element dob = (Element)firstname.getElementsByTagName("Date_of_Birth").item(0);%>
<%Element comp_nam = (Element)firstname.getElementsByTagName("Company_Name").item(0);%>
<%Element title =(Element)firstname.getElementsByTagName("Title").item(0);%>
<%Element telephone = (Element)firstname.getElementsByTagName("Telephone").item(0);%>
<%Element fax =(Element)firstname.getElementsByTagName("Fax").item(0);%>
<%Element email =(Element)firstname.getElementsByTagName("Email").item(0);%>
<%Element street =(Element)firstname.getElementsByTagName("Street").item(0);%>
<%Element city =(Element)firstname.getElementsByTagName("City").item(0);%>
<%Element country =(Element)firstname.getElementsByTagName("Country").item(0);%>
Employee Number : |
> |
First Name : |
> |
Last Name : | <input type="text" name="updateLastName" value=<%=lastName.getFirstChild().getNodeValue()%>> |
Id Number : |
> |
Date of Birth : |
> |
Company Name : | <input type="text"name="updateCoName" value=<%=comp_nam.getFirstChild().getNodeValue()%>> |
Title : |
> |
Telephone Number : | <input type="text"name="updateTel" value=<%=telephone.getFirstChild().getNodeValue()%>> |
Fax Number : |
> |
Email Address : | <input type="text"name="updateEmail" value=<%=email.getFirstChild().getNodeValue()%>> |
Street Name : | <input type="text"name="updateStreet" value=<%=street.getFirstChild().getNodeValue()%>> |
City : | <input type="text"name="updateCity" value=<%=city.getFirstChild().getNodeValue()%>> |
Country : |
<input type="text"name="updateCount" value=<%=country.getFirstChild().getNodeValue()%>> |
<%}%>
<%if (request.getMethod().equals("POST")) { %>
<%try{%>
<%while(tr.hasMoreElements()){%>
<%Element el = (Element) tr.nextElement();
tr = tam.update(el,"Employees","Employees");
tam.commit(true);%>
<%}%>
<% tam.endSession();%>
<%}%><%catch(IOException e){%>
<%= e.getMessage() %>
<%}%>
<%}%>