package src;
//Download by http://www.codefans.net
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
import java.text.SimpleDateFormat;
import java.util.Date;
//import java.util.Vector;
public class My_MainFrame {
private final static javax.swing.ImageIcon icon = new javax.swing.ImageIcon("res/logo1.jpg");
private JFrame frame = new javax.swing.JFrame();
private JMenuBar menuBar = null;
private JToolBar toolBar = null;
private JSplitPane splitPane = null;
private JScrollPane scrollPane = null;
private JPanel panel = null;
private JTabbedPane tabbedPane = new javax.swing.JTabbedPane();
private JButton stuff_in = null;//原料进入
private JButton product_in = null;//产品进入
private JButton stuff_quit = null;//原料退料
private JButton stuff_stock = null;//原料库存
private JButton product_stock = null;//产品库存
private JButton yield_draw = null;//生产领料
//private JButton yield_consume = null;//生产发料
private JButton yield_off = null;//生产退料
private JButton yield_scrap = null;//生产废料
//private JButton old_record = null;//仓库记录
private JButton product_out = null;//产品输出
private JButton product_return = null;//产品返修
private JButton product_cancle = null;//产品退货
private JButton handle_record = null;//操作记录
private JButton flotsam_record = null;//废料记录
private JButton product_out_record = null;//出货记录
private JButton stuff_old_record = null;//原料记录
private JButton product_old_record = null;//成品记录
private JButton help = null;//帮助
private JButton about = null;//关于
private JButton exit_system = null;//退出系统
private String sql = null;
public My_MainFrame() {
// TODO 自动生成构造函数存根
}
public My_MainFrame(String name){
try{
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
}catch(Exception exe){System.err.print(exe.getMessage());}
java.awt.Toolkit tool = frame.getToolkit();
Image image = tool.getImage("res/logo.jpg");
java.awt.Dimension dimn = tool.getScreenSize();
String title = "仓库管理系统--"+name;
frame.setTitle(title);
frame.setIconImage(image);
frame.setFocusable(true);
frame.setLayout(new java.awt.BorderLayout());
frame.setJMenuBar(createJMenuBar());
frame.add(createJToolBar(),"North");
frame.add(createSplitPane(),"Center");
//frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.addWindowListener(new WindowListener(){
public void windowActivated(WindowEvent e){}
//因对窗口调用dispose()而将其关闭时调用
public void windowClosed(WindowEvent e){}
//用户试图从窗口的系统菜单中关闭窗口时调用
public void windowClosing(WindowEvent e){
String name = frame.getTitle().trim().substring(8);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = new Date(System.currentTimeMillis());
String day = sdf.format(date);
String s ="'"+day+"','"+name+"','"+"退出"+"'";
String sql = "insert into handle_record values("+s+")";
USeDB.UpdateDB(sql);
frame.dispose();
System.exit(0);
}
//当窗口不再是活动窗口时调用
public void windowDeactivated(WindowEvent e){}
//窗口从最小化状态变为正常状态时调用
public void windowDeiconified(WindowEvent e){}
//窗口从正常状态变为最小状态时调用
public void windowIconified(WindowEvent e){}
//窗口首次变为可见时调用
public void windowOpened(WindowEvent e){}
});
//frame.setSize(dimn);
frame.setPreferredSize(dimn);
frame.setBackground(java.awt.Color.pink);
frame.pack();
frame.validate();
frame.setVisible(true);
}
private JMenu createSystem_Manage_Menu(){
javax.swing.JMenu systemMenu = new javax.swing.JMenu("系统管理");
javax.swing.JMenuItem logoin = new javax.swing.JMenuItem("注 册");
logoin.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
new AddUser();
}
});
javax.swing.JMenuItem logoout = new javax.swing.JMenuItem("删除用户");
logoout.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
String jp = new JOptionPane().showInputDialog(frame,"请输入要删除的用户名!","输入用户名",JOptionPane.YES_NO_CANCEL_OPTION).trim();
if(USeDB.delUser(jp)){
JOptionPane.showConfirmDialog(null, "用户删除成功!");
}
JOptionPane.showConfirmDialog(null, "用户删除失败!");
}
});
javax.swing.JMenuItem datatidy = new javax.swing.JMenuItem("数据整理");
logoin.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
}
});
systemMenu.add(logoin);
systemMenu.add(logoout);
systemMenu.add(datatidy);
return systemMenu;
}
private JMenu createStuff_Manage_Menu()
{
javax.swing.JMenu stuffMenu = new javax.swing.JMenu("原料管理");
javax.swing.JMenuItem stuff_in = new javax.swing.JMenuItem("原料进入");
stuff_in.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e1){
AddStuffIn("原料进入");
}
});
javax.swing.JMenuItem stuff_quit = new javax.swing.JMenuItem("原料退还");
stuff_quit.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e2){
AddStuffQuit("原料退还");
}
});
javax.swing.JMenuItem stuff_stock = new javax.swing.JMenuItem("原料库存");
stuff_stock.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e3){
String tit[] = {"原料编号","原料名","生产商","收货员","检验员","单位","数量","规格","颜色","存放处","时间","备注"};
String sql = "select * from stuff_in";
AddTable("原料库存",tit,sql);
}
});
javax.swing.JMenuItem yield_draw = new javax.swing.JMenuItem("生产开单");
yield_draw.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e4){
AddYieldDraw("生产开单");
}
});
javax.swing.JMenuItem yield_off = new javax.swing.JMenuItem("生产退料");
yield_off.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e4){
AddStuffIn("生产退料");
}
});
javax.swing.JMenuItem yield_scrap = new javax.swing.JMenuItem("生产废料");
yield_scrap.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e5){
AddYieldScrap("生产废料");
}
});
stuffMenu.add(stuff_in);
stuffMenu.add(stuff_quit);
stuffMenu.addSeparator();
stuffMenu.add(stuff_stock);
stuffMenu.add(yield_draw);
stuffMenu.addSeparator();
stuffMenu.add(yield_off);
stuffMenu.add(yield_scrap);
return stuffMenu;
}
private JMenu createProduct_Manage_Menu(){
javax.swing.JMenu productMenu = new javax.swing.JMenu("成品管理");
javax.swing.JMenuItem product_in = new javax.swing.JMenuItem("成品进入");
product_in.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e6){
AddProductIn("成品进入");
}
});
javax.swing.JMenuItem product_stock = new javax.swing.JMenuItem("成品库存");
product_stock.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e7){
String tit[] ={"成品编号","成品名","客户","成品规格","单位","数量","生产单位","入库时间","备注"};
/*Vector ve = new Vector();
ve.add("成品编号");
ve.add("成品名");
ve.add("客户");
ve.add("成品规格");
ve.add("单位");
ve.add("数量");
ve.add("生产单位");
ve.add("入库时间");
ve.add("备注");*/
String sql = "select * from product_in";
AddTable("成品库存",tit,sql);
}
});
javax.swing.JMenuItem product_out = new javax.swing.JMenuItem("成品发货");
product_out.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e6){
AddProductOut("成品发货");
}
});
javax.swing.JMenuItem product_return = new javax.swing.JMenuItem("成品返修");
product_return.addActionListener(new ActionListener(){
public void actionPerformed(Actio
没有合适的资源?快使用搜索试试~ 我知道了~
基于java的开发源码-仓库管理系统,Access数据库.zip
共260个文件
class:193个
jpg:43个
java:16个
0 下载量 25 浏览量
2024-03-25
22:45:15
上传
评论
收藏 8.71MB ZIP 举报
温馨提示
基于java的开发源码-仓库管理系统,Access数据库.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于java的开发源码-仓库管理系统,Access数据库.zip (260个子文件)
Snapshot.1 229B
Logfile.1 8B
My_MainFrame.class 17KB
createUserProductOutInterFace.class 13KB
createUserStuffInterFace.class 12KB
createUserProductInterFace.class 11KB
createUserYieldScrapInterFace.class 11KB
createUserYieldDrawInterFace.class 11KB
createStuffQuitInterFace.class 11KB
createUserScrapInterFace.class 6KB
Logo.class 5KB
AddUser.class 5KB
DBUtil.class 4KB
createUserTable.class 4KB
USeDB.class 4KB
UserHelp.class 3KB
UserAbout.class 3KB
AddUser$5.class 3KB
AddUser$6.class 3KB
Logo$4.class 2KB
createUserScrapInterFace$6.class 2KB
createUserScrapInterFace$5.class 2KB
My_MainFrame$1.class 2KB
Logo$5.class 2KB
My_MainFrame$62.class 2KB
My_MainFrame$61.class 2KB
My_MainFrame$41.class 2KB
createUserProductOutInterFace$8.class 2KB
createUserProductOutInterFace$6.class 2KB
createUserYieldScrapInterFace$11.class 2KB
createUserProductInterFace$8.class 2KB
createUserYieldDrawInterFace$11.class 2KB
createUserYieldScrapInterFace$7.class 2KB
createUserProductInterFace$6.class 2KB
createUserYieldDrawInterFace$7.class 2KB
createStuffQuitInterFace$11.class 2KB
createUserStuffInterFace$11.class 2KB
createUserScrapInterFace$3.class 2KB
AddUser$1.class 2KB
createUserStuffInterFace$7.class 2KB
createStuffQuitInterFace$7.class 2KB
My_MainFrame$24.class 1KB
My_MainFrame$23.class 1KB
My_MainFrame$42.class 1KB
UserAbout$1.class 1KB
UserHelp$1.class 1KB
Logo$1.class 1KB
createUserTable$1.class 1KB
AddUser$4.class 1KB
My_MainFrame$3.class 1KB
createUserYieldScrapInterFace$10.class 1KB
My_MainFrame$19.class 1KB
My_MainFrame$57.class 1KB
createUserYieldScrapInterFace$9.class 1KB
createUserProductOutInterFace$1.class 1KB
createUserYieldScrapInterFace$5.class 1KB
createUserProductOutInterFace$5.class 1KB
createUserYieldScrapInterFace$1.class 1KB
createUserYieldScrapInterFace$8.class 1KB
createUserProductOutInterFace$4.class 1KB
createUserYieldScrapInterFace$3.class 1KB
createUserProductOutInterFace$2.class 1KB
createUserYieldScrapInterFace$2.class 1KB
createUserProductOutInterFace$3.class 1KB
createUserProductOutInterFace$7.class 1KB
createUserYieldScrapInterFace$4.class 1KB
createUserYieldScrapInterFace$6.class 1KB
createUserYieldDrawInterFace$10.class 1KB
My_MainFrame$18.class 1KB
My_MainFrame$56.class 1KB
My_MainFrame$38.class 1KB
createUserYieldDrawInterFace$9.class 1KB
createUserYieldDrawInterFace$5.class 1KB
createUserYieldDrawInterFace$1.class 1KB
createUserYieldDrawInterFace$2.class 1KB
createUserYieldDrawInterFace$3.class 1KB
createUserYieldDrawInterFace$6.class 1KB
createUserYieldDrawInterFace$4.class 1KB
createUserYieldDrawInterFace$8.class 1KB
createUserProductInterFace$1.class 1KB
createUserScrapInterFace$1.class 1KB
createUserProductInterFace$3.class 1KB
createUserScrapInterFace$2.class 1KB
createUserProductInterFace$5.class 1KB
createUserProductInterFace$2.class 1KB
createUserProductInterFace$7.class 1KB
createUserProductInterFace$4.class 1KB
My_MainFrame$58.class 1KB
My_MainFrame$20.class 1KB
createStuffQuitInterFace$10.class 1KB
createUserStuffInterFace$10.class 1KB
createUserStuffInterFace$9.class 1KB
createStuffQuitInterFace$9.class 1KB
createStuffQuitInterFace$6.class 1KB
createStuffQuitInterFace$8.class 1KB
createStuffQuitInterFace$4.class 1KB
createStuffQuitInterFace$3.class 1KB
createUserStuffInterFace$6.class 1KB
createUserStuffInterFace$8.class 1KB
createUserStuffInterFace$2.class 1KB
共 260 条
- 1
- 2
- 3
资源评论
助力毕业
- 粉丝: 2181
- 资源: 5141
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功