进货管理系统源程序清单内容摘要:

menu1=new Menu(系统 )。 menu2=new Menu(货物类型管理 )。 menu3=new Menu(货物管理 )。 menu4=new Menu(进货管理 )。 menu6=new Menu(供货商管理 )。 menu5=new Menu(打印 )。 item1_1=new MenuItem(用户管理 )。 item1_2=new MenuItem(退出 )。 item2_1=new MenuItem(添加货物类型 )。 item2_2=new MenuItem(修改货物类型 )。 item2_3=new MenuItem(删除货物类型 )。 item3_1=new MenuItem(添加货物 )。 item3_2=new MenuItem(修改货物信息 )。 item3_3=new MenuItem(删除货物信息 )。 item4_1=new MenuItem(登记进货信息 )。 item4_3=new MenuItem(删除进货信息 )。 item5_1=new MenuItem(打印信息 )。 item6_1=new MenuItem(添加供货商信息 )。 item6_2=new MenuItem(修改供货商信息 )。 item6_3=new MenuItem(删除供货 商信息 )。 (new MenuShortcut())。 //为菜单项添加快捷键 (new MenuShortcut())。 (new MenuShortcut())。 (new MenuShortcut())。 (new MenuShortcut())。 (new MenuShortcut())。 (new MenuShortcut())。 (new MenuShortcut())。 (new MenuShortcut())。 (new MenuShortcut())。 (new MenuShortcut())。 (new MenuShortcut())。 (new MenuShortcut())。 (new MenuShortcut())。 软件工程数据库课程 设计 —— 源程序清单 第 11 页 (item1_1)。 (item1_2)。 (item2_1)。 (item2_2)。 (item2_3)。 (item3_1)。 (item3_2)。 (item3_3)。 (item4_1)。 (item4_3)。 (item5_1)。 (item6_1)。 (item6_2)。 (item6_3)。 (menu1)。 (menu2)。 (menu3)。 (menu4)。 (menu6)。 (menu5)。 setMenuBar(menubar)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 a1=new Object[30][3]。 Connection con。 Statement sql。 ResultSet rs。 try{ ()。 }catch(ClassNotFoundException e1){ (e1)。 } try{ 软件工程数据库课程 设计 —— 源程序清单 第 12 页 con=(jdbc:odbc:sun,)。 sql=()。 rs=(SELECT * FROM 商品类型信息表 )。 while(()){ a1[i][0]=(1)。 a1[i][1]=(2)。 a1[i][2]=(3)。 i++。 } ()。 }catch(SQLException e1){ (e1)。 } a2=new Object[30][7]。 Connection con1。 Statement sql1。 ResultSet rs1。 try{ ()。 }catch(ClassNotFoundException e1){ (e1)。 } try{ con1=(jdbc:odbc:sun,)。 sql1=()。 rs1=(SELECT * FROM 商品基本信息表 )。 while(()){ a2[j][0]=(1)。 //将商品基本信息表中的第 1列赋值给 a2数组的第 1列 a2[j][1]=(2)。 a2[j][2]=(3)。 a2[j][3]=(4)。 a2[j][4]=(5)。 a2[j][5]=(6)。 a2[j][6]=(7)。 j++。 } ()。 }catch(SQLException e1){ (e1)。 } a3=new Object[30][9]。 Connection con2。 Statement sql2。 ResultSet rs2。 软件工程数据库课程 设计 —— 源程序清单 第 13 页 try{ ()。 }catch(ClassNotFoundException e1){ (e1)。 } try{ con2=(jdbc:odbc:sun,)。 sql2=()。 rs2=(SELECT * FROM 进货信息表 )。 while(()){ a3[k][0]=(1)。 a3[k][1]=(2)。 a3[k][2]=(3)。 a3[k][3]=(4)。 a3[k][4]=(5)。 a3[k][5]=(6)。 a3[k][6]=(7)。 a3[k][7]=(8)。 a3[k][8]=(9)。 k++。 } ()。 }catch(SQLException e1){ (e1)。 } a4=new Object[30][5]。 Connection con3。 Statement sql3。 ResultSet rs3。 try{ ()。 }catch(ClassNotFoundException e1){ (e1)。 } try{ con3=(jdbc:odbc:sun,)。 sql3=()。 rs3=(SELECT * FROM 供货商信息表 )。 while(()){ a4[m][0]=(1)。 a4[m][1]=(2)。 a4[m][2]=(3)。 a4[m][3]=(4)。 a4[m][4]=(5)。 m++。 软件工程数据库课程 设计 —— 源程序清单 第 14 页 } ()。 }catch(SQLException e1){ (e1)。 } table1=new JTable(a1,name1)。 //创建一个表,表中的列名为 name1中的数组元素,内容为 a1数组的内容,即与数据库中货物类型信息表对应 table2=new JTable(a2,name2)。 table3=new JTable(a3,name3)。 table4=new JTable(a4,name4)。 mycard=new CardLayout()。 pCenter=new Panel()。 (mycard)。 buttonFirst=new Button(first)。 buttonLast=new Button(last)。 buttonNext=new Button(next)。 (1,new JScrollPane(table1))。 (2,new JScrollPane(table2))。 (3,new JScrollPane(table3))。 (4,new JScrollPane(table4))。 (this)。 (this)。 (this)。 pNorth=new Panel()。 (new Label(欢迎进入进货管理系统 ))。 pSouth=new Panel()。 (buttonFirst)。 (buttonNext)。 (buttonLast)。 add(pNorth,)。 add(pCenter,)。 add(pSouth,)。 setVisible(true)。 addWindowListener(new WindowAdapter(){ public void windowClosing(WindowEvent e){ (0)。 } })。 } public void actionPerformed(ActionEvent e){ if(()==buttonFirst){ (pCenter)。 } else if(()==buttonNext){ 软件工程数据库课程 设计 —— 源程序清单 第 15 页 (pCenter)。 } else if(()==buttonLast){ (pCenter)。 } else if(()==item1_1){ YHGL yhgl=new YHGL(用户管理 )。 } else if(()==item1_2){ (0)。 } else if(()==item2_1){ HWLX hwlx=new HWLX(货物类型信息 )。 } else if(()==item2_2){ HWLX1 hwlx1=new HWLX1(货物类型信息 )。 } else if(()==item2_3){ HWLX2 hwlx2=new HWLX2(货物类型信息 )。 } else if(()==item3_1){ HW hw=new HW(货物信息 )。 } else if(()==item3_2){ HW1 hw1=new HW1(货物信息 )。 } else if(()==item3_3){ HW2 hw2=new HW2(货物信 息 )。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。