:后台销售人员:录入商品界面构造商品:商品:商品数据库商品不存在商品已存在,存储商品录入商品创建新的商品信息存储商品返回录入结果返回商品录入信息
4.顾客办理会员顺序图
:顾客:前台客服人员办理会员:会员数据库增加会员<<构造新会员>>:会员返回值为会员对象输入顾客信息存储新创建的会员对象返回会员卡返回新会员对象
5.添加商品顺序图
:商品信息管理器<<构造新商品>>:商品数据库接口:商品提取商品信息(商品编号)返回商品信息修改商品信息录入商品信息(商品编号)商品信息已修改<<释放商品对象>>存储商品信息
6.修改商品信息顺序图
:商品信息管理器<<构造新商品>>:商品数据库接口:商品提取商品信息(商品编号)返回商品信息修改商品信息录入商品信息(商品编号)商品信息已修改<<释放商品对象>>存储商品信息
7.删除商品顺序图
:后台销售人员:商品管理接口:商品:商品数据库删除商品查找商品提取商品信息返回商品信息删除商品商品数据已删除商品数据已删除释放商品对象九.部分源代码
1.AddOrderForm.java package uml_gaokai; import java.awt.*; import javax.swing.*;
import com.borland.jbcl.layout.*; import com.borland.dx.sql.dataset.*; import java.awt.event.*; import java.sql.*;
public class AddOrderForm extends JDialog { private JPanel panel1 = new JPanel();
private BorderLayout borderLayout1 = new BorderLayout(); private JPanel jPanel1 = new JPanel();
private XYLayout xYLayout1 = new XYLayout(); private JLabel jLabel1 = new JLabel();
private JTextField jTextField1 = new JTextField(); private JLabel jLabel2 = new JLabel();
private JTextField jTextField2 = new JTextField(); private JLabel jLabel3 = new JLabel();
private JTextField jTextField3 = new JTextField(); private JLabel jLabel4 = new JLabel();
private JTextField jTextField4 = new JTextField(); private JLabel jLabel5 = new JLabel();
private JTextField jTextField5 = new JTextField(); private JButton jButton1 = new JButton();
private JButton jButton2 = new JButton();
private Database database1 = new Database();
public AddOrderForm(Frame frame, String title, boolean modal) { super(frame, title, modal); try {
jbInit(); pack(); }
catch(Exception ex) { ex.printStackTrace(); } }
public AddOrderForm() { this(null, \ }
private void jbInit() throws Exception { panel1.setLayout(borderLayout1); jPanel1.setLayout(xYLayout1);
jLabel1.setText(\商品名称\ jLabel2.setText(\订货数量\ jLabel3.setText(\订货厂商\ jLabel4.setText(\订货日期\ jLabel5.setText(\订货状态\ jButton1.setText(\确定\
jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { jButton1_actionPerformed(e); } });
jButton2.setText(\取消\
jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { jButton2_actionPerformed(e); } });
database1.setConnection(new
com.borland.dx.sql.dataset.ConnectionDescriptor(\\ getContentPane().add(panel1);
panel1.add(jPanel1, BorderLayout.NORTH);
jPanel1.add(jLabel1, new XYConstraints(11, 24, 81, 20));
jPanel1.add(jTextField1, new XYConstraints(93, 23, 133, 23));
jPanel1.add(jLabel2, new XYConstraints(11, 68, 78, 22));
jPanel1.add(jTextField2, new XYConstraints(93, 67, 133, 25)); jPanel1.add(jLabel3, new XYConstraints(11, 113, 79, 23)); jPanel1.add(jTextField3, new XYConstraints(93, 113, 132, 24)); jPanel1.add(jLabel4, new XYConstraints(11, 155, 66, 24));
jPanel1.add(jTextField4, new XYConstraints(93, 152, 134, 26)); jPanel1.add(jLabel5, new XYConstraints(8, 200, 76, 26));
jPanel1.add(jTextField5, new XYConstraints(93, 198, 136, 25)); jPanel1.add(jButton1, new XYConstraints(317, 140, 83, 24)); jPanel1.add(jButton2, new XYConstraints(316, 191, 84, 24)); }
//增加订货信息
void jButton1_actionPerformed(ActionEvent e) { try{
String BuyerGoodsName = jTextField1.getText() ; String BuyerGoodsNumber = jTextField2.getText() ; String BuyerManufacturer = jTextField3.getText() ; String BuyerDate = jTextField4.getText() ; String BuyerStatus = jTextField5.getText() ; Statement sql = database1.createStatement() ; sql.executeUpdate(\
[UML_CS].[dbo].[Buyer_TABLE](BuyerGoodsName,BuyerGoodsNumber,BuyerManufacturer,BuyerDate,BuyerStatus) VALUES
('\BuyerStatus+\ dispose() ; }
catch(SQLException www){ www.printStackTrace(); } }
void jButton2_actionPerformed(ActionEvent e) { dispose() ; } }
2. QueryOrderForm.java package uml_gaokai;
//download by http://www.codefans.net import java.awt.*; import javax.swing.*;
import com.borland.jbcl.layout.*; import java.awt.event.*;
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库销售管理系统案例(3)在线全文阅读。
相关推荐: