数据库课程设计商品销售管理系统.docx

上传人:王** 文档编号:942005 上传时间:2024-03-01 格式:DOCX 页数:48 大小:152.72KB
下载 相关 举报
数据库课程设计商品销售管理系统.docx_第1页
第1页 / 共48页
数据库课程设计商品销售管理系统.docx_第2页
第2页 / 共48页
数据库课程设计商品销售管理系统.docx_第3页
第3页 / 共48页
数据库课程设计商品销售管理系统.docx_第4页
第4页 / 共48页
数据库课程设计商品销售管理系统.docx_第5页
第5页 / 共48页
数据库课程设计商品销售管理系统.docx_第6页
第6页 / 共48页
数据库课程设计商品销售管理系统.docx_第7页
第7页 / 共48页
数据库课程设计商品销售管理系统.docx_第8页
第8页 / 共48页
数据库课程设计商品销售管理系统.docx_第9页
第9页 / 共48页
数据库课程设计商品销售管理系统.docx_第10页
第10页 / 共48页
亲,该文档总共48页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《数据库课程设计商品销售管理系统.docx》由会员分享,可在线阅读,更多相关《数据库课程设计商品销售管理系统.docx(48页珍藏版)》请在优知文库上搜索。

1、数据库课程设计商品销售管理系统importjava.awt.*;importjavax.swing.*;importjava.sql.*;importjavax.swing.table.AbstractTabIeModel;publicclassLoginBackPanelextendsJFrameimplementsActionListenerprivatestaticfinallongSeriaIVersionUID=IL;JButtonbutton1,button2;JTextFieldFl;Choicec;Containerct=getContentPane();publicLogin

