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

📄 delpurview.java

📁 电信的网厅的整站代码
💻 JAVA
字号:
package com.doone.fj1w.fjmgr.sysmgr;

import java.io.IOException;
import java.io.PrintWriter;

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

import com.doone.data.DacClient;
import com.doone.uurm.Sys_Purview;

/**
 * Created by IntelliJ IDEA. User: lizhx Date: 2005-7-18 Time: 14:09:02
 * Email:lizx@doone.com.cn
 */
public class DelPurview extends HttpServlet {
	static final private String CONTENT_TYPE = "text/html; charset=GBK";

	public void init() throws ServletException {

	}

	public void doGet(HttpServletRequest httpRequest,
			HttpServletResponse httpResponse) throws ServletException,
			IOException {
		httpRequest.setCharacterEncoding("GBK");
		httpResponse.setContentType(CONTENT_TYPE);
		PrintWriter out = httpResponse.getWriter();
		try {
			String sPurviewId = httpRequest.getParameter("PURVIEWID").trim();

			sPurviewId = Util.Replace(sPurviewId);

			long lPurviewId = Long.parseLong(sPurviewId);
			Sys_Purview oSys_Purview = Sys_Purview.getPurviewByID(
					new DacClient(), lPurviewId);

			oSys_Purview.delete(false);
			oSys_Purview.save();
			out
					.write("<script language=javascript>window.location.href='"+httpRequest.getContextPath()+"/view/sysmgr/OperSuccess.jsp?id="+String.valueOf(oSys_Purview.getUpPurviewId())+"';</script>");
		} catch (RuntimeException e) {
			out
					.write("<script language=javascript>window.location.href='"+httpRequest.getContextPath()+"/view/sysmgr/OperFailure.jsp?error="
							+ Util.Replace(e.getMessage()) + "';</script>");
		} catch (Exception e) {
			out
					.write("<script language=javascript>window.location.href='"+httpRequest.getContextPath()+"/view/sysmgr/OperFailure.jsp';</script>");
		}
	}

	public void doPost(HttpServletRequest httpRequest,
			HttpServletResponse httpResponse) throws ServletException,
			IOException {
		doGet(httpRequest, httpResponse);

	}

	// Clean up resources
	public void destroy() {
	}
}

⌨️ 快捷键说明

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