• 大小: 3.41MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-29
  • 语言: Java
  • 标签:

资源简介

数据库课程设计 饭卡管理系统 课程设计报告和项目源码。开发环境文档了有说

资源截图

代码片段和文件信息

package com.fenglren.action;

import java.util.ArrayList;
import java.util.List;

import com.fenglren.MySQL.*;
import com.fenglren.model.Lunch;
import com.fenglren.service.LunchService;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class LunchAction extends ActionSupport{
private LunchService lunchService = new LunchService();

private List adminArray = new ArrayList();
private List cardArray = new ArrayList();
private List consumeArray = new ArrayList();
private List rechargeArray = new ArrayList();
private List studentArray = new ArrayList();
private List terminalArray = new ArrayList();

private String id;
private String password;
private String newPassword;

private Card card;
private Recharge recharge;
private Student student;
private Terminal terminal;

public String selectAll(){
adminArray.clear();
cardArray.clear();
consumeArray.clear();
rechargeArray.clear();
studentArray.clear();
terminalArray.clear();
String sql = “select * from admin where Aid=‘“+ActionContext.getContext().getSession().get(“adminID“)+“‘“;
adminArray = lunchService.selectAdmin(adminArraysql);
cardArray = lunchService.selectCard(cardArray);
consumeArray = lunchService.selectConsume(consumeArray);
rechargeArray = lunchService.selectRecharge(rechargeArray);
studentArray = lunchService.selectStudent(studentArray);
terminalArray = lunchService.selectTerminal(terminalArray);
ActionContext.getContext().getSession()
.put(“cardArray“cardArray);
ActionContext.getContext().getSession()
.put(“studentArray“studentArray);
ActionContext.getContext().getSession()
.put(“terminalArray“terminalArray);
return SUCCESS;
}

public String login() {
adminArray = lunchService.selectAdmin(adminArray);
for (int i = 0; i < adminArray.size(); i++) {
if (((Admin)adminArray.get(i)).getId().equals(id)) {
if (((Admin) adminArray.get(i)).getPassword().equals(password)) {
ActionContext.getContext().getSession()
.put(“adminID“id);
ActionContext.getContext().getSession()
.put(“password“ password);
return SUCCESS;
}
}
}
return ERROR;
}
public String updateAdPassword() {
String sql=“update admin set Apassword =‘“+newPassword+“‘ where Aid=‘“+ActionContext.getContext().getSession().get(“adminID“)+“‘“;
lunchService.executeSQL(sql);
return SUCCESS;
}

public String insertCard(){
String sql=“insert into card(CmoneyCstrNum) values (“+card.getMoney()+““+card.getStrID()+“)“;
lunchService.executeSQL(sql);
return SUCCESS;
}
public String deleteCard(){
String sql=“delete from card where Cid=“+card.getId();
lunchService.executeSQL(sql);
return SUCCESS;
}
public String updateCard(){
String sql=“update card set Cpassword =‘“+card.getPassword()+“‘Cstate =‘“

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        625  2011-12-20 21:57  lunchCard\.classpath

     文件        300  2011-12-20 21:54  lunchCard\.mymetadata

     文件       1752  2011-12-20 22:02  lunchCard\.project

     文件        500  2011-12-20 21:54  lunchCard\.settings\.jsdtscope

     文件        119  2011-12-23 18:11  lunchCard\.settings\org.eclipse.core.resources.prefs

     文件        395  2011-12-20 21:54  lunchCard\.settings\org.eclipse.jdt.core.prefs

     文件        465  2011-12-20 21:54  lunchCard\.settings\org.eclipse.wst.common.component

     文件        252  2011-12-20 21:54  lunchCard\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2011-12-20 21:54  lunchCard\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2011-12-20 21:54  lunchCard\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       6930  2011-12-23 20:13  lunchCard\src\com\fenglren\action\LunchAction.java

     文件       3759  2011-12-23 01:39  lunchCard\src\com\fenglren\action\UserLoginAction.java

     文件         63  2011-12-21 20:10  lunchCard\src\com\fenglren\model\Lunch.java

     文件        527  2011-12-21 20:11  lunchCard\src\com\fenglren\MySQL\Admin.java

     文件       1104  2011-12-21 23:58  lunchCard\src\com\fenglren\MySQL\Card.java

     文件        943  2011-12-21 23:16  lunchCard\src\com\fenglren\MySQL\Consume.java

     文件        800  2011-12-23 00:57  lunchCard\src\com\fenglren\MySQL\Recharge.java

     文件        917  2011-12-21 20:11  lunchCard\src\com\fenglren\MySQL\Student.java

     文件        533  2011-12-21 20:11  lunchCard\src\com\fenglren\MySQL\Terminal.java

     文件       5763  2011-12-23 13:44  lunchCard\src\com\fenglren\service\LunchService.java

     文件       1389  2011-12-21 23:23  lunchCard\src\com\fenglren\util\DB.java

     文件       4195  2011-12-23 20:18  lunchCard\src\struts.xml

     文件       7243  2011-12-23 21:33  lunchCard\WebRoot\admin\admin.jsp

     文件        932  2011-12-23 21:34  lunchCard\WebRoot\admin\adminLogin.html

     文件       1497  2011-12-23 22:34  lunchCard\WebRoot\admin\card\deleteCard.jsp

     文件       1610  2011-12-23 22:38  lunchCard\WebRoot\admin\card\insertCard.jsp

     文件       1823  2011-12-23 22:43  lunchCard\WebRoot\admin\card\updateCard.jsp

     文件        830  2011-12-22 17:55  lunchCard\WebRoot\admin\error.jsp

     文件       1270  2011-12-23 21:39  lunchCard\WebRoot\admin\inputPassword.jsp

     文件       1546  2011-12-23 22:47  lunchCard\WebRoot\admin\student\deleteStudent.jsp

............此处省略71个文件信息

评论

共有 条评论