资源简介

本项目是基于Struts Hibernate Spring框架(SSH框架)整合项目之学生成绩管理系统(初学者入门项目 毕业设计项目)里面附加了Sql Server 2005数据库执行语句 可直接加入运行

资源截图

代码片段和文件信息

package org.action;

import java.util.List;
import java.util.Map;

import org.model.CjbId;
import org.model.Kcb;
import org.model.Cjb;
import org.service.CjService;
import org.service.KcService;
import org.service.XsService;
import org.tool.Pager;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class CjAction extends ActionSupport{
private int pageNow=1;
private int pageSize=8;
private Cjb cj;
private XsService xsService;
private KcService kcService;
private CjService cjService;
public void setXsService(XsService xsService) {
this.xsService = xsService;
}
public void setKcService(KcService kcService) {
this.kcService = kcService;
}
public String execute() throws Exception {
List list1=xsService.findAll(1 xsService.findXsSize());
List list2=kcService.findAll(1 kcService.findKcSize());
Map request=(Map)ActionContext.getContext().get(“request“);
request.put(“list1“ list1);
request.put(“list2“ list2);
return SUCCESS;
}
public String xscjInfo()throws Exception{
List list=cjService.findAllCj(this.getPageNow() this.getPageSize());
Map request=(Map)ActionContext.getContext().get(“request“);
request.put(“list“list);
Pager page=new Pager(this.getPageNow()cjService.findCjSize());
System.out.println(cjService.findCjSize());
request.put(“page“ page);
return SUCCESS;
}
public String findXscj()throws Exception{
List list=cjService.getXsCjList(cj.getId().getXh());
if(list.size()>0){
Map request=(Map)ActionContext.getContext().get(“request“);
request.put(“list“list);
return SUCCESS;
}else
return ERROR;
}
public String addorupdateXscj()throws Exception{
Cjb cj1 = null;
CjbId cjId1=new CjbId();
cjId1.setXh(cj.getId().getXh());
cjId1.setKch(cj.getId().getKch());

if(cjService.getXsCj(cj.getId().getXh() cj.getId().getKch())==null){
cj1 = new Cjb();
cj1.setId(cjId1);
}else{
cj1 = cjService.getXsCj(cj.getId().getXh() cj.getId().getKch());
}
Kcb kc1=kcService.find(cj.getId().getKch());

cj1.setCj(cj.getCj());
if(cj.getCj()>60||cj.getCj()==60){
cj1.setXf(kc1.getXf());
}else
cj1.setXf(0);
cjService.saveorupdateCj(cj1);
return SUCCESS;
}
public String deleteOneXscj()throws Exception{
String xh=cj.getId().getXh();
String kch=cj.getId().getKch();
cjService.deleteCj(xh kch);
Map request=(Map)ActionContext.getContext().get(“request“);
return SUCCESS;
}
public int getPageNow() {
return pageNow;
}
public void setPageNow(int pageNow) {
this.pageNow = pageNow;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public void setCjService(CjService cjService) {
this.cjService = cjService;
}
public Cjb getCj() {
return cj;
}
public void setCj(Cjb cj) {
this.cj = cj;
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-03-10 09:51  StudentScoreManage\
     文件        6494  2015-03-10 09:19  StudentScoreManage\.classpath
     目录           0  2012-03-11 14:51  StudentScoreManage\.myeclipse\
     文件         479  2009-03-11 16:30  StudentScoreManage\.myhibernatedata
     文件         303  2015-03-10 09:18  StudentScoreManage\.mymetadata
     文件        2163  2015-03-10 09:19  StudentScoreManage\.project
     目录           0  2015-03-10 09:38  StudentScoreManage\.settings\
     文件         500  2015-03-10 09:19  StudentScoreManage\.settings\.jsdtscope
     文件         395  2015-03-10 09:19  StudentScoreManage\.settings\org.eclipse.jdt.core.prefs
     文件         468  2015-03-10 09:19  StudentScoreManage\.settings\org.eclipse.wst.common.component
     文件         252  2015-03-10 09:19  StudentScoreManage\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2015-03-10 09:19  StudentScoreManage\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2015-03-10 09:19  StudentScoreManage\.settings\org.eclipse.wst.jsdt.ui.superType.name
     文件         479  2009-03-11 16:28  StudentScoreManage\.springBeans
     目录           0  2015-03-10 09:38  StudentScoreManage\src\
     目录           0  2015-03-10 09:38  StudentScoreManage\src\org\
     目录           0  2015-03-10 09:38  StudentScoreManage\src\org\action\
     文件        2964  2009-03-14 11:17  StudentScoreManage\src\org\action\CjAction.java
     文件         581  2009-04-17 14:22  StudentScoreManage\src\org\action\DlAction-login-validation.xml
     文件         790  2009-04-07 11:36  StudentScoreManage\src\org\action\DlAction.java
     文件        2576  2009-03-14 11:40  StudentScoreManage\src\org\action\KcAction.java
     文件        1287  2009-05-12 11:04  StudentScoreManage\src\org\action\XsAction-addXs-validation.xml
     文件        4283  2009-04-11 15:51  StudentScoreManage\src\org\action\XsAction.java
     目录           0  2015-03-10 09:38  StudentScoreManage\src\org\dao\
     文件         710  2009-03-13 10:33  StudentScoreManage\src\org\dao\CjDao.java
     文件         262  2009-03-11 16:46  StudentScoreManage\src\org\dao\DlDao.java
     目录           0  2015-03-10 09:38  StudentScoreManage\src\org\dao\imp\
     文件        1754  2009-03-13 10:41  StudentScoreManage\src\org\dao\imp\CjDaoImp.java
     文件         711  2009-04-01 20:28  StudentScoreManage\src\org\dao\imp\DlDaoImp.java
     文件        1210  2009-03-17 10:27  StudentScoreManage\src\org\dao\imp\KcDaoImp.java
     文件        1362  2009-03-12 17:41  StudentScoreManage\src\org\dao\imp\XsDaoImp.java
............此处省略206个文件信息

评论

共有 条评论