资源简介
ECTS 后台管理 购物网站智能管理
这是一个完整的网站后台管理,本人的毕业论文 可供大家参考。MyEclipse+Tomcat+MySql 开发 简单运行方便。
代码片段和文件信息
package cn.com.ambow.action;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.MappingDispatchAction;
import cn.com.ambow.biz.IAdminBiz;
import cn.com.ambow.entity.Admin;
import cn.com.ambow.entity.AdminType;
public class AdminAction extends MappingDispatchAction {
private Admin admin;
private IAdminBiz biz;
public Admin getAdmin() {
return admin;
}
public void setAdmin(Admin admin) {
this.admin = admin;
}
public IAdminBiz getBiz() {
return biz;
}
public void setBiz(IAdminBiz biz) {
this.biz = biz;
}
/**
* 登录
*
* @param mapping
* @param form
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward login(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response)
throws Exception {
ActionForward forward = null;
String name = request.getParameter(“user“);
String password = request.getParameter(“pwd“);
Admin admin = null;
List typelist = null;
try {
typelist = biz.findAllByType();
request.getSession().setAttribute(“typelist“ typelist);
admin = biz.findByNameAndPassword(name password);
if (admin != null) {
request.getSession().setAttribute(“admin“ admin);
forward = mapping.findForward(“success“);
} else {
request.setAttribute(“message“ “Login Fail“);
forward = mapping.findForward(“fail“);
}
} catch (Exception e) {
request.setAttribute(“message“ “Login Fail“);
forward = mapping.findForward(“fail“);
}
return forward;
}
/**
* 管理员列表
*
* @param mapping
* @param form
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward adminlist(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response)
throws Exception {
List adminlist = null;
List typelist = null;
try {
adminlist = biz.findAll();
request.getSession().setAttribute(“adminlist“ adminlist);
} catch (Exception e) {
request.setAttribute(“adminlist“ adminlist);
}
return mapping.findForward(“success“);
}
/**
* 查看管理员详细信息
*
* @param mapping
* @param form
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward admininfo(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response)
throws Exception {
ActionForward forward = null;
int id = Integer.parseInt(request.getParameter(“findid“));
Admin admin = biz.findById(id);
List typelist =
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2011-04-12 14:59 ectsback
文件 2667 2011-03-22 11:26 ectsback\.classpath
目录 0 2011-03-28 18:31 ectsback\.myeclipse
文件 298 2011-03-25 15:12 ectsback\.myme
文件 66 2011-03-22 11:26 ectsback\.myumldata
文件 1414 2011-03-25 10:00 ectsback\.project
目录 0 2011-03-28 18:31 ectsback\.settings
文件 500 2011-03-22 11:26 ectsback\.settings\.jsdtscope
文件 1040 2011-03-22 12:34 ectsback\.settings\com.genuitec.eclipse.j2eedt.core.prefs
文件 88 2011-03-26 16:49 ectsback\.settings\org.eclipse.core.resources.prefs
文件 330 2011-03-22 11:26 ectsback\.settings\org.eclipse.jdt.core.prefs
文件 49 2011-03-22 11:26 ectsback\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2011-03-22 11:26 ectsback\.settings\org.eclipse.wst.jsdt.ui.superType.name
目录 0 2011-03-28 18:31 ectsback\src
目录 0 2011-03-28 18:31 ectsback\src\cn
目录 0 2011-03-28 18:31 ectsback\src\cn\com
目录 0 2011-03-28 18:31 ectsback\src\cn\com\ambow
目录 0 2011-03-28 18:31 ectsback\src\cn\com\ambow\action
文件 6733 2011-03-22 11:26 ectsback\src\cn\com\ambow\action\AdminAction.java
文件 5670 2011-03-25 14:37 ectsback\src\cn\com\ambow\action\CountAction.java
文件 5172 2011-03-25 11:19 ectsback\src\cn\com\ambow\action\MyOrderAction.java
文件 12332 2011-03-25 14:39 ectsback\src\cn\com\ambow\action\ProductAction.java
文件 5535 2011-03-22 11:26 ectsback\src\cn\com\ambow\action\ProviderAction.java
文件 15232 2011-03-25 14:37 ectsback\src\cn\com\ambow\action\UserAction.java
目录 0 2011-03-28 18:31 ectsback\src\cn\com\ambow\biz
文件 597 2011-03-22 11:26 ectsback\src\cn\com\ambow\biz\CategoryBiz.java
文件 443 2011-03-25 14:37 ectsback\src\cn\com\ambow\biz\CountBiz.java
文件 443 2011-03-22 11:26 ectsback\src\cn\com\ambow\biz\IAdminBiz.java
文件 985 2011-03-25 09:51 ectsback\src\cn\com\ambow\biz\IMyOrderBiz.java
文件 1338 2011-03-22 11:26 ectsback\src\cn\com\ambow\biz\IUserBiz.java
............此处省略378个文件信息
评论
共有 条评论