版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
java职工信息管理系统源代码(精)源代码packageleon2;importjava.ql.某;publicclaemployee{opublicStringnum;publicStringname;publicStringe某;publicStringage;publicStringedu;publicStringla;publicStringadd;publicStringtel;publicvoidinit(String某1,String某2,String某3,String某4,String某5,String某6,String某7,String某8麻口二某1加山©二某2;e某二某3河©=某4似口=某5;必=某6;add/7;tel=某8;}口publicvoidload(Stringf{try{Cla.forName(\;Stringurl=\;StringuerName=\;Stringpaword=\;Connectionconn=DriverManager.getConnection(url,uerName,paword;if(conn!=nullSytem.out.println(、已成功地与SQLServer2005数据库建立连接!\;Statementtmt=conn.createStatement(;tmt.e某ecuteUpdate(f;tmt.cloe(;}catch(E某ceptione{口e.printStackTrace(;}}}packageleon2;importjava.awt.某;importjava.awt.event.某;importjava.ql.某;口publicclaleon2_1{taticFramef;CardLayoutmyCard;Panelp1;Panelp2;Panelp3;Panelp4;Panelp5;Panelp6;Panelp7;Panelp8;publictaticvoidmain(String[]arg{leon2_1tet=newleon2_1(;tet.go1(;tet.go2(;tet.go3(;tet.go4(;tet.go5(;tet.go6(;tet.go7(;tet.go8(;}publicvoidgo1({f二newFrame(\呵呵!!!\myCard=newCardLayout(;f.etLayout(myCard;p1=newPanel(;Buttonb1,b2,b3;LabelL1;Te某tFieldte1;finalTe某tFieldte2;口p1.etLayout(newGridBagLayout(;GridBagContraintc=newGridBagContraint(;Panelp1_1=newPanel(;p1_1.etLayout(newGridBagLayout(;GridBagContraint某=newGridBagContraint(;b1=newButton(\请输入用户名\b1.etBackground(Color.CYAN;某.inet=newInet(50,50,50,50;某.grid某=0;某.gridy=0;某.gridwidth=1;某.gridheight=1;p1_1.add(b1,某;口b2=newButton(、请输入密码\b2.etBackground(Color.CYAN;某.grid某=0;某.gridy=5;某.gridwidth=1;某.gridheight=1;p1_1.add(b2,某;te1=newTe某tField(15;c.inet=newInet(40,0,40,0;某.grid某=5;某.gridy=0;某.gridwidth=1;某.gridheight=1;p1_1.add(te1,某;te2=newTe某tField(15;某.grid某=5;某.gridy=5;某.gridwidth=1;某.gridheight=1;p1_1.add(te2,某;口L1二newLabel(\欢迎进入职工管理系统某某某某某某某某某某某某某某\L1.etBackground(Color.CYAN;c.grid某=0;c.gridy=0;c.gridwidth=0;c.gridheight=1;p1.add(L1,c;b3=newButton(、登录\b3.etBackground(Color.CYAN;c.grid某=0;c.gridy=10;c.gridwidth=5;c.gridheight=5;p1.add(b3,c;c.grid某=0;c.gridy=20;c.gridwidth=5;c.gridheight=5;p1.add(p1_1,c;p1.etBackground(Color.green;f.add(p1,\myCard.how(f,\f.etSize(600,600;f.etViible(true;f.addWindowLitener(newWindowAdapter({publicvoidwindowCloing(WindowEvente{Sytem.e某it(0;}}口;b3.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{StringM=te2.getTe某t(;inty=Integer.pareInt(某;if(y==106口myCard.how(f,\}};}publicvoidgo2({p2=newPanel(;Buttonb1,b2,b3,b4,b5,b6;LabelL1;p2.etLayout(newGridBagLayout(;GridBagContraintc=newGridBagContraint(;c.inet=newInet(50,0,8,0;bl二newButton(、职工信息录入\b1.etBackground(Color.CYAN;c.grid某=1;c.gridy=50;c.gridwidth=5;c.gridheight=50;口p2.add(b1,c;b2=newButton(、职工信息浏览\b2.etBackground(Color.CYAN;c.grid某=1;c.gridy=100;c.gridwidth=5;c.gridheight=50;p2.add(b2,c;口b3=newButton(、职工信息查询\b3.etBackground(Color.CYAN;c.grid某=1;c.gridy=150;c.gridwidth=5;c.gridheight=50;p2.add(b3,c;口b4=newButton(、职工信息排序\b4.etBackground(Color.CYAN;c.grid某=1;c.gridy=200;c.gridwidth=5;c.gridheight=50;p2.add(b4,c;口b5=newButton(、职工信息修改\b5.etBackground(Color.CYAN;c.grid某=1;c.gridy=250;c.gridwidth=5;c.gridheight=50;p2.add(b5,c;b6=newButton(、职工信息删除\b6.etBackground(Color.CYAN;c.grid某=1;c.gridy=300;c.gridwidth=5;c.gridheight=50;p2.add(b6,c;口L1二newLabel(\欢迎进入职工管理系统某某某某某某某某某某\L1.etBackground(Color.CYAN;c.grid某=1;c.gridy=0;c.gridwidth=5;c.gridheight=10;p2.add(L1,c;p2.etBackground(Color.green;f.add(p2,\b1.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{myCard.how(f,\}};b2.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{myCard.how(f,\}};b3.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{myCard.how(f,\}};b4.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{myCard.how(f,\}};b5.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{myCard.how(f,\}};b6.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{myCard.how(f,\}};}publicvoidgo3({p3=newPanel(;p3.etLayout(newGridBagLayout(;GridBagContraintc=newGridBagContraint(;Buttonb1,b2,b3,b4,b5,b6,b7,b8,b9,b10;finalTe某tFieldte1,te2,te3,te4,te5,te6,te7,te8;LabelL1;c.inet=newInet(60,50,0,0;L1二newLabel(\请输入下面信息某某某某某某某某某某某某某某某某'口L1.etBackground(Color.CYAN;c.grid某=0;c.gridy=0;c.gridwidth=0;c.gridheight=1;p3.add(L1,c;bl二newButton(、工号、口b1.etBackground(Color.CYAN;c.grid某=0;c.gridy=10;c.gridwidth=1;c.gridheight=1;p3.add(b1,c;b2=newButton(、姓名\b2.etBackground(Color.CYAN;c.grid某=35;c.gridy=10;c.gridwidth=1;c.gridheight=1;p3.add(b2,c;b3=newButton(、性别\b3.etBackground(Color.CYAN;c.grid某=0;c.gridy=30;c.gridwidth=1;c.gridheight=1;p3.add(b3,c;b4=newButton(、年龄\b4.etBackground(Color.CYAN;c.grid某=35;c.gridy=30;c.gridwidth=1;c.gridheight=1;p3.add(b4,c;b5=newButton(、学历\b5.etBackground(Color.CYAN;c.grid某=0;c.gridy=50;c.gridwidth=1;c.gridheight=1;p3.add(b5,c;b6=newButton(、工资\b6.etBackground(Color.CYAN;c.grid某=35;c.gridy=50;c.gridwidth=1;c.gridheight=1;p3.add(b6,c;b7=newButton(、住址\b7.etBackground(Color.CYAN;c.grid某=0;c.gridy=70;c.gridwidth=1;c.gridheight=1;p3.add(b7,c;b8=newButton(、电话\b8.etBackground(Color.CYAN;口c.grid某=35;c.gridy=70;c.gridwidth=1;c.gridheight=1;p3.add(b8,c;b9=newButton(、提交\b9.etBackground(Color.CYAN;c.grid某=10;c.gridy=100;c.gridwidth=1;c.gridheight=1;p3.add(b9,c;b10=newButton(、返回\b10.etBackground(Color.CYAN;c.grid某=35;c.gridy=100;c.gridwidth=1;c.gridheight=1;p3.add(b10,c;te1=newTe某tField(10;c.grid某=10;c.gridy=10;c.gridwidth=1;c.gridheight=1;p3.add(te1,c;te2=newTe某tField(10;c.grid某=37;c.gridy=10;c.gridwidth=1;c.gridheight=1;p3.add(te2,c;te3=newTe某tField(10;c.grid某=10;c.gridy=30;c.gridwidth=1;c.gridheight=1;p3.add(te3,c;te4=newTe某tField(10;c.grid某=37;c.gridy=30;c.gridwidth=1;c.gridheight=1;p3.add(te4,c;te5=newTe某tField(10;c.grid某=10;c.gridy=50;c.gridwidth=1;c.gridheight=1;p3.add(te5,c;te6=newTe某tField(10;口c.grid某=37;c.gridy=50;c.gridwidth=1;c.gridheight=1;p3.add(te6,c;te7=newTe某tField(10;c.grid某=10;c.gridy=70;c.gridwidth=1;c.gridheight=1;p3.add(te7,c;te8=newTe某tField(10;c.grid某=37;c.gridy=70;c.gridwidth=1;c.gridheight=1;p3.add(te8,c;p3.etBackground(Color.green;f.add(p3,\b9.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{employeee1=newemployee(;e1.init(te1.getTe某t(,te2.getTe某t(,te3.getTe某t(,te4.getTe某t(,te5.getTe某t(,te6.getTe某t(,te7.getTe某t(,te8.getTe某t(;日String某=\5吐皿8丫=\5吐皿82=\5吐皿8亚=\口Stringql=\ql=ql+某+e1.num+y+z+某++y+z+某+e1.e某+丫+%+某+e1.age+y+z+某++y+z+某+e1.la+y+z+某+e1.add+y+z+某+e1.tel+y+w;e1.load(ql;te1.etTe某t(\te2.etTe某t(\te3.etTe某t(\te4.etTe某t(\te5.etTe某t(\te6.etTe某t(\te7.etTe某t(\te8.etTe某t(\}};口b10.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{myCard.how(f,\}};}publicvoidgo4({p4=newPanel(;p4.etLayout(newGridBagLayout(;GridBagContraintc=newGridBagContraint(;Buttonb1,b2;LabelL1;finalTe某tAreata;口c.inet=newInet(60,0,0,0;L1二newLabel(\欢迎进入信息浏览界面某某某某某某某某某某某某某某某某\L1.etBackground(Color.CYAN;c.grid某=0;c.gridy=0;c.gridwidth=0;c.gridheight=1;p4.add(L1,c;b1=newButton(、浏览\b1.etBackground(Color.CYAN;c.grid某=0;c.gridy=10;c.gridwidth=1;c.gridheight=1;p4.add(b1,c;b2=newButton(、返回、口b2.etBackground(Color.CYAN;c.grid某=0;c.gridy=20;c.gridwidth=1;c.gridheight=1;p4.add(b2,c;ta=newTe某tArea(15,50;c.grid某=0;c.gridy=11;c.gridwidth=1;c.gridheight=1;p4.add(ta,c;p4.etBackground(Color.green;f.add(p4,\b1.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{try{Cla.forName(\Stringurl=\StringuerName=\Stringpaword=\Connectionconn=DriverManager.getConnection(url,uerName,paword;Statementtmt=conn.createStatement(;ReultSetr=tmt.e某ecuteQuery(\employee[]em=newemployee[10];inti=0;while(r.ne某t({口=+em[j].num+\em[j].edu+\}ta.etTe某t(;日r.cloe(;tmt.cloe(;}catch(E某ceptione1{e1.printStackTrace(;}}};口b2.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{ta.etTe某t(\myCard.how(f,\}};}publicvoidgo5({p5=newPanel(;p5.etLayout(newGridBagLayout(;GridBagContraintc=newGridBagContraint(;c.inet=newInet(40,0,0,0;Panelp5_2=newPanel(;p5_2.etLayout(newGridBagLayout(;GridBagContraint某=newGridBagContraint(;口某.inet=newInet(30,60,0,80;Buttonb1,b2,b3,b4;finalTe某tFieldtlfinalTe某tFieldt2;finalTe某tAreata;LabelL1;口bl二newButton(、查询名称\b1.etBackground(Color.CYAN;某.grid某=0;某.gridy=0;某.gridwidth=2;某.gridheight=1;p5_2.add(b1,某;口b2=newButton(、查询范围\b2.etBackground(Color.CYAN;某.grid某=0;某.gridy=5;某.gridwidth=2;某.gridheight=1;p5_2.add(b2,某;口b3=newButton(、查询\b3.etBackground(Color.CYAN;某.grid某=0;某.gridy=10;某.gridwidth=2;口某.gridheight=1;p5_2.add(b3,某;口b4=newButton(、返回\b4.etBackground(Color.CYAN;某.grid某=20;某.gridy=10;某.gridwidth=1;某.gridheight=1;p5_2.add(b4,某;t1=newTe某tField(10;某.grid某=20;某.gridy=0;某.gridwidth=1;某.gridheight=1;p5_2.add(t1,某;t2=newTe某tField(10;某.grid某=20;某.gridy=5;某.gridwidth=1;某.gridheight=1;p5_2.add(t2,某;口L1二newLabel(\欢迎进入职工信息查询界面某某某某某某某某某某某\L1.etBackground(Color.CYAN;c.grid某=0;口c.gridy=0;c.gridwidth=0;c.gridheight=1;p5.add(L1,c;c.grid某=0;c.gridy=5;c.gridwidth=1;c.gridheight=1;p5.add(p5_2,c;ta二newTe某tArea(10,65;c.grid某=0;c.gridy=10;c.gridwidth=1;c.gridheight=1;p5.add(ta,c;p5.etBackground(Color.green;f.add(p5,\b4.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{tl.etTe某t(\t2.etTe某t(\ta.etTe某t(\myCard.how(f,\}};b3.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{try{Cla.forName(\Stringurl=\StringuerName=\Stringpaword=\Connectionconn=DriverManager.getConnection(url,uerName,paword;Statementtmt=conn.createStatement(;Stringql=\Stringql1=t1.getTe某t(;Stringql2=t2.getTe某t(;ql=ql+ql1+\ReultSetr=tmt.e某ecuteQuery(ql;employee[]em=newemployee[10];inti=0;while(r.ne某t({employeeeml=newemployee(;em1.num=r.getString(、工号\=r.getString(、姓名\em1.e某二上80土5让皿8(、性别、口=+\em[j].edu+\}ta.etTe某t(;r.cloe(;tmt.cloe(;}口catch(E某ceptione1{e1.printStackTrace(;}}};}口publicvoidgo6({p6=newPanel(;p6.etLayout(newGridBagLayout(;GridBagContraintc=newGridBagContraint(;c.inet=newInet(60,0,30,0;Panelp6_1=newPanel(;p6_1.etLayout(newGridBagLayout(;GridBagContraint某=newGridBagContraint(;某.inet=newInet(0,40,0,40;LabelL1;Buttonb1,b2,b3;finalTe某tAreata;bl二newButton('按年龄排序'某.grid某=0;某.gridy=0;某.gridwidth=1;某.gridheight=1;p6_1.add(b1,某;口b2二newButton('按工资排序\某.grid某=10;某.gridy=0;某.gridwidth=1;某.gridheight=1;p6_1.add(b2,某;口b3=newButton(、返回、口某.grid某=15;某.gridy=0;某.gridwidth=1;某.gridheight=1;p6_1.add(b3,某;口L1二newLabel(\欢迎进入职工信息查询界面某某某某某某某某某某某\L1.etBackground(Color.CYAN;c.grid某=0;c.gridy=0;c.gridwidth=1;c.gridheight=1;p6.add(L1,c;c.grid某=0;c.gridy=5;c.gridwidth=1;c.gridheight=1;p6.add(p6_1,c;ta=newTe某tArea(10,65;c.grid某=0;c.gridy=10;c.gridwidth=1;c.gridheight=1;p6.add(ta,c;p6.etBackground(Color.green;f.add(p6,\b1.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{try{Cla.forName(\Stringurl=\StringuerName=\Stringpaword=\Connectionconn=DriverManager.getConnection(url,uerName,paword;Statementtmt=conn.createStatement(;ReultSetr=tmt.e某ecuteQuery(\employee[]em=newemployee[10];inti=0;while(r.ne某t({口employeeeml=newemployee(;em1.num=r.getString(、工号\=r.getString(、姓名\em1.e某二上80土5让皿8(、性另U\em1.age=r.getString(、年龄\=r.getString(\学历\em1.la=r.getString(、工资\em1.add=r.getString(、住址、口employeezz;int某,y;for(intf=1;ffor(intk=f+1;k{口某=Integer.pareInt(em[f].age;y=Integer.pareInt(em[k].age;if(某>y{zz=em[f];em[f]=em[k];em[k]=zz;}}=+\em[j].edu+\}ta.etTe某t(;日r.cloe(;tmt.cloe(;}catch(E某ceptione1{e1.printStackTrace(;}}};口b2.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{try{Cla.forName(\Stringurl=\StringuerName=\Stringpaword=\Connectionconn=DriverManager.getConnection(url,uerName,paword;Statementtmt=conn.createStatement(;ReultSetr=tmt.e某ecuteQuery(\employee[]em=newemployee[10];inti=0;while(r.ne某t({口employeeem1=newemployee(;employeezz;int某,丫;£0丫(也土£=1型0丫(①土女二f+1;k{口某=Integer.pareInt(em[f].la;y=Integer.pareInt(em[k].la;if(某>y{zz=em[f];em[f]=em[k];em[k]=zz;}}=+\em[j].edu+\}ta.etTe某t(;r.cloe(;tmt.cloe(;}口catch(E某ceptione1{e1.printStackTrace(;}}};口b3.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{ta.etTe某t(\myCard.how(f,\}};}publicvoidgo7({p7=newPanel(;p7.etLayout(newGridBagLayout(;GridBagContraintc=newGridBagContraint(;c.inet=newInet(40,0,50,0;Panelp7_1=newPanel(;p7_1.etLayout(newGridBagLayout(;GridBagContraint某=newGridBagContraint(;某.inet=newInet(30,60,0,80;LabelL1;口Buttonb1,b2,b3,b4,b5,b6,b7;finalTe某tFieldt1;finalTe某tFieldt2;finalTe某tFieldt3;口bl二newButton(、信息编号\b1.etBackground(Color.CYAN;某.grid某=0;某.gridy=0;某.gridwidth=1;某.gridheight=1;p7_1.add(b1,某;口b2=newButton(、修改名称\b2.etBackground(Color.CYAN;某.grid某=0;某.gridy=5;某.gridwidth=1;口某.gridheight=1;p7_1.add(b2,某;口b3=newButton(、修改值\b3.etBackground(Color.CYAN;某.grid某=0;某.gridy=10;某.gridwidth=1;某.gridheight=1;p7_1.add(b3,某;口b4=newButton(、修改\b4.etBackground(Color.CYAN;某.grid某=0;某.gridy=15;某.gridwidth=1;某.gridheight=1;p7_1.add(b4,某;口b5=newButton(、返回\b5.etBackground(Color.CYAN;某.grid某=10;某.gridy=15;某.gridwidth=1;某.gridheight=1;p7_1.add(b5,某;口b6=newButton(、查询\b6.etBackground(Color.CYAN;口某.grid某=0;某.gridy=20;某.gridwidth=1;某.gridheight=1;p7_1.add(b6,某;口b7=newButton(、继续\b7.etBackground(Color.CYAN;某.grid某=10;某.gridy=20;某.gridwidth=1;某.gridheight=1;p7_1.add(b7,某;t1=newTe某tField(16;某.grid某=10;某.gridy=0;某.gridwidth=1;某.gridheight=1;p7_1.add(t1,某;t2=newTe某tField(16;某.grid某=10;某.gridy=5;某.gridwidth=1;某.gridheight=1;p7_1.add(t2,某;t3=newTe某tField(16;口某.grid某=10;某.gridy=10;某.gridwidth=1;某.gridheight=1;p7_1.add(t3,某;口L1二newLabel(\欢迎进入职工信息修改界面某某某某某某某某某某某\L1.etBackground(Color.CYAN;c.grid某=0;c.gridy=0;c.gridwidth=1;c.gridheight=1;p7.add(L1,c;c.grid某=0;c.gridy=10;c.gridwidth=1;c.gridheight=1;p7.add(p7_1,c;p7.etBackground(Color.green;f.add(p7,\b4.addMoueLitener(newMoueAdapter({publicvoidmoueClicked(MoueEvente{employeee1=newemployee(;Stringql;ql=\工号='\+t1.getTe某t(+\Sytem.out.println(ql;e
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年度年福建省高校教师资格证之高等教育心理学真题练习试卷B卷附答案
- 2024年交通运输设备项目资金需求报告代可行性研究报告
- 一年级数学计算题专项练习1000题汇编
- 2024年个人房产抵押贷款协议范本
- 文书模板-《劳务用工合同》
- 2024年度安置性质房产购买协议典范
- 2024老年专家返聘协议详细条款
- 2024届安徽省皖南八校联盟高三4月(二诊)调研测试卷(康德版)数学试题
- 2024年度建筑资产转让协议样例
- 2024精简型牛肉购销协议文本
- 陕西师范大学学位英语试题
- 中小学反恐风险评估报告
- 品牌营销策略和品牌策略
- 视力矫正商业计划书
- 医学课件:临床决策分析
- 幼儿园优质公开课:中班音乐韵律《打喷嚏的小老鼠》课件
- 质量管理体系品质保证体系图
- 人教版(新插图)三年级上册数学 第9课时 用乘除两步计算 解决-归总问题 教学课件
- 《现代汉语》考试复习题库及答案
- 13J104《蒸压加气混凝土砌块、板材构造》
- 初中语文七年级上册《世说新语二则》作业设计
评论
0/150
提交评论