<%@page import="com.godoro.sample.*"%>
<%
String message = "L�tfen bilgileri giriniz.";
Sample sample=null;
String update = request.getParameter("update");
if (update != null) {
long sampleId = Long.parseLong(request.getParameter("sampleId"));
String sampleName = request.getParameter("sampleName");
double sampleValue = Double.parseDouble(request.getParameter("sampleValue"));
sample = new Sample(sampleId, sampleName, sampleValue);
SampleManager manager = new SampleManager();
boolean updated = manager.update(sample);
message = "Kay�t g�ncellendi " +sampleId+" "+ sampleName
+ " " + sampleValue + " " + (updated ? "Evet" : "Hay�r");
} else {
long sampleId = Long.parseLong(request.getParameter("sampleId"));
SampleManager manager = new SampleManager();
sample = manager.find(sampleId);
}
%>
<%@page contentType="text/html" pageEncoding="iso-8859-9"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9">
<title>Varl�k-��letmeci</title>
</head>
<body>
<h1>�rnek G�ncelleme</h1>
<i><%=message%></i><br/><br/>
<form>
<input type="hidden" name="sampleId" value="<%=sample.getSampleId()%>"/>
�rnek Kimlik : <%=sample.getSampleId()%><br/><br/>
�rnek Ad� : <input type="text" name="sampleName" value="<%=sample.getSampleName()%>"/><br/><br/>
�rnek De�er : <input type="text" name="sampleValue" value="<%=sample.getSampleValue()%>"/><br/><br/>
<input type="submit" value="G�ncelle" name="update"/>
</form><br/>
<a href="SampleList.jsp">Liste</a>
</body>
</html>
Dosyayı İndir