public void doPost(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {

    response.setContentType("text/html;charset=gb18030");
    request.setCharacterEncoding("gb18030");
    Publishing publishing = new Publishing();
    try {
      ArrayList allPublishing = DAOFactory.getPublishingDAOInstance().findAllPublishing(publishing);
      request.getSession().setAttribute("allPublishing", allPublishing);
      request.getRequestDispatcher("publishing_queryall.jsp").forward(request, response);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
  public void doPost(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {

    response.setContentType("text/html;charset=gb18030");
    request.setCharacterEncoding("gb18030");
    int rtypeid = Integer.parseInt(request.getParameter("rtypeid"));
    try {
      if (DAOFactory.getReaderTypeDAOInstance().doDelete(rtypeid)) {
        request.getSession().setAttribute("rtypeid", rtypeid);
        request.getRequestDispatcher("ReaderTypeQueryAllServlet").forward(request, response);
      }

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
示例#3
0
 public Cliente consultarCliente() throws GenericException {
   DAOFactory factory = DAOFactory.getDAOFactory(DAOFactory.MYSQL);
   ClienteDAO cli = factory.getClienteDAO();
   return cli.consultarCliente(this);
 }
示例#4
0
 public boolean excluir() throws GenericException {
   DAOFactory factory = DAOFactory.getDAOFactory(DAOFactory.MYSQL);
   ClienteDAO cli = factory.getClienteDAO();
   return cli.excluir(this);
 }