protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        String orderid = request.getParameter("orderid");
        String orderdate = request.getParameter("orderdate");
        String customerid = request.getParameter("customerid");
        String orderamount = request.getParameter("orderamount");
        String paymentreceived = request.getParameter("paymentreceived");
        
        orderBean bean = new orderBean();
        orderDAO rd = new orderDAO();
        if ((orderid != null) && (orderdate != null) && (customerid != null) && (orderamount != null) && (paymentreceived != null)) {
            bean.setOrderid(Integer.parseInt(orderid));
            bean.setOrderdate(orderdate);
            bean.setCustomerid(Integer.parseInt(customerid));
            bean.setOrderamount(Float.parseFloat(orderamount));
            bean.setPaymentreceived(paymentreceived);
        }
        int id = 0;
        try {
            String opn = request.getParameter("opn");
            if (opn.equals("add")) {
                rd.create(bean);
            } else if (opn.equals("update")) {
                id = Integer.parseInt(orderid);
                System.out.println(id);
                bean.setOrderid(id);
                rd.edit(bean);
            } else if (opn.equals("delete")) {
                id = Integer.parseInt(orderid);
                bean.setOrderid(id);
                rd.remove(id);
            }
            response.sendRedirect("categoryviewforcustomer");
        } finally {
        }
    }