⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 viewscform.java

📁 成绩查询系统(学校期末的作业) Struts+jdbc+mysql+tomcat 开发工具为BEA WORKSHOP 功能无非就是增删查改加用户权限判断
💻 JAVA
字号:
package sfs.struts.forms;

import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionMapping;
import org.apache.struts.validator.ValidatorForm;

import sfs.entity.Score;
import sfs.entity.io.ScoreIo;

public class ViewSCForm extends ValidatorForm {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int id;
	private String number;
	private String math;
	private String chinese;
	private String english;
	private String computer;
	private String politics;
	private String geography;
	public String getChinese() {
		return chinese;
	}
	public void setChinese(String chinese) {
		this.chinese = chinese;
	}
	public String getComputer() {
		return computer;
	}
	public void setComputer(String computer) {
		this.computer = computer;
	}
	public String getEnglish() {
		return english;
	}
	public void setEnglish(String english) {
		this.english = english;
	}
	public String getGeography() {
		return geography;
	}
	public void setGeography(String geography) {
		this.geography = geography;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getMath() {
		return math;
	}
	public void setMath(String math) {
		this.math = math;
	}
	public String getNumber() {
		return number;
	}
	public void setNumber(String number) {
		this.number = number;
	}
	public String getPolitics() {
		return politics;
	}
	public void setPolitics(String politics) {
		this.politics = politics;
	}
	
	
	public void reset(ActionMapping arg0, HttpServletRequest request) {
		
		try {
			Score sc=new Score();
			ScoreIo scio=new ScoreIo();
			String number=(String) request.getSession().getAttribute("number");
			sc=(Score)scio.queryBynumber(number).get(0);
			this.chinese=sc.getChinese();
			this.computer=sc.getComputer();
			this.english=sc.getEnglish();
			this.geography=sc.getGeography();
			this.politics=sc.getPolitics();
			this.math=sc.getMath();		
		
		} catch (ClassNotFoundException e) {
			// TODO 自动生成 catch 块
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO 自动生成 catch 块
			e.printStackTrace();
		} catch (NumberFormatException e) {
			// TODO 自动生成 catch 块
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			// TODO 自动生成 catch 块
			e.printStackTrace();
		} catch (InvocationTargetException e) {
			// TODO 自动生成 catch 块
			e.printStackTrace();
		} catch (NoSuchMethodException e) {
			// TODO 自动生成 catch 块
			e.printStackTrace();
		}
		
	}
	public ViewSCForm() {
		super();
		// TODO 自动生成构造函数存根
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -