apply.java

来自「利用当前管理信息系统科学的、实用的理论」· Java 代码 · 共 45 行

JAVA
45
字号
package com.haizi.struts.order;

import java.sql.ResultSet;
import java.util.Vector;

import com.haizi.struts.businessobjects.ApplyingBO;
import com.haizi.struts.datebase.DBConnect;

public class Apply {
	
	public ResultSet rs;
	public  Vector allContent(){
		DBConnect dbc = null;
		Vector allApplyVector = new Vector();
		try{
			dbc  = new DBConnect();
			dbc.prepareStatement("SELECT * FROM order_applying_info where state='0' order by applying_no");
			rs = dbc.executeQuery();
				while(rs.next()){
				ApplyingBO applyingBO = new ApplyingBO();
				applyingBO.setApplying_no(rs.getInt("applying_no"));
				applyingBO.setDep_name(rs.getString("dep_name"));
				applyingBO.setSpare_no(rs.getInt("spare_no"));
				applyingBO.setUser_name(rs.getString("user_name"));
				applyingBO.setApplying_person(rs.getString("applying_person"));
				applyingBO.setSpare_name(rs.getString("spare_name"));
				applyingBO.setQuan(rs.getFloat("quan"));
				applyingBO.setUnits(rs.getString("units"));
				applyingBO.setDate(rs.getDate("date"));
				allApplyVector.add(applyingBO);
			}
		}catch(Exception e){
			System.err.println(e);
		}finally{
			try{
				dbc.close();
			}catch(Exception e){
				e.printStackTrace();
			}
		}
		return allApplyVector;
	}

	}

⌨️ 快捷键说明

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