2、BackPaneKStringstr)super(str);setBak();JPanelpanel=newJPanel();panel.setpaque(false);ct.add(panel);panel.setLayout(newFIOWLayoUt(FIoWLayOUt.CENTER,60,20);c=newChoice();c.add(Boss);c.add(Salesman);JLabelJl=newJLabeI(验证身份:);JLabelJ2=newJLabe1(登录密码巧;Fl=newJTextField(9);button1=newJBUItOn(登录);button2=ne

3、wJBUtlon(退出);button1.addActionListener(this);button2.addActionListener(this);panel.add(JI);panel.add(c);panel.add(J2);panel.add(Fl);panel.add(buttonl);panel.add(button2);add(panel);)publicvoidsetBak()设置背景方法(JPanel)this.getContentPane().setOpaque(false);Imageiconimg=newImagelCOn(e:数据库课程设计六月物语Jpg);JLa

4、belbackground=newJLabel(img);this.getLayeredPane().add(background,newInteger(Integer.MIN-VALUE);background.setBounds(0,0,img.getIconWidth(),img.getIconHeight();publicvoidactionPerformed(ActionEvente)if(e.getSource()=button1)Bossif(c.getSelectedItem().equals(H)&F1.getText().equals(,boss)this.dispose(

5、);BSbs=newBS(管理员界面);bs.setSize(500,250);bs.setLocation(450,250);bs.setVisible(true);)Salesmanif(c.getSelectedItem().equals(H)&F1.getText().equals(salesman)(this.dispose();SLSI=newSLf销售员界面”);sl.setSize(500,250);sl.setLocation(450,250);sl.setVisible(true);)1if(e.getSource()=button2)System.exit(O);publ

6、icstaticvoidmain(Stringargs)1.oginBackPanellgp=newLOginBaCkPane1(管理系统登录);lgp.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);lgp.setSize(300,200);lgp.setLocation(550,250);lgp.setVisible(true);classBSextendsJFrameimplementsActionListenerJButtonB1,B2,B3,B4,B5,B6,B7;Containerct=getContentPane();publicBS

7、(Stringstr)super(str);setBak();JPanelJP=newJPanel();JP.setOpaque(false);ct.add(JP);JP.setLayout(newFlOWLayoUt(FlOWLayoUt.CENTER,30,50);Bl=newJBUtton(销售情况);B2=newJBUtlon(“客户退货”);B3=newJBUttonC销售收款”);B4=newJBUtKm(“客户信息”);B5=newJButlon(员工管理”);B6=newJBUuon(进货信息);B7=newJBUuOn(“更换角色”);B1.addActionListener

8、(this);B2.addActionListener(this);B3.addActionListener(this);B4.addActionListener(this);B5.addActionListener(this);B6.addActionListener(this);B7.addActionListener(this);JRadd(Bl);JRadd(B2);JP.add(B3);JP.add(B4);JP.add(B5);JP.add(B6);JP.add(B7);add(JP);publicvoidsetBak()(JPanel)this.getContentPane().

9、setOpaque(false);Imageiconimg=newImageICon(e:数据库课程设计六月物语1.jpg);JLabelbackground=newJLabel(img);this.getLayeredPane().add(background,newInteger(Integer.MIN-VALUE);background.setBounds(0,O,img.getlconWidth(),img.getIconHeight();(publicvoidactionPerformed(ActionEvente)if(e.getSource()=B1)this.dispose()

10、;CXFPXXcxfpxx=newCXFPXX(日常销售一发票情况】);cxfpxx.setSize(700,300);cxfpxx.setLocation(350,250);cxfpxx.setVisible(true);)if(e.getSource()=B2)this.dispose();XSTHXXXSthXX=newXSTHXX(日常销售一【销售退货】);xsthxx.setSize(700,300);xsthxx.setLocation(350,250);xsthxx.setVisible(te);)if(e.getSource()=B3)this.dispose();XSXXCX

11、XSXXCX=newXSXXCX(日常销售一【销售收款】);xsxxcx.setSize(700,300);xsxxcx.setLocation(350,250);xsxxcx.setVisible(true);)if(e.getSource()=B4)this.dispose();HYXXCXhyXXCX=newHYXXCX(基本信息管理一【会员信息】);hyxxcx.setSize(700,300);hyxxcx.setLocation(350,250);hyxxcx.setVisible(true);)if(e.getSource()=B5)this.dispose();YGGLyggl

12、=newYGGLf员工管理一【员工信息】);yggl.setSize(500,200);yggl.setLocation(450,250);yggl.setVisible(true);if(e.getSource()=B6)this.dispose();JHXXjhXX=newJHXX(商品更新一【进货信息】);jhxx.setSize(300,l50);jhxx.setLocation(500,250);jhxx.setVisible(true);)if(e.getSource()=B7)this.dispose();1.oginBackPanelxt=newLOginBaCkPane1(管

13、理系统登录);xt.setSize(3OO,2OO);xt.setLocation(550,250);xt.setVisible(true);classBG2extendsAbstractTableModeIStringrq,ph,mc,bh,dj,sl,je;finalStringCOlumnNamesR”开票日期”,“销售票号”,嘀品名称,”商品编号”J商品单价/元/销售数量/个”,”销售金额/元”;Objectdata=new0bject1007;publicBG2()intm=0;StringIIrI=jdbc:microsoft:SqISerVer:IOCalhoSt:1433;Da

14、IabaSeName=课程设计”;Connectioncon;Stringsql;Statementstmt;try(Class.forName(,com.microsoft.jdbc.sqlserver.SQLServerDriver);catch(java.lang.ClassNotFoundExceptione)trycon=DriverManager.getConnection(url,sa,l23456,);stmt=con.createStatement();sql=,SELECT*FROM销售发票;ResultSetrs=stmt.executeQuery(sql);while(rs.next()rq=rs.getString(l);ph=rs.getString(2);mc=rs.getString(3);bh=rs.getString(4);dj=rs.getString(5);sl=rs.getString(6);je=rs.getString(7);datam0=rq;dataml=ph;datam2=mc;datam3=bh;datam4=dj;datam5=sl;datam+6=je;)stmt.close();con.close();)catch(SQLException

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 管理/人力资源 > 销售管理

copyright@ 2008-2023 yzwku网站版权所有

经营许可证编号:宁ICP备2022001189号-2

本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!