资源简介

JAVA仓库管理系统源代码 含SQL数据库,可以很容易地自行修改内容。非常适合中小企业网管使用!

资源截图

代码片段和文件信息

package amountoperation;
import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.*;
import javax.swing.table.*;
import java.awt.event.*;
import java.sql.ResultSet;
import db.DbSql;

public class AmountOperation extends JInternalframe {
    XYLayout xYLayout1 = new XYLayout();
    JLabel jLabel1 = new JLabel();
    JButton jButton1 = new JButton();
    JScrollPane jScrollPane1 = new JScrollPane();//带滚动条的面板
    JTable jTable1 = new JTable();
    JButton jButton2 = new JButton();
    JButton jButton4 = new JButton();
    String colhead[] = {“物品编号“ “物品名称“ “单位“ “数量“ “进仓日期“};
   DefaultTableModel dtm = new DefaultTableModel(colhead 0);//表示初始化0条空记录
    JComboBox jComboBox1 = new JComboBox();
     String sql = “select pro_name from  productinfo“;

    public AmountOperation() {
        try {
            jbInit();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }

    //进入时查询
    public void selectAll() throws Exception {
        try {
            ResultSet rs;
            DbSql dbo = new DbSql();
            String sq1 = “select p.pro_idp.pro_namep.unitp.amountc.comedate“
                         +“ from productinfo as p comedepot as c where p.pro_id = c.pro_id“;
            dbo.open();
            rs = dbo.selects(sq1);
            while (rs.next()) {
                String id = rs.getString(1);
                String name = rs.getString(2);
                String unit = rs.getString(3);
                String amount = rs.getString(4);
                String date = rs.getString(5);
                String val[] = {id name unit amount date}; //向表格添加值
                dtm.addRow(val);
            }
            dbo.close();

        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    private void jbInit() throws Exception {
        getContentPane().setLayout(xYLayout1);
         this.selectAll();   //把进入时查询的数据添加到表格
        xYLayout1.setWidth(507);
        xYLayout1.setHeight(280);
        jLabel1.setText(“产品名称“);
        jButton4.addActionListener(new AmountOperation_jButton4_actionAdapter(this));
        jButton2.addActionListener(new AmountOperation_jButton2_actionAdapter(this));
        jButton1.addActionListener(new AmountOperation_jButton1_actionAdapter(this));
        jButton4.setText(“退出“);
        jButton2.setText(“增加数量“);
        jScrollPane1.setBorder(BorderFactory.createLoweredBevelBorder());//在面板上添加工具条
        jButton1.setText(“查询“);
        jScrollPane1.getViewport().add(jTable1);//把表格添加带滚动条的面板
        this.getContentPane().add(jLabel1 new XYConstraints(4 7 68 25));
        jTable1.setModel(dtm);//把摸板添加进表格
        this.getContentPane().add(jScrollPane1
                                  new XYConstraints(7 40 492 231));
        this.getContentPane().add(jComboBox1 new XYConstraints(57 7 120 25));
        this.getContentPane().add(jButton1 new XYConstraints(2

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      12991  2009-06-20 15:56  depository\0.JPG

     文件      51658  2009-06-24 09:15  depository\00.jpg

     文件      48783  2009-06-24 15:52  depository\01.jpg

     文件      39494  2009-06-24 17:08  depository\02.jpg

     文件      20337  2009-06-25 10:29  depository\1.JPG

     文件      20257  2009-06-25 09:47  depository\2.JPG

     文件      20343  2009-06-25 09:48  depository\3.JPG

     文件      20014  2009-06-25 09:50  depository\4.JPG

     文件      20319  2009-06-25 09:51  depository\5.JPG

     文件      20678  2009-06-25 09:58  depository\6.jpg

     文件      21042  2009-06-25 09:56  depository\7.jpg

     文件      20254  2009-06-25 09:52  depository\8.jpg

     文件       9691  2009-07-18 19:47  depository\9.jpg

     文件       8264  2009-07-18 19:21  depository\bak\amountoperation\AmountOperation.java~12~

     文件       8272  2009-07-18 19:54  depository\bak\amountoperation\AmountOperation.java~13~

     文件       8272  2009-07-18 19:55  depository\bak\amountoperation\AmountOperation.java~14~

     文件       8272  2009-07-18 19:55  depository\bak\amountoperation\AmountOperation.java~15~

     文件       8272  2009-07-18 19:56  depository\bak\amountoperation\AmountOperation.java~16~

     文件       8354  2009-07-18 20:48  depository\bak\amountoperation\AmountOperation.java~17~

     文件       8469  2009-07-18 20:55  depository\bak\amountoperation\AmountOperation.java~18~

     文件       7878  2009-07-19 16:05  depository\bak\amountoperation\AmountOperation.java~19~

     文件       7764  2009-07-19 16:07  depository\bak\amountoperation\AmountOperation.java~20~

     文件       7772  2009-07-19 16:07  depository\bak\amountoperation\AmountOperation.java~21~

     文件       5349  2009-06-23 14:17  depository\bak\amountoperation\frameAdd.java~1~

     文件       5347  2009-07-16 16:10  depository\bak\amountoperation\frameAdd.java~2~

     文件       5347  2009-07-16 16:11  depository\bak\amountoperation\frameAdd.java~3~

     文件       5349  2009-07-18 20:38  depository\bak\amountoperation\frameAdd.java~4~

     文件       6848  2009-06-25 20:36  depository\bak\clientserver\ClientInquire.java~1~

     文件       6846  2009-06-26 14:41  depository\bak\clientserver\ClientInquire.java~2~

     文件       6477  2009-06-27 21:10  depository\bak\clientserver\ClientInquire.java~3~

............此处省略174个文件信息

评论

共有 条评论