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

📄 tablestationconcert.java

📁 一个可以存储和打印成绩单的系统
💻 JAVA
字号:
package org.wuhang.cjsjk.OldDbToNewDb;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.HashMap;
import java.util.Vector;
import org.minjey.cjsjk.dao.Dao;
import org.minjey.cjsjk.model.Station;
public class TableStationConcert{
	static HashMap<Integer,Integer> id_num = new HashMap<Integer,Integer>();
	static Vector<Integer> old_station_v = new Vector<Integer>();
	public static HashMap<Integer,Integer> getID_Num(){
		return id_num;
	}
	public static Vector<Integer> getOld_id(){
		return old_station_v;
	}
    public static void station_concert(Connection old_con) {
		try {
			Statement st = old_con.createStatement();
			ResultSet rs = st.executeQuery("select * from space");
			int count = 0;
			int old_station =0;
			while (rs.next()) {
				count++;
				old_station = rs.getInt("id");
				old_station_v.addElement(old_station);
				id_num.put(old_station, count);
			    Station station_o = new Station();
			    station_o.setName(rs.getString("name"));
				station_o.setAddress(rs.getString("address"));
				station_o.setBz(rs.getString("contact"));
				station_o.setSadmin(rs.getString("responsible"));
			    station_o.setTelephone("");
			    station_o.setPostcode(rs.getString("postmail"));
				Dao dao = Dao.getDao();
				dao.save(station_o);
			}
			System.out.println("@@@@"+count);
			rs.close();
			st.close();
		} catch (Exception e) {
			System.out.println("some error");
			System.out.println(e.getMessage());
        } 
	}
}

⌨️ 快捷键说明

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