java考勤管理系统数据库实现.docx

上传人:b****5 文档编号:8344774 上传时间:2023-01-30 格式:DOCX 页数:13 大小:142.31KB
下载 相关 举报
java考勤管理系统数据库实现.docx_第1页
第1页 / 共13页
java考勤管理系统数据库实现.docx_第2页
第2页 / 共13页
java考勤管理系统数据库实现.docx_第3页
第3页 / 共13页
java考勤管理系统数据库实现.docx_第4页
第4页 / 共13页
java考勤管理系统数据库实现.docx_第5页
第5页 / 共13页
点击查看更多>>
下载资源
资源描述

java考勤管理系统数据库实现.docx

《java考勤管理系统数据库实现.docx》由会员分享,可在线阅读,更多相关《java考勤管理系统数据库实现.docx(13页珍藏版)》请在冰豆网上搜索。

java考勤管理系统数据库实现.docx

java考勤管理系统数据库实现

 

java考勤管理系统数据库实现

设计代码

Java源程序:

import.*;

import.*;

import.*;

import.*;

import.*;

import.*;

import.*;

classDB_LSimplementsActionListener{

JFrameframe=newJFrame("欢迎进入LS工资管理系统");

JLabellabel=newJLabel("09网络2_54_李胜",;

JButtonbutton1=newJButton("进入系统");

JButtonbutton2=newJButton("退出系统");

ImageIconim=newImageIcon("");

JLabela1=newJLabel(im);

voidCreate(){

JPanelpcontentPane=(JPanel)();

JPanelpcontentPane1=newJPanel();

(label);

(newFlowLayout());

(button1);

(button2);

(newLabel(""));

(a1);

;

(true);

(this);

(this);

;

();

(200,100,550,600);

(true);

}

publicstaticvoidmain(String[]args){

DB_LSdome=newDB_LS();

();

}

publicvoidactionPerformed(ActionEvente){

if())){

DLdl=newDL();

();

}

if())){quals("123")==true)&&().equals("123")==true)){

GZGLZJMgz=newGZGLZJM();

();

}

else{(null,"对不起,你输入的密码错误!

");

};

if())&&().equals())==true)&&().equals())==true)){

XKxk=newXK();

();

Connectioncon;

Statementsql;

ResultSetrs;

Vectorvector=newVector();

try{

("");

}catch(ClassNotFoundExceptione1){

""+e1);

}

try{

con=("jdbc:

odbc:

123","","");

sql=,;

("SELECTGno,mmFROMYWHEREGno="+()+"ANDmm="+());

}catch(SQLExceptione1){

}

}

if())){

(0);

}

}

}

classGZGLZJMextendsJFrameimplementsActionListener{

JFramef=newJFrame("工资管理系统");

JButtonb1=newJButton("津贴管理");

JButtonb2=newJButton("总查询");

JButtonb3=newJButton("工资管理");

JButtonb4=newJButton("后勤管理");

JButtonb6=newJButton("员工个人信息管理");

JButtonb5=newJButton("返回");

ImageIconim=newImageIcon("");

JLabela3=newJLabel(im);

voidcreate(){

JPanelp=(JPanel)();

JPanelp1=newJPanel();

(newFlowLayout());

(b1);

(newJLabel(""));

(b6);

(newJLabel(""));

(b3);

(newJLabel(""));

(b4);

(newJLabel(""));

(b2);

(newJLabel(""));

(b5);

(a3);

;

(true);

(this);

(this);

(this);

(this);

(this);

(this);

(200,100,800,600);

(true);

}

publicvoidactionPerformed(ActionEvente){

if())){//返回

DLd=newDL();

();

}

if())){//津贴管理

JTGLjt=newJTGL();

();

}

if())){//员工个人信息管理

YGGLyg=newYGGL();

();

}

if())){//查询

XKxk=newXK();

();

}

if())){//后勤管理

KQGLkq=newKQGL();

();

}

if())){//工资管理

GZGLgz=newGZGL();

();

}

}

}

