package com.njue.mis.view;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.JTextField;
import com.njue.mis.common.CommonFactory;
import com.njue.mis.common.ValidationManager;
import com.njue.mis.handler.ProviderServicesHandler;
import com.njue.mis.model.Provider;
public class ProviderFrame extends JInternalFrame
{
JTextField providerField;
JTextField ID_providerField;
JTextField provider_zipField;
JTextField provider_addressField;
JTextField provider_teleField;
JTextField provider_faxField;
JTextField provider_linkpField;
JTextField provider_linktField;
JTextField provider_mailField;
JTextField provider_bankField;
JTextField provider_bankIDField;
JTextField providerField1;
JTextField ID_providerField1;
JTextField provider_zipField1;
JTextField provider_addressField1;
JTextField provider_teleField1;
JTextField provider_faxField1;
JTextField provider_linkpField1;
JTextField provider_linktField1;
JTextField provider_mailField1;
JTextField provider_bankField1;
JTextField provider_bankIDField1;
public ProviderFrame()
{
super("供应商管理", true, true, false, true);
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
this.setBounds(screenSize.width / 12, screenSize.height / 20,
screenSize.width / 2, screenSize.height / 2);
this.getContentPane().add(createTabbedPane());
}
public JTabbedPane createTabbedPane()
{
/*
* 建立主框架
*/
JTabbedPane tabbedPane = new JTabbedPane();
/*
* 建立供应商添加信息页面
*/
providerField = new JTextField(30);
ID_providerField = new JTextField(11);
provider_zipField = new JTextField(11);
provider_addressField = new JTextField(30);
provider_teleField = new JTextField(11);
provider_faxField = new JTextField(11);
provider_linkpField = new JTextField(11);
provider_linktField = new JTextField(11);
provider_mailField = new JTextField(30);
provider_bankField = new JTextField(11);
provider_bankIDField = new JTextField(11);
JPanel addPanel = new JPanel();
JPanel addpanel1 = new JPanel();
JLabel providerLabel = new JLabel("供应商全称:");
addpanel1.add(providerLabel);
addpanel1.add(providerField);
JPanel addpanel2 = new JPanel();
JLabel ID_providerLabel = new JLabel("供应商编号:");
addpanel2.add(ID_providerLabel);
addpanel2.add(ID_providerField);
JLabel provider_zipLabel = new JLabel("邮政编码: ");
addpanel2.add(provider_zipLabel);
addpanel2.add(provider_zipField);
JPanel addpanel3 = new JPanel();
JLabel provider_addressLabel = new JLabel("供应商地址:");
addpanel3.add(provider_addressLabel);
addpanel3.add(provider_addressField);
JPanel addpanel4 = new JPanel();
JLabel provider_teleLabel = new JLabel("电话: ");
addpanel4.add(provider_teleLabel);
addpanel4.add(provider_teleField);
JLabel provider_faxLabel = new JLabel("传真: ");
addpanel4.add(provider_faxLabel);
addpanel4.add(provider_faxField);
JPanel addpanel5 = new JPanel();
JLabel provider_linkpLabel = new JLabel("联系人: ");
addpanel5.add(provider_linkpLabel);
addpanel5.add(provider_linkpField);
JLabel provider_linktLabel = new JLabel("联系电话: ");
addpanel5.add(provider_linktLabel);
addpanel5.add(provider_linktField);
JPanel addpanel6 = new JPanel();
JLabel provider_mailLabel = new JLabel("电子邮件: ");
addpanel6.add(provider_mailLabel);
addpanel6.add(provider_mailField);
JPanel addpanel7 = new JPanel();
JLabel provider_bankLabel = new JLabel("开户银行: ");
addpanel7.add(provider_bankLabel);
addpanel7.add(provider_bankField);
JLabel provider_bankIDLabel = new JLabel("银行账号: ");
addpanel7.add(provider_bankIDLabel);
addpanel7.add(provider_bankIDField);
JPanel addpanel8 = new JPanel();
JButton provider_saveButton = new JButton("保存");
provider_saveButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
if(ID_providerField.getText().trim().length()==0)
{
JOptionPane.showMessageDialog(null, "供应商编号不能为空!","警告",JOptionPane.WARNING_MESSAGE);
return;
}
if(providerField.getText().trim().length()==0)
{
JOptionPane.showMessageDialog(null, "供应商全称不能为空!","警告",JOptionPane.WARNING_MESSAGE);
return;
}
if(provider_zipField.getText().length()!=0)
{
if (!ValidationManager.validateZip(provider_zipField.getText().trim()))
{
JOptionPane.showMessageDialog(null, "邮政编码不合法!","警告",JOptionPane.WARNING_MESSAGE);
return;
}
}
if(provider_teleField.getText().length()!=0)
{
if (!ValidationManager.validatePhone(provider_teleField.getText().trim()))
{
JOptionPane.showMessageDialog(null, "电话号码不合法!","警告",JOptionPane.WARNING_MESSAGE);
return;
}
}
if (provider_mailField.getText().length() != 0)
{
if (!ValidationManager.validateEmail(provider_mailField
.getText().trim()))
{
JOptionPane.showMessageDialog(null, "电子邮件格式不合法!", "警告",
JOptionPane.WARNING_MESSAGE);
return;
}
}
ProviderServicesHandler handler = CommonFactory
.getProviderServices();
if (handler.isExited(ID_providerField.getText()))
{
JOptionPane.showMessageDialog(null, "供应商编号已存在!", "警告",
JOptionPane.WARNING_MESSAGE);
return;
}
else
if (handler
.addProvider(new Provider(ID_providerField
.getText(), providerField.getText(),
provider_zipField.getText(),
provider_addressField.getText(),
provider_teleField.getText(),
provider_faxField.getText(),
provider_linkpField.getText(),
provider_linktField.getText(),
provider_mailField.getText(),
provider_bankField.getText(),
provider_bankIDField.getText())))
{
JOptionPane.showMessageDialog(null, "供应商信息添加成功!", "消息",
JOptionPane.INFORMATION_MESSAGE);
setNull();
}
else
{
JOptionPane.showMessageDialog(null,
"供应商信息添加失败,请按要求输入数据!", "警告",
JOptionPane.WARNING_MESSAGE);
}
}
});
addpanel8.add(provider_saveButton);
JButton provider_reButton = new JButton("重置");
provider_reButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
setNull();
}
});
addpanel8.add(provider_reButton);
addPanel.add(addpanel1);
addPanel.add(addpanel2);
addPanel.add(addpanel3);
addPanel.add(addpanel4);
addPanel.add(addpanel5);
addPanel.add(addpanel6);
addPanel.add(addpanel7);
addPanel.add(addpanel8);
tabbedPane.addTab("供应商添加信息", addPanel);
/*
* 建立供应商删除和修改信息页面
*/
providerField1 = new JTextField(11);
providerField1.setEditable(false);
ID_providerField1 = new JTextField(11);
provider_zipField1 = new JTextField(11);
provider_zipField1.setEditable(false);
provider_addressField1 = new JTextField(30);
provider_addressField1.setEditable(false);
provider_teleField1 = new JTextField(11);
provider_teleField1.setEditable(false);
provider_faxField1 = new JTextField(11);
provider_faxField1.setEditable(false);
provider_linkpField1 = new JTextField(11);
provider_linkpField1.setEditable(false);
provider_linktField1 = new JTextField(11);
provider_linktField1.setEditable(false);
没有合适的资源?快使用搜索试试~ 我知道了~
java+mysql进销存管理系统实例源码
共246个文件
class:166个
java:68个
jpg:3个
需积分: 50 21 下载量 149 浏览量
2019-07-18
17:01:50
上传
评论 8
收藏 1.06MB RAR 举报
温馨提示
java+mySQL进销存管理系统包括源码与mysql数据库 详情见压缩文件 其中摘出一个mysql表: create database njue; use njue; /*MySQL数据库运行脚本*/ CREATE TABLE tb_customer( id char(10) primary key, customername varchar(50) NOT NULL, zip char(6) NULL, address varchar(50) NULL, telephone varchar(20) NULL, connectionperson varchar(20) NULL, phone varchar(20) NULL, bank varchar(50) NULL, account varchar(50) NULL, email varchar(50) NULL, fax varchar(20) NULL, available int not null ); 其他详情见压缩文件
资源推荐
资源详情
资源评论
收起资源包目录
java+mysql进销存管理系统实例源码 (246个子文件)
GoodsDAO.class 7KB
ProviderFrame.class 7KB
CustomerFrame.class 6KB
SqlManager.class 6KB
GoodsFrame.class 6KB
CustomerDAO.class 6KB
ProviderDAO.class 5KB
OperaterManagerFrame.class 5KB
OperatorDAO.class 5KB
OutportFrame.class 5KB
SalesBackFrame.class 5KB
InportFrame.class 5KB
SalesFrame.class 5KB
PortOutDAO.class 4KB
SalesBackDAO.class 4KB
PortInDAO.class 4KB
SalesInDAO.class 4KB
LoginFrame.class 4KB
Person.class 4KB
MainFrame.class 4KB
Port.class 4KB
Goods.class 4KB
Sales.class 4KB
SaleBackInforSearchPanel.class 4KB
InputInforSearchPanel.class 4KB
OutputInforserchPanel.class 4KB
SaleInforSearchPanel.class 4KB
SalesBackFrame$3.class 4KB
SalesFrame$3.class 4KB
CustomerInforSearchPanel.class 3KB
GoodsFrame$1.class 3KB
OutputInforserchPanel$1.class 3KB
SaleBackInforSearchPanel$1.class 3KB
InportFrame$3.class 3KB
InputInforSearchPanel$1.class 3KB
SaleInforSearchPanel$1.class 3KB
OutportFrame$3.class 3KB
PrivoderInforSearchPanel.class 3KB
GoodsInforSearchPanel.class 3KB
CommonFactory.class 3KB
StorehouseInfoPanel.class 3KB
OperaterManagerFrame$2.class 3KB
ProviderFrame$1.class 3KB
CustomerFrame$1.class 3KB
ChangePasswordFrame.class 3KB
PriceChangeFrame.class 3KB
MainAction.class 3KB
CustomerFrame$3.class 3KB
ProviderFrame$3.class 2KB
GoodsFrame$3.class 2KB
OperaterManagerFrame$4.class 2KB
PrivoderInforSearchPanel$1.class 2KB
CustomerInforSearchPanel$1.class 2KB
CustomerInforSearchPanel$MyTableModel.class 2KB
GoodsInforSearchPanel$1.class 2KB
SaleBackInforSearchPanel$MyTableModel.class 2KB
PrivoderInforSearchPanel$MyTableModel.class 2KB
PriceChangeFrame$2.class 2KB
OutputInforserchPanel$MyTableModel.class 2KB
ChangePasswordFrame$1.class 2KB
InputInforSearchPanel$MyTableModel.class 2KB
SaleInforSearchPanel$MyTableModel.class 2KB
GoodsInforSearchPanel$MyTableModel.class 2KB
ValidationManager.class 2KB
OperaterManagerFrame$6.class 2KB
SalesBackFrame$MyTableModel.class 2KB
OutportFrame$MyTableModel.class 2KB
InportFrame$MyTableModel.class 2KB
SalesFrame$MyTableModel.class 2KB
StorehouseInfoPanel$MyTableModel.class 2KB
StorehouseInfoPanel$1.class 2KB
GoodsServices.class 2KB
PriceChangeFrame$1.class 2KB
PersonDAO.class 2KB
OperatorServices.class 2KB
SalesBackServices.class 2KB
SalesInServices.class 2KB
PortOutServices.class 2KB
PortInServices.class 2KB
SaleBackInforSearchPanel$3.class 2KB
PrivoderInforSearchPanel$2.class 2KB
CustomerInforSearchPanel$2.class 2KB
StorageGoods.class 2KB
CustomerServices.class 2KB
ProviderServices.class 2KB
OutputInforserchPanel$3.class 2KB
GoodsInforSearchPanel$2.class 2KB
InputInforSearchPanel$3.class 2KB
SaleInforSearchPanel$3.class 2KB
ManagerDAO.class 2KB
ProviderFrame$4.class 2KB
CustomerFrame$4.class 2KB
OperaterManagerFrame$1.class 2KB
GoodsFrame$4.class 2KB
OperaterManagerFrame$7.class 2KB
OutportFrame$1.class 2KB
InportFrame$1.class 2KB
InportFrame$2.class 2KB
SalesFrame$2.class 2KB
SalesBackFrame$2.class 2KB
共 246 条
- 1
- 2
- 3
资源评论
Mhongker
- 粉丝: 9
- 资源: 21
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 【员工管理】30-030有了保密制度,还要保密协议吗.doc
- 【员工管理】50-010我国劳动法律法规中有关工时的规定有哪些.doc
- 【员工管理】50-030实行不定时工时制的员工,有加班加点一说吗.doc
- 【员工管理】50-060加班费纠纷,谁有举证责任.doc
- 【员工管理】50-450什么是劳动报酬.doc
- 【员工管理】50-500带薪产假的劳动报酬有哪些规定.doc
- 【员工管理】50-600什么情况下用人单位能合法扣减员工劳动报酬.doc
- 【员工管理】50-620未足额支付劳动者劳动报酬的法律后果有哪些.doc
- 【员工管理】50-620未足额支付劳动者劳动报酬的法律后果有哪些.doc
- 【员工管理】50-520病假期间的劳动报酬有哪些规定.doc
- 【员工管理】80-010申请劳动争议仲裁前必须经过协商和调解吗.doc
- 【员工管理】80-015 劳动争议双方协商达成的和解协议有法律效力吗.doc
- 【员工管理】80-020仲裁前调解有什么作用.doc
- 【员工管理】80-045劳动争议仲裁前的协商或者调解有期限吗 会影响申请仲裁的时效吗.doc
- 【员工管理】80-050调解协议履行后还可以仲裁吗.doc
- 基于PLC的智能农业温室大棚控制系统大棚电气控制组态 带解释的梯形图程序,接线图原理图图纸,io分配,组态画面
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功