资源简介
小区物业管理系统java
代码片段和文件信息
package com.sanqing.basic;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import java.util.*;
import java.applet.*;
import javax.swing.event.*;
import com.sanqing.util.DBConnection;
public class InfoMaintain extends Jframe implements ActionListener{
private Connection c;
private JTable out;
private JPanel out1out2;
private String Mouaction;
private JButton button1button2button3;
private JPanel pr;
private String district_nobuilding_no;
public InfoMaintain(JPanel p)
{
this.pr = p;
}
public void actionPerformed(ActionEvent e){
Mouaction = e.getActionCommand();
try
{
c=DBConnection.getConnection();
}
catch(Exception err)
{
err.printStackTrace();
}//建立数据库连接;
district_no = new String();
getTable();
}
public void getTable()
{
if(Mouaction.equals(“小区信息维护“))//当点选“小区信息维护“时的行为;
{
try
{
Statement sql1 = c.createStatement();
Vector columnName = new Vector();
Vector rows = new Vector();
Vector temp = new Vector();//定义向量,进行数据库数据操作
ResultSet rsl1 = sql1.executeQuery(“SELECT * FROM district_info“);
ResultSetmetaData rsmd1 = rsl1.getmetaData();//获取表的字段名称
for(int i = 1;i columnName.addElement(rsmd1.getColumnName(i));
while(rsl1.next())//逐行读取数据
{
for(int j=1;j<=rsmd1.getColumnCount();j++)
{
temp.addElement(rsl1.getString(j));
}
rows.addElement(temp);
}
out = new JTable(rowscolumnName);
out1 = new JPanel();
out1.setLayout(new FlowLayout());
out2 = new JPanel();
out2.setLayout(new BorderLayout());
button1 = new JButton(“修改“);
button2 = new JButton(“重置“);
button3 = new JButton(“返回“);
out1.add(button1);
out1.add(button2);
out1.add(button3);
out2.add(outBorderLayout.CENTER);
out2.add(out1BorderLayout.SOUTH);
pr.removeAll();
//pr.repaint();
pr.add(out2);
pr.repaint();
sql1.close();
rsl1.close();
}
catch(SQLException sqlex)
{
sqlex.printStackTrace();
}
}
else if(Mouaction.equals(“楼宇信息维护“))
{
//try
//{
SelectDistrict ss = new SelectDistrict(district_no);
System.out.println(district_no);
//}
/*catch(SQLException sqlex1)
{
sqlex1.printStackTrace();
}*/
}
/*else if(Mouaction.equals(“业主/房屋信息维护“))
{
try
{
}
catch(SQLException sqlex2)
{
sqlex2.printStackTrace();
}
}*/
}
public class SelectDistrict extends Jframe
{
private Connection con1;
private Container c1;
private JList dist;
private String rslt1[]rslt[]rslt2[];
private String temp;
public SelectDistrict(String dist_no)
{
super(“选择小区“);
this.temp = dist_no;
c1 = getContentPane();
c1.setLayout(new FlowLayout());
rslt = new String[20];
rslt1 = n
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 724992 2010-06-03 13:52 06\06 Access\databa
文件 232 2010-06-03 13:52 06\06 Access\JavaPrj_6\.classpath
文件 385 2010-06-03 13:52 06\06 Access\JavaPrj_6\.project
文件 1329 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\InfoMaintain$SelectDistrict$1.class
文件 3252 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\InfoMaintain$SelectDistrict.class
文件 3723 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\InfoMaintain.class
文件 745 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\LouYuinfo$1.class
文件 742 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\LouYuinfo$2.class
文件 745 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\LouYuinfo$3.class
文件 745 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\LouYuinfo$4.class
文件 744 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\LouYuinfo$5.class
文件 745 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\LouYuinfo$6.class
文件 1636 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\LouYuinfo$7.class
文件 13607 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\LouYuinfo.class
文件 722 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\PriceChange$1.class
文件 722 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\PriceChange$2.class
文件 722 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\PriceChange$3.class
文件 5959 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\PriceChange.class
文件 2692 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\Shoufei.class
文件 739 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\UserInfo$1.class
文件 736 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\UserInfo$2.class
文件 739 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\UserInfo$3.class
文件 739 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\UserInfo$4.class
文件 738 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\UserInfo$5.class
文件 739 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\UserInfo$6.class
文件 1630 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\UserInfo$7.class
文件 14434 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\UserInfo.class
文件 748 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\XiaoQuinfo$1.class
文件 751 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\XiaoQuinfo$2.class
文件 751 2010-06-03 13:52 06\06 Access\JavaPrj_6\bin\com\sanqing\basic\XiaoQuinfo$3.class
............此处省略593个文件信息
- 上一篇:基于Java的地震数据处理软件
- 下一篇:jsp网上购物系统132410
评论
共有 条评论