⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 selectcallservlet.java

📁 oa rar it is the jsp
💻 JAVA
字号:
package com.accp.oa.control.servlet.client;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.accp.oa.dao.imple.CallDAO;
import com.accp.oa.dao.imple.commonDAO;

/**
 * 查询出回访信息
 * @author Administrator
 *
 */
public class SelectCallServlet extends HttpServlet {

	/**
	 * Constructor of the object.
	 */
	public SelectCallServlet() {
		super();
	}

	/**
	 * Destruction of the servlet. <br>
	 */
	public void destroy() {
		super.destroy(); // Just puts "destroy" string in log
		// Put your code here
	}

	/**
	 * 在doGet方法中进行处理
	 */
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		commonDAO common = commonDAO.GetcomonDAO();
		CallDAO calldao = CallDAO.getCallDAO();
		//获得HttpSesion对象
		HttpSession session  = request.getSession(true);
		//获得要查询项目的名
		String items = (String)session.getAttribute("StockItmes");
		int totalpage = common.gettatolpage();
		String nums = request.getParameter("topage");
		if (nums == null || nums == "")//是否有
			nums = "1";
		//查询出所有的信息
		ArrayList list = calldao.search(nums, "tb_Call", items);
		/*进行分页处理*/
		int num = common.getpagenumber();
		if (num < 1 || num > totalpage)
			num = 1;
		/*把相应的信息存入session中*/
		session.setAttribute("callrows", String.valueOf(common.gettatolrows()));
		session.setAttribute("Calllist", list);
		session.setAttribute("Callnum", String.valueOf(num));
		session.setAttribute("calltotalpage", String.valueOf(common.gettatolpage()));
		//进行转发
		request.getRequestDispatcher("/customermanage/Call_Index.jsp")
				.forward(request, response);
	}

	/**
	 * 
	 */
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		doGet(request, response);
	}

	/**
	 * Initialization of the servlet. <br>
	 * 
	 * @throws ServletException
	 *             if an error occure
	 */
	public void init() throws ServletException {
		// Put your code here
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -