package servlet;
import java.io.IOException;
import java.util.ArrayList;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import bean.AllBean;
import bean.InsertUpdateDelBean;
public class DelServlet extends HttpServlet {
/**
* Constructor of the object.
*/
public DelServlet() {
super();
}
/**
* Destruction of the servlet. <br>
*/
public void destroy() {
super.destroy(); // Just puts "destroy" string in log
// Put your code here
}
/**
* The doGet method of the servlet. <br>
*
* This method is called when a form has its tag value method equals to get.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doPost(request, response);
}
/**
* The doPost method of the servlet. <br>
*
* This method is called when a form has its tag value method equals to post.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=gb2312");
request.setCharacterEncoding("gb2312");
String sql = "";
String str = "";
InsertUpdateDelBean ib = new InsertUpdateDelBean();
AllBean ab = new AllBean();
String adminid = request.getParameter("adminid");
String business = request.getParameter("business");
String users = request.getParameter("users");
String handle = request.getParameter("handle");
String proposal = request.getParameter("proposal");
String charge = request.getParameter("charge");
if(adminid != null && !adminid.equals("")){
str = "/admin/adminlist.jsp";
sql = "delete from admin where id="+adminid;
if(adminid.equals("1")){
request.setAttribute("message", "初始系统管理员不能删除!");
}else{
ib.insertANDupdateANDdel(sql);
request.setAttribute("message", "操作成功!");
}
}
if(business != null && !business.equals("")){
str = "/admin/business_list.jsp";
sql = "delete from business where id="+business;
ib.insertANDupdateANDdel(sql);
sql = "delete from handle where businessid="+business;
ib.insertANDupdateANDdel(sql);
request.setAttribute("message", "操作成功!");
}
if(users != null && !users.equals("")){
str = "/admin/userlist.jsp";
sql = "delete from users where id="+users;
ib.insertANDupdateANDdel(sql);
sql = "delete from charge where usersid="+users;
ib.insertANDupdateANDdel(sql);
sql = "delete from handle where usersid="+users;
ib.insertANDupdateANDdel(sql);
sql = "delete from proposal where usersid="+users;
ib.insertANDupdateANDdel(sql);
request.setAttribute("message", "操作成功!");
}
if(handle != null && !handle.equals("")){
str = "/admin/handle_list.jsp";
sql = "delete from handle where id="+handle;
ib.insertANDupdateANDdel(sql);
request.setAttribute("message", "操作成功!");
}
if(proposal != null && !proposal.equals("")){
str = "/admin/proposal_list.jsp";
sql = "delete from proposal where id="+proposal;
ib.insertANDupdateANDdel(sql);
request.setAttribute("message", "操作成功!");
}
if(charge != null && !charge.equals("")){
str = "/admin/charge.jsp";
sql = "delete from charge where id="+charge;
ib.insertANDupdateANDdel(sql);
request.setAttribute("message", "操作成功!");
}
RequestDispatcher rd = request.getRequestDispatcher(str);
rd.forward(request,response);
}
/**
* Initialization of the servlet. <br>
*
* @throws ServletException if an error occure
*/
public void init() throws ServletException {
// Put your code here
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
该系统以web页面方式实现了与用户的交互,同时保证了移动电话计费管理系统终端系统与中心数据库的隔离。使用JSP编程语言作为开发工具实现了终端动态页面的设计。系统能够实现查询月帐单,详单、业务受理的基本业务,同时还对交易中用户的各种操作进行了记录,扩展了意见反馈和手机号码归属地查询等网络服务功能,通过了调试和试运行。 内含项目完整代码,数据库及配套报告。
资源推荐
资源详情
资源评论
收起资源包目录
毕业设计:基于Jsp的电信运营采集系统 (110个子文件)
AllBean.class 4KB
ChargeServlet.class 4KB
DelServlet.class 3KB
ModifyAdminServlet.class 3KB
ModifyUserServlet.class 3KB
HandleServlet.class 3KB
RegServlet.class 3KB
ProposalServlet.class 3KB
UserLoginServlet.class 3KB
AdminLoginServlet.class 3KB
BusinessServlet.class 2KB
Validate.class 2KB
SelectBean.class 2KB
RemoveServlet.class 2KB
DBConn.class 1KB
InsertUpdateDelBean.class 1KB
AdminListBean.class 777B
.classpath 828B
org.eclipse.wst.common.component 444B
org.eclipse.wst.jsdt.ui.superType.container 49B
css.css 2KB
Thumbs.db 32KB
java电信运营系统论文.doc 336KB
1111.gif 401KB
bg.gif 13KB
Start.gif 6KB
menu18.gif 1KB
menu6.gif 1KB
menu17.gif 1KB
menu4.gif 1KB
menu19.gif 1KB
menu5.gif 1KB
menu16.gif 1KB
menu7.gif 635B
menu2.gif 511B
menu3.gif 510B
menu1.gif 507B
menu15.gif 351B
menu8.gif 351B
menu12.gif 346B
menu13.gif 345B
menu10.gif 343B
menu14.gif 343B
menu11.gif 343B
menu9.gif 339B
ojdbc14.jar 1.48MB
mysql-connector-java-5.0.8-bin.jar 528KB
sqljdbc4.jar 525KB
commons-fileupload.jar 22KB
FCKeditor-2.3.jar 18KB
DelServlet.java 4KB
ChargeServlet.java 4KB
ModifyAdminServlet.java 4KB
AllBean.java 3KB
ModifyUserServlet.java 3KB
RegServlet.java 3KB
HandleServlet.java 3KB
BusinessServlet.java 3KB
UserLoginServlet.java 3KB
AdminLoginServlet.java 3KB
ProposalServlet.java 3KB
Validate.java 2KB
RemoveServlet.java 2KB
DBConn.java 1KB
SelectBean.java 1KB
InsertUpdateDelBean.java 652B
AdminListBean.java 292B
117367.jpg 270KB
indexbg.jpg 33KB
top.jpg 14KB
.jsdtscope 500B
reg.jsp 41KB
charge.jsp 5KB
huafei.jsp 5KB
addadmin.jsp 4KB
modifyname.jsp 4KB
index.jsp 4KB
usertext.jsp 4KB
index.jsp 4KB
handle.jsp 4KB
modifypwd.jsp 4KB
userpass.jsp 4KB
guishu.jsp 3KB
telphoneExe.jsp 3KB
users.jsp 3KB
users.jsp 3KB
userlist.jsp 3KB
adminlist.jsp 3KB
handle_list.jsp 3KB
proposal_list.jsp 3KB
business_list.jsp 3KB
business.jsp 3KB
proposal.jsp 2KB
telphone.jsp 2KB
telphoneOver.jsp 2KB
top.jsp 1KB
top.jsp 1KB
bottom.jsp 646B
bottom.jsp 645B
index.jsp 438B
共 110 条
- 1
- 2
资源评论
- 殁归2022-07-05资源不错,对我启发很大,获得了新的灵感,受益匪浅。
胥华引
- 粉丝: 87
- 资源: 439
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功