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)
最新资源
- 基于Java的Web考试系统设计与实现源码
- 基于Vue技术的仓库作业可视化大屏设计源码
- 基于Html与JavaScript的高校假期去向APPweb端设计源码
- 基于小波变换与平行注意力的多源遥感图像分类设计源码
- 基于Vue框架的二手书交易系统设计源码
- 基于微信小程序的new-ailinjia-wxapp项目设计源码
- 基于Java和前端技术栈的施工管理验收系统设计源码
- 基于Vue框架的铃宇绩效项目设计源码
- 基于C++和Qt框架的航班订票管理系统设计源码
- 基于CSS、HTML、JavaScript、Python的web期末课程设计数据库连接源码
- 基于Vue+Node.js+Express+MySQL的留言墙项目设计源码
- 基于Vue.js的完整书城项目(前台官网+后台管理系统)设计源码
- 基于Vue的finance-client企业财务管理平台pc客户端设计源码
- 基于JavaScript、TypeScript及微信小程序的红色大坪设计源码
- 基于Java语言的fjdshopping仿京东冷链一体平台设计源码
- 基于Vue框架的ShengHongSports场地预约设计源码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![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)