📄 usercommon.java
字号:
package yd.pethospital.usermanager.jdbc;
import java.sql.*;
import java.util.Vector;
import yd.pethospital.share.SystemShare;
public class UserCommon {
public Vector Vc,VRowData; //获取字段向量 列向量
public UserCommon(){
try {
SystemShare.SQL="select * from UserInfo inner join UserLevel on UserInfo.userlevel=UserLevel.userlevel";
SystemShare.getConnection();
SystemShare.rs=SystemShare.pst.executeQuery();
VRowData=new Vector();
while(SystemShare.rs.next()){
Vc=new Vector(); //构造空向量
Vc.addElement(SystemShare.rs.getString(1)); //项量获得信息表的第一字段
Vc.addElement(SystemShare.rs.getString(2)); //信息表第二字段
Vc.addElement(SystemShare.rs.getString(3)); //信息表第三字段
Vc.addElement(SystemShare.rs.getString(4)); //信息表第四字段
if(SystemShare.rs.getString(4).equals("1")){ //管理员判断
Vc.addElement("管理员");
}
else if(SystemShare.rs.getString(4).equals("2")){ //负责人判断
Vc.addElement("负责人");
}
else if(SystemShare.rs.getString(4).equals("3")){ //业务员判断
Vc.addElement("业务员");
}
else if(SystemShare.rs.getString(4).equals("4")){ //收费员判断
Vc.addElement("收费员");
}
Vc.addElement(SystemShare.rs.getString(6));
VRowData.addElement(Vc);
}
SystemShare.rs.close();
}catch (SQLException e) {
e.printStackTrace();
}
SystemShare.close();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -