src/com/action/chengjiAction.java

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.action;

import java.util.ArrayList;
import java.util.List;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.bean.chengji;
import com.dao.chengjiDao;

/***
 * 成绩 处理action类
 */
@SuppressWarnings("serial")
public class chengjiAction extends ActionSupport {

	private chengjiDao dao = new chengjiDao();// 初始化 chengjidao方法
	private chengji chengji = new chengji();// 初始化 chengjibean对象
	private List<chengji> chengjis = new ArrayList<chengji>();// 初始化 chengji
																// list对象

	public chengji getChengji() {
		return chengji;
	}

	public void setChengji(chengji chengji) {
		this.chengji = chengji;
	}

	public List<chengji> getChengjis() {
		return chengjis;
	}

	public String execute() {
		return "";
	}

	public String addPage() {// 添加 chengji 方法 前台
		return "chengjiaddPage";
	}

	public String add() {// /添加 chengji 方法 后台处理
		try {
			dao.insert(chengji);
		} catch (Exception e) {
			System.out.println(e.toString());

		}

		ServletActionContext.getRequest().setAttribute("msg",
				"<script>alert('添加成功');</script>");

		return addPage();
	}

	public String list() {// 添加 chengji 查询方法
		try {
			String sql = "";
			if (chengji.getXs() != null && !chengji.getXs().equals("")) {
				sql += " and xs='" + chengji.getXs() + "'";

后面还有 83 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。