classKQGLimplementsActionListener{

JFramef=newJFrame("录入修改删除考勤信息");

JButtonb1=newJButton("录入");

JButtonb2=newJButton("修改");

JButtonb3=newJButton("删除");

JButtonb4=newJButton("查询所有");

JButtonb5=newJButton("返回");

JTextFieldtf1=newJTextField(4);

JTextFieldtf2=newJTextField(4);

JTextFieldtf3=newJTextField(4);

JTextFieldtf4=newJTextField(4);

JTextFieldtf5=newJTextField(6);

JButtonb6=newJButton("查询单人考勤");

String[]cloum={"职工号","缺勤天数","缺勤类别","缺勤时间"};

Object[][]row=newObject[50][4];

JTabletable=newJTable(row,cloum);

JScrollPanescrollpane=newJScrollPane(table);

JSplitPanesplitpane=newJSplitPane;

voidcreate()

{

JPanelp=(JPanel)();

(newFlowLayout());

//(scrollpane);

(splitpane);

JPanelp1=newJPanel();

(b1);

(b2);

(b3);

(b4);

(b6);

(b5);

JPanelp2=newJPanel();

;

(scrollpane);

JPanelp3=newJPanel();

(newFlowLayout());

(newJLabel(""));

(newJLabel("职工号"));

(tf1);

(newJLabel("缺勤天数"));

(tf2);

(newJLabel("缺勤类别"));

(tf3);

(newJLabel(""));

(newJLabel("缺勤时间"));

(tf4);

(newJLabel("在此处输入职工号点击查询删除"));

(tf5);

(p1,;

(p2,;

(50);

;

(this);

(this);

(this);

(this);

(this);

(this);

(200,100,500,600);

(true);//可以调整界面大小

(true);

}

publicvoidactionPerformed(ActionEvente){

if())){//添加

Connectioncon;

Statementsql;

ResultSetrs;

try{

("");

}catch(ClassNotFoundExceptione1){

""+e1);

}

try{

con=("jdbc:

odbc:

123","","");

sql=();

StringinsertStr="INSERTINTOKVALUES"+"("+"'"+()+"'"+","+()+","+"'"+()+"'"+","+()+")";

(insertStr);

();

}catch(SQLExceptione1){

}

}

if())){//修改

Connectioncon;

Statementsql;

ResultSetrs;

try{

("");

}catch(ClassNotFoundExceptione1){

""+e1);

}

try{

con=("jdbc:

odbc:

123","","");

sql=();

("UPDATEKSETts="+()+"WHEREKno="+()+"");

("UPDATEKSETlb="+()+"WHEREKno="+()+"");

("UPDATEKSETsj="+()+"WHEREKno="+()+"");

();

}catch(SQLExceptione1){

}

}

if())){//删除

Connectioncon;

Statementsql;

ResultSetrs;

try{

("");

}catch(ClassNotFoundExceptione1){

""+e1);

}

try{

con=("jdbc:

odbc:

123","","");

sql=,;

("DELETEFROMKWHEREKno="+());

();

}catch(SQLExceptione1){

}

}

if())){//查询全部

Connectioncon;

Statementsql;

ResultSetrs;

Vectorvector=newVector();

try{

("");

}catch(ClassNotFoundExceptione1){

""+e1);

}

try{

con=("jdbc:

odbc:

123","sa","");

sql=,;

if())){

for(inti=0;i<50;i++)

for(intj=0;j<4;j++)

("",i,j);

rs=("SELECT*FROMKORDERBYKnoDESC");

intk=-1;

while()){

++k;

StringKno=

(1);

Stringts=

(2);

Stringlb=(3);

Stringsj=(4);

(Kno,k,0);

(ts,k,1);

(lb,k,2);

(sj,k,3);

}

}

}catch(SQLExceptione1){

}

}

if())){//查询关键字

Connectioncon;

Statementsql;

ResultSetrs;

Vectorvector=newVector();

try{

("");

}catch(ClassNotFoundExceptione1){

""+e1);

}

try{

con=("jdbc:

odbc:

123","sa","");

sql=,;

if())){

for(inti=0;i<50;i++)

for(intj=0;j<4;j++)

("",i,j);

rs=("SELECT*FROMKWHEREKno="+());

intk=-1;

while()){

++k;

StringKno=

(1);

Stringts=

(2);

Stringlb=(3);

Stringsj=(4);

(Kno,k,0);

(ts,k,1);

(lb,k,2);

(sj,k,3);

}

}

}catch(SQLExceptione1){

}

}

if())){//返回

DLdl=newDL();

();

}

}

}

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

当前位置:首页 > 工程科技 > 城乡园林规划

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1