package com.action;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.util.DBO;
import com.bean.baoming;
import com.dao.baomingDao;
/*
对报名功能进行维护
*/
@SuppressWarnings("serial")
public class baomingAction extends ActionSupport {
private static final long serialVersionUID = 1L;
private baomingDao dao=null;
private baoming baoming=new baoming();////对报名进行管理bean
private List<baoming> baomings=new ArrayList<baoming>();//对报名进行管理获得结果集返回list
private String key="";
private int pageNum=1;
private int pageCount=0;
public baoming getBaoming() {
return baoming;
}
public void setDao(baomingDao dao) {
this.dao = dao;
}
public void setBaoming(baoming baoming) {
this.baoming = baoming;
}
public List<baoming> getBaomings() {
return baomings;
}
public String execute()
{//默认报名功能 添加 暂时留空
return "";
}
public String addPage(){
//报名添加页面
try{
}catch(Exception e){
System.out.println(e.toString());
}
return "baomingaddPage";
}
public String add()
{//对表baoming进行添加操作
int num=0;
ResultSet rs=null;
DBO db=new DBO();
int a=0;
try{
String sql="select count(1) as num from baoming where ydy='"+baoming.getYdy()+"' and bsxm='"+baoming.getBsxm()+"'";
rs=db.query(sql);
if(rs.next()){
num=rs.getInt("num");
}
if(num>0){
ServletActionContext.getRequest().setAttribute("msg", "<script>alert('报名失败、报名重复');</script>");
}else{
sql="select count(1) as num from baoming where ydy='"+baoming.getYdy()+"' and zt in ('报名','同意') ";
rs=db.query(sql);
if(rs.next()){
a=rs.getInt("num");
}
System.out.println("a=="+a);
if(a>=3){
ServletActionContext.getRequest().setAttribute("msg", "<script>alert('报名失败、每人最多报三项');</script>");
}else{
dao.addbaoming(baoming);
ServletActionContext.getRequest().setAttribute("msg", "<script>alert('添加成功');</script>");
}
}
}catch(Exception e){
System.out.println(e.toString());
}
return "baomingadd";
}
public String list()
{//对报名进行管理 对表baoming进行页面查询
int size=10;//分页个数
try{
String hql=" from baoming where 1=1";
String ydy="";
String bsxm="";
if(ServletActionContext.getRequest().getParameter("ydy")!=null){
ydy=ServletActionContext.getRequest().getParameter("ydy").toString();
if(!ydy.equals(""))
hql+=" and ydy='"+ydy+"'";
}
if(ServletActionContext.getRequest().getParameter("bsxm")!=null){
bsxm=ServletActionContext.getRequest().getParameter("bsxm").toString();
if(!bsxm.equals(""))
hql+=" and bsxm='"+bsxm+"'";
}
int count=dao.getbaomings(hql).size();
pageCount=count%size==0?count/size:(count/size+1);
if(pageNum<1)
{
pageNum=1;
}else if(pageNum>pageCount)
{
pageNum=pageCount;
}
baomings=dao.getbaomings(hql, pageNum, size);
}catch(Exception e){
System.out.println(e.toString());
}
return "baominglist";
}
public String listp()
{//对报名进行管理 对表baoming进行查询
try{
String sql=" from baoming where 1=1";
if(ServletActionContext.getRequest().getSession().getAttribute("yhm")!=null){
sql+=" and ydy='"+ServletActionContext.getRequest().getSession().getAttribute("yhm").toString()+"'";
}
baomings=dao.getbaomings(sql);
}catch(Exception e){
System.out.println(e.toString());
}
return "baominglistp";
}
public String del()
{//对报名进行删除 对表baoming进行删除
String keyid=ServletActionContext.getRequest().getParameter("keyid").toString();
baoming tempbean=dao.getbaoming("from baoming where bmid="+keyid);
try{
dao.delbaoming(tempbean);
}catch(Exception e){
System.out.println(e.toString());
}
ServletActionContext.getRequest().setAttribute("msg", "<script>alert('删除成功');</script>");
return list();
}
public String modPage(){
////对报名修改页面 对表baoming进行修改
String keyid=ServletActionContext.getRequest().getParameter("keyid").toString();
try{
baoming=dao.getbaoming("from baoming where bmid="+keyid);
}catch(Exception e){
System.out.println(e.toString());
}
return "baomingmodPage";
}
public String detail(){
////对报名修改页面 对表baoming进行修改
String keyid=ServletActionContext.getRequest().getParameter("keyid").toString();
try{
baoming=dao.getbaoming("from baoming where bmid="+keyid);
}catch(Exception e){
System.out.println(e.toString());
}
return "baomingdetail";
}
public String mod(){
////对报名进行修改操作 对表baoming进行修改
try{
dao.modifybaoming(baoming);
}catch(Exception e){
System.out.println(e.toString());
}
ServletActionContext.getRequest().setAttribute("msg", "<script>alert('操作成功');</script>");//location.href='bookmanage';
return list();
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public int getPageNum() {
return pageNum;
}
public void setPageNum(int pageNum) {
this.pageNum = pageNum;
}
public int getPageCount() {
return pageCount;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
一、源码特点 java ssh运动会管理系统是一套完善的web设计系统(系统采用ssh框架进行设计开发),对理解JSP java编程开发语言有帮助,系统具有完整的源代码和数据库,系统主要采用B/S 模式开发。开发环境为TOMCAT7.0,Myeclipse8.5开发,数据库为Mysql5.0,使用java语言开发。 二、功能介绍 (1)管理员管理:对管理员信息进行添加、删除、修改和查看 (2)公告管理:对公告信息进行添加、删除、修改和查看 (3)工作人员管理:对工作人员信息进行添加、删除、修改和查看 (4)运动员管理:对运动员信息进行添加、删除、修改和查看 (5)比赛项目管理:对比赛项目信息进行添加、删除、修改和查看 (6)报名管理:对报名信息进行添加、删除、修改和查看 (7)成绩管理:对成绩信息进行添加、删除、修改和查看 (8)成绩反馈管理:对成绩反馈信息进行添加、删除、修改和查看 三、注意事项 1、管理员账号:admin 密码:admin 数据库配置文件applicationContext.xml 2、开发环境为TOMCAT7.0,Myeclipse8.5开发
资源推荐
资源详情
资源评论
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![doc](https://img-home.csdnimg.cn/images/20241231044833.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![docx](https://img-home.csdnimg.cn/images/20241231044901.png)
![doc](https://img-home.csdnimg.cn/images/20241231044833.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
共 416 条
- 1
- 2
- 3
- 4
- 5
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
- #完美解决问题
- #运行顺畅
- #内容详尽
- #全网独家
- #注释完整
![avatar](https://profile-avatar.csdnimg.cn/3c425d273e46473cb9b19a74e6896a25_qq_41221322.jpg!1)
翰文编程
- 粉丝: 1w+
- 资源: 2081
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
- 基于jsp+servlet+sql server实现的学生成绩管理系统
- 三相光伏并网逆变器方案:TMS32F2808主控芯片驱动与接口设计资料,三相光伏并网逆变器方案(TMS32F2808主控芯片、MPPT控制与Modbus通讯,详尽资料包括原理图、PCB及代码),三相光
- COMSOL多物理场下的锂枝晶模型:单枝晶定向生长分析与参考文献分享,COMSOL多物理场下的锂枝晶模型:单枝晶生长分析与参考文献汇总,comsol 锂枝晶模型 单枝晶定向生长,可以直接拿来用,不用自
- 锂枝晶生长的Comsol相场模型:单多枝晶定向生长与物理场耦合研究,基于Comsol模拟的锂枝晶相场生长模型:三维单/多枝晶定向生长与物理场耦合研究,锂枝晶相场模型 Comsol 锂枝晶生长模型,锂枝
- Spearman 相关性(Rank Correlation)
- 基于Comsol激光烧蚀技术的水平集应用研究,基于Comsol软件的激光烧蚀技术及其水平集方法的研究与应用,comsol激光烧蚀水平集 ,comsol;激光烧蚀;水平集,COMSOL激光烧蚀技术在水平
- Simulink在50HZ配电网系统中的应用:IEEE33标准下的节点数据统计与电压分布分析,Simulink在50HZ配电网系统中的应用:IEEE33标准下的节点数据统计与电压分布分析,simuli
- 中考联系义务答案顶顶顶顶
- 华为认证网络工程师(HCIP)数据通信核心技术(Datacom-Core Technology)
- 风力摆控制系统(A题).pdf
- DeepSeek 入门资料合集
- 基于SSM的健身国际俱乐部系统。Javaee项目。ssm项目。
- 基于SSM的网上招投标系统。Javaee项目。ssm项目。
- Springboot+vue的学生网上选课管理系统(有报告),Javaee项目,springboot vue前后端分离项目。
- 基于Springboot的爱心商城系统(有报告)。Javaee项目,springboot项目。
- ssm的鲜花销售系统(有报告)。Javaee项目。
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)