package Controlers.ItemMgt;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.google.appengine.api.datastore.DatastoreService;
import com.google.appengine.api.datastore.DatastoreServiceFactory;
import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.Transaction;
@SuppressWarnings("serial")
public class ItemMgtSevlet extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException, ServletException {
resp.setContentType("text/html");
String Id = req.getParameter("firstname");
String carname = req.getParameter("Cname");
String catogary = req.getParameter("Cat");
String chasy_number = req.getParameter("CNumber");
String Engine_number = req.getParameter("ENumber");
String prise = req.getParameter("prise");
String Quntity = req.getParameter("quont");
DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
Transaction txn = datastore.beginTransaction();
Entity function2= new Entity("CaeDetail");
function2.setProperty("car_id", Id);
function2.setProperty("carname", carname);
function2.setProperty("catogary",catogary);
function2.setProperty("chasy_number", chasy_number);
function2.setProperty("Engine_number", Engine_number);
function2.setProperty("prise", prise);
function2.setProperty("Quntity",Quntity);
txn.commit();
Transaction txn2 = datastore.beginTransaction();datastore.put(function2);
txn2.commit();
}
}