package KcglSys;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import com.borland.jbcl.layout.*;
import java.sql.*;
import javax.swing.tree.DefaultMutableTreeNode;
import com.borland.dbswing.*;
import com.borland.dx.sql.dataset.*;
import com.borland.dx.dataset.*;
import javax.swing.tree.TreePath;
/**
* <p>Title: 库存管理信息系统</p>
* <p>Description: 库存管理信息系统,企业好帮手</p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: ios</p>
* @author dragon
* @version 1.0
*/
public class WhCollection_Frm
extends JFrame {
JPanel contentPane;
XYLayout xYLayout1 = new XYLayout();
JScrollPane jScrollPane1 = new JScrollPane();
JTree jTree1 = new JTree();
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
TableScrollPane tableScrollPane1 = new TableScrollPane();
JdbTable jdbTable1 = new JdbTable();
Database database1 = new Database();
QueryDataSet queryDataSet1 = new QueryDataSet();
Column column1 = new Column();
Column column2 = new Column();
Column column3 = new Column();
Column column4 = new Column();
JButton jButton2 = new JButton();
JPanel jPanel1 = new JPanel();
JLabel jLabel3 = new JLabel();
XYLayout xYLayout2 = new XYLayout();
JLabel jLabel4 = new JLabel();
JLabel jLabel5 = new JLabel();
JLabel jLabel6 = new JLabel();
JLabel jLabel7 = new JLabel();
JdbTextField jdbTextField1 = new JdbTextField();
JdbTextField jdbTextField2 = new JdbTextField();
JdbTextField jdbTextField3 = new JdbTextField();
JdbTextField jdbTextField4 = new JdbTextField();
JdbTextField jdbTextField5 = new JdbTextField();
JdbTextField jdbTextField6 = new JdbTextField();
JPanel jPanel2 = new JPanel();
JLabel jLabel8 = new JLabel();
XYLayout xYLayout3 = new XYLayout();
JdbTextField jdbTextField7 = new JdbTextField();
JLabel jLabel9 = new JLabel();
JTextField jTextField1 = new JTextField();
JButton jButton1 = new JButton();
Column column5 = new Column();
Column column6 = new Column();
Column column7 = new Column();
Column column8 = new Column();
Column column9 = new Column();
Column column10 = new Column();
Column column11 = new Column();
Column column12 = new Column();
Column column13 = new Column();
Column column14 = new Column();
Column column15 = new Column();
Column column16 = new Column();
Column column17 = new Column();
Column column18 = new Column();
//Construct the frame
public WhCollection_Frm() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
}
catch (Exception e) {
e.printStackTrace();
}
}
//Component initialization
private void jbInit() throws Exception {
contentPane = (JPanel)this.getContentPane();
contentPane.setLayout(xYLayout1);
this.setSize(new Dimension(608, 451));
this.setTitle("库存盘点");
jLabel1.setText("以下是库房/货位列表:");
//建立库房、库位列表树
DefaultMutableTreeNode top = new DefaultMutableTreeNode("仓库");
jTree1 = new JTree(top);
//实例化buildTree
buildWarehouseTree whtree = new buildWarehouseTree();
//初始化whtree
whtree.get_Tree(jTree1, top);
//扩展第一结点
jTree1.expandRow(0);
MouseListener ml = new MouseAdapter() {
public void mousePressed(MouseEvent e) {
int selRow = jTree1.getRowForLocation(e.getX(), e.getY());
TreePath selPath = jTree1.getPathForLocation(e.getX(), e.getY());
if (selRow == 0) {
queryDataSet1.close();
queryDataSet1.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(
database1,
"SELECT w.GoodsId as \"货物代码\",g.GName as \"名称\" ,g.GStyle as \"型号\",g.GUnit " +
"as \"计量单位\",w.OrgPrice as \"期初单价\",w.OrgAmount as \"期初数量\",w.isprice as \"入库单价\"," +
"w.isamount as \"入库数量\",w.osprice as \"出库价格\",w.osamount as \"出库数量\",w.WhId " +
"as \"库房\",w.WsId as \"货位\" FROM whgoods w,GoodsInfo g where g.goodsid=w.goodsid ", null, true,
Load.ALL));
queryDataSet1.refresh();
}
else if (selRow > 0) {
String nodeStr = selPath.getPathComponent(1).toString();
int whidEnd = nodeStr.indexOf("]");
String whid = nodeStr.substring(1, whidEnd);
queryDataSet1.close();
String sql = null;
if (selPath.getPathCount() == 2) {
sql =
"SELECT w.GoodsId as \"货物代码\",g.GName as \"名称\" ,g.GStyle as \"型号\",g.GUnit " +
"as \"计量单位\",w.OrgPrice as \"期初单价\",w.OrgAmount as \"期初数量\",w.isprice as \"入库单价\"," +
"w.isamount as \"入库数量\",w.osprice as \"出库价格\",w.osamount as \"出库数量\",w.WhId " +
"as \"库房\",w.WsId as \"货位\" FROM whgoods w,GoodsInfo g where g.goodsid=w.goodsid and w.whid='" +
whid + "'";
}
else if (selPath.getPathCount() == 3) {
String node2Str = selPath.getPathComponent(2).toString();
int wsidEnd = nodeStr.indexOf("]");
String wsid = node2Str.substring(1, wsidEnd);
sql =
"SELECT w.GoodsId as \"货物代码\",g.GName as \"名称\" ,g.GStyle as \"型号\",g.GUnit " +
"as \"计量单位\",w.OrgPrice as \"期初单价\",w.OrgAmount as \"期初数量\",w.isprice as \"入库单价\"," +
"w.isamount as \"入库数量\",w.osprice as \"出库价格\",w.osamount as \"出库数量\",w.WhId " +
"as \"库房\",w.WsId as \"货位\" FROM whgoods w,GoodsInfo g where g.goodsid=w.goodsid and w.whid='" +
whid + "' and w.wsid='" + wsid + "'";
}
queryDataSet1.setQuery(new com.borland.dx.sql.dataset.
QueryDescriptor(database1, sql, null, true,
Load.ALL));
queryDataSet1.refresh();
}
}
};
jTree1.addMouseListener(ml);
jTree1.setSelectionRow(0);
jLabel2.setText("以下是对应货位的库存列表:");
tableScrollPane1.setBorder(BorderFactory.createLineBorder(Color.black));
database1.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor(
"jdbc:odbc:KcglSys", "sa", "sa", false, "sun.jdbc.odbc.JdbcOdbcDriver"));
column1.setColumnName("whid");
column1.setDataType(com.borland.dx.dataset.Variant.STRING);
column1.setPreferredOrdinal(0);
column1.setServerColumnName("NewColumn1");
column1.setSqlType(0);
queryDataSet1.setMetaDataUpdate(MetaDataUpdate.TABLENAME +
MetaDataUpdate.PRECISION +
MetaDataUpdate.SCALE +
MetaDataUpdate.SEARCHABLE);
queryDataSet1.setEnableInsert(false);
queryDataSet1.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(
database1,
" SELECT w.GoodsId as \"货物代码\",g.GName as \"名称\" ,g.GStyle as \"型号\",g.GUnit " +
"as \"计量单位\",w.OrgPrice as \"期初单价\",w.OrgAmount as \"期初数量\",w.isprice as " +
"\"入库单价\",w.isamount as \"入库数量\",w.osprice as \"出库价格\",w.osamount as \"出库数量\",w.WhId " +
"as \"库房\",w.WsId as \"货位\" FROM whgoods w,GoodsInfo g where g.goodsid=w.goodsid", null, true,
Load.ALL));
jdbTable1.setDataSet(queryDataSet1);
column2.setColumnName("货物代码");
column2.setDataType(com.borland.dx.dataset.Variant.INT);
column2.setRowId(true);
column2.setTableName("OriginalStorage");
column2.setServerColumnName("GoodsId");
column2.setSqlType(4);
column3.setColumnName("库房");
column3.setDataType(com.borland.dx.dataset.Variant.STRING);
column3.setPrecision(10);
column3.setRowId(true);
column3.setTableName("OriginalStorage");
column3.setSe
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
库存信息管理系统 (159个子文件)
AddMoveStorageTable_Frm.class 15KB
AddInStorageTable_Frm.class 14KB
WhCollection_Frm.class 14KB
AddOutStorageTable_Frm.class 14KB
WarehouseMan_Frm.class 12KB
AddOrgGoods_Frm.class 11KB
Main_Frm.class 10KB
IsCollection_Frm.class 10KB
OsCollection_Frm.class 10KB
MsCollection_Frm.class 10KB
AddMoveGoods_Frm.class 9KB
AddOutGoods_Frm.class 9KB
AddInGoods_Frm.class 8KB
OrgStorageMan_Frm.class 7KB
ProviderAndSalerMan_Frm.class 6KB
UsersMan_Frm.class 5KB
Main_Frm_AboutBox.class 4KB
GoodsMan_Frm.class 4KB
WhCollection_Frm$1.class 3KB
OrgStorageMan_Frm$1.class 3KB
buildWarehouseTree.class 2KB
ConnectDBBean.class 2KB
buildWhStallsTree.class 2KB
GoodsAppl.class 1KB
KcglAppl.class 1KB
CbShowList.class 1KB
ErrorCheck.class 1KB
GetFrmCenterShow.class 908B
IsCollection_Frm_queryDataSet2_calcFieldsAdapter.class 874B
WhCollection_Frm_queryDataSet1_calcFieldsAdapter.class 874B
MsCollection_Frm_queryDataSet2_calcFieldsAdapter.class 874B
OsCollection_Frm_queryDataSet2_calcFieldsAdapter.class 874B
AddMoveStorageTable_Frm_jTextField4_actionAdapter.class 768B
AddMoveStorageTable_Frm_jComboBox4_actionAdapter.class 765B
AddMoveStorageTable_Frm_jComboBox1_actionAdapter.class 765B
AddMoveStorageTable_Frm_jComboBox2_actionAdapter.class 765B
AddMoveStorageTable_Frm_jComboBox3_actionAdapter.class 765B
IsCollection_Frm_queryDataSet2_navigationAdapter.class 764B
MsCollection_Frm_queryDataSet1_navigationAdapter.class 764B
OsCollection_Frm_queryDataSet1_navigationAdapter.class 764B
OsCollection_Frm_queryDataSet2_navigationAdapter.class 764B
IsCollection_Frm_queryDataSet1_navigationAdapter.class 764B
MsCollection_Frm_queryDataSet2_navigationAdapter.class 764B
WarehouseMan_Frm_queryDataSet1_navigationAdapter.class 764B
AddOutStorageTable_Frm_jComboBox1_actionAdapter.class 759B
AddOutStorageTable_Frm_jComboBox3_actionAdapter.class 759B
AddMoveStorageTable_Frm_jButton2_actionAdapter.class 759B
AddOutStorageTable_Frm_jComboBox2_actionAdapter.class 759B
AddMoveStorageTable_Frm_jButton1_actionAdapter.class 759B
AddMoveStorageTable_Frm_jButton4_actionAdapter.class 759B
AddMoveStorageTable_Frm_jButton3_actionAdapter.class 759B
ProviderAndSalerMan_Frm_jButton1_actionAdapter.class 759B
AddOutStorageTable_Frm_jButton2_actionAdapter.class 753B
AddInStorageTable_Frm_jComboBox3_actionAdapter.class 753B
AddOutStorageTable_Frm_jButton4_actionAdapter.class 753B
AddInStorageTable_Frm_jComboBox2_actionAdapter.class 753B
AddOutStorageTable_Frm_jButton1_actionAdapter.class 753B
AddOutStorageTable_Frm_jButton3_actionAdapter.class 753B
AddInStorageTable_Frm_jComboBox1_actionAdapter.class 753B
AddInStorageTable_Frm_jButton3_actionAdapter.class 747B
AddInStorageTable_Frm_jButton4_actionAdapter.class 747B
AddInStorageTable_Frm_jButton1_actionAdapter.class 747B
AddInStorageTable_Frm_jButton2_actionAdapter.class 747B
AddMoveStorageTable_Frm_jComboBox4_mouseAdapter.class 729B
AddMoveStorageTable_Frm_jComboBox2_mouseAdapter.class 729B
OrgStorageMan_Frm_jButton1_actionAdapter.class 723B
AddMoveGoods_Frm_jComboBox1_actionAdapter.class 723B
OrgStorageMan_Frm_jButton2_actionAdapter.class 723B
AddOrgGoods_Frm_jComboBox3_actionAdapter.class 717B
WarehouseMan_Frm_jButton7_actionAdapter.class 717B
MsCollection_Frm_jButton2_actionAdapter.class 717B
MsCollection_Frm_jButton1_actionAdapter.class 717B
AddMoveGoods_Frm_jButton1_actionAdapter.class 717B
IsCollection_Frm_jButton1_actionAdapter.class 717B
OsCollection_Frm_jButton1_actionAdapter.class 717B
AddMoveGoods_Frm_jButton2_actionAdapter.class 717B
WarehouseMan_Frm_jButton3_actionAdapter.class 717B
WarehouseMan_Frm_jButton1_actionAdapter.class 717B
AddOrgGoods_Frm_jComboBox1_actionAdapter.class 717B
AddOrgGoods_Frm_jComboBox2_actionAdapter.class 717B
OsCollection_Frm_jButton2_actionAdapter.class 717B
WarehouseMan_Frm_jButton2_actionAdapter.class 717B
WhCollection_Frm_jButton1_actionAdapter.class 717B
AddInStorageTable_Frm_jComboBox2_mouseAdapter.class 717B
WhCollection_Frm_jButton2_actionAdapter.class 717B
IsCollection_Frm_jButton2_actionAdapter.class 717B
AddOutGoods_Frm_jComboBox1_actionAdapter.class 717B
AddOutGoods_Frm_jButton2_actionAdapter.class 711B
AddOrgGoods_Frm_jButton1_actionAdapter.class 711B
AddOutGoods_Frm_jButton1_actionAdapter.class 711B
AddMoveStorageTable_Frm_this_mouseAdapter.class 711B
AddOrgGoods_Frm_jButton2_actionAdapter.class 711B
AddInGoods_Frm_jComboBox1_actionAdapter.class 711B
AddOutStorageTable_Frm_this_mouseAdapter.class 705B
AddInGoods_Frm_jButton1_actionAdapter.class 705B
AddInGoods_Frm_jButton2_actionAdapter.class 705B
AddInStorageTable_Frm_this_mouseAdapter.class 699B
UsersMan_Frm_jButton1_actionAdapter.class 693B
GoodsMan_Frm_jButton1_actionAdapter.class 693B
Main_Frm_jMenuHelpAbout_ActionAdapter.class 687B
共 159 条
- 1
- 2
资源评论
lysbemyself
- 粉丝: 0
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功