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

📄 configtaocan.java

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

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.doone.fj1w.fjmgr.sysmgr.Util;
import com.doone.util.FileLogger;

/**
 * Created by IntelliJ IDEA. User: lizhx Date: 2005-7-15 Time: 14:32:16
 * Email:lizx@doone.com.cn
 */
public class ConfigTaoCan 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();
		String changeTaoCan = "";
		String taoCanType = "";
		String operateType = "";
		String cityCode = "";
		String taoCanCode = "";
		String state = "";
		String ok = "1";
		try {
			changeTaoCan = httpRequest.getParameter("changeTaoCan");//变更的套餐
			taoCanType = httpRequest.getParameter("taoCanType");//套餐的类型
			operateType = httpRequest.getParameter("operateType");
			cityCode = httpRequest.getParameter("cc");
			taoCanCode = httpRequest.getParameter("code");//被配置的套餐
			state = httpRequest.getParameter("state");			
			
			ProdfunBean pb = new ProdfunBean();
			if(operateType.equals("添加")) {
				boolean b = pb.addChangeTanCan(taoCanCode,changeTaoCan,taoCanType,cityCode);
				if(!b) ok = "0";
				httpResponse.sendRedirect(httpRequest.getContextPath()+"/view/config/editTaoCan.jsp?cc="
						+cityCode+"&code="+taoCanCode+"&ok="+ok+"&ot=1");
			}
			else if(operateType.equals("删除")) {
				boolean b = pb.delChangeTanCan(taoCanCode,changeTaoCan,cityCode);
				if(!b) ok = "0";
				httpResponse.sendRedirect(httpRequest.getContextPath()+"/view/config/editTaoCan.jsp?cc="
						+cityCode+"&code="+taoCanCode+"&ok="+ok+"&ot=2");
			}
			else if(operateType.equals("编辑")) {
				boolean b = pb.editChangeTanCan(taoCanCode,changeTaoCan,cityCode,state);
				if(!b) ok = "0";
				httpResponse.sendRedirect(httpRequest.getContextPath()+"/view/config/editTaoCan.jsp?cc="
						+cityCode+"&code="+taoCanCode+"&ok="+ok+"&ot=3");
			}
		} catch (RuntimeException e) {
			FileLogger.getLogger().error(e);
			ok = "0";
			httpResponse.sendRedirect(httpRequest.getContextPath()+"/view/config/editTaoCan.jsp?cc="
					+cityCode+"&code="+taoCanCode+"&ok="+ok+"&ot=2");
		} catch (Exception e) {
			FileLogger.getLogger().error(e);
			ok = "0";
			httpResponse.sendRedirect(httpRequest.getContextPath()+"/view/config/editTaoCan.jsp?cc="
					+cityCode+"&code="+taoCanCode+"&ok="+ok+"&ot=3");
		}
	}
	
	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 + -