chargecommon.java

来自「宠物医院管理系统 包含宠物的注册 管理 收费 诊断等一系列过程控制 还包含配应」· Java 代码 · 共 43 行

JAVA
43
字号
package yd.pethospital.chargecommon;

import java.sql.*;
import java.util.Vector;
import yd.pethospital.share.SystemShare;

public class ChargeCommon {
	
	public Vector Vc,VRowData;                             //获取字段向量 列向量
	
	public ChargeCommon(){
		
		try {
			SystemShare.SQL="select * from ChargeInfo";
			SystemShare.getConnection();
			SystemShare.rs=SystemShare.pst.executeQuery();
			
			VRowData=new Vector();
			
			while(SystemShare.rs.next()){
				
				Vc=new Vector();                                         //构造空向量
				
				Vc.addElement(SystemShare.rs.getString(2));              //信息表第二字段
				Vc.addElement(SystemShare.rs.getString(3));              //信息表第三字段
				Vc.addElement(SystemShare.rs.getString(4));              //信息表第四字段
				Vc.addElement(SystemShare.rs.getString(5));
				Vc.addElement(SystemShare.rs.getString(6));
				Vc.addElement(SystemShare.rs.getString(7));
				
				VRowData.addElement(Vc);
				
			}
			SystemShare.rs.close();
			
		}catch (SQLException e) {
			e.printStackTrace();
		}
		SystemShare.close();
	}
	
}

⌨️ 快捷键说明

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