课程设计考勤管理系统源代码Word格式.docx

上传人:b****5 文档编号:19867137 上传时间:2023-01-11 格式:DOCX 页数:70 大小:26.45KB
下载 相关 举报
课程设计考勤管理系统源代码Word格式.docx_第1页
第1页 / 共70页
课程设计考勤管理系统源代码Word格式.docx_第2页
第2页 / 共70页
课程设计考勤管理系统源代码Word格式.docx_第3页
第3页 / 共70页
课程设计考勤管理系统源代码Word格式.docx_第4页
第4页 / 共70页
课程设计考勤管理系统源代码Word格式.docx_第5页
第5页 / 共70页
点击查看更多>>
下载资源
资源描述

课程设计考勤管理系统源代码Word格式.docx

《课程设计考勤管理系统源代码Word格式.docx》由会员分享,可在线阅读,更多相关《课程设计考勤管理系统源代码Word格式.docx(70页珍藏版)》请在冰豆网上搜索。

课程设计考勤管理系统源代码Word格式.docx

b1=newJButton("

非弹性工作制"

b2=newJButton("

弹性工作制"

b3=newJButton("

返回"

box1=Box.createHorizontalBox();

box2=Box.createHorizontalBox();

box=Box.createVerticalBox();

box1.add(b1);

box1.add(Box.createHorizontalStrut(20));

box1.add(b2);

box2.add(b3);

box.add(box1);

box.add(Box.createVerticalStrut(30));

box.add(box2);

this.add(box);

b1.addActionListener(newActionListener()//

@Override

publicvoidactionPerformed(ActionEvente)

//TODO自动生成的方法存根

UBoundFrameframe=newUBoundFrame();

dispose();

});

b2.addActionListener(newActionListener()//

BoundFrameframe=newBoundFrame();

dispose();

b3.addActionListener(newActionListener()//

MFrameframe=newMFrame();

}

classBoundFrameextendsJFrame

publicBoundFrame()

this.setSize(400,400);

JLabelk1,k2,k3,k4,k5,k6;

JTextFieldf1,f2,f3,f4,f5,f6;

Boxbox1,box2,box3,box4,box5,box;

JButtonb1;

k1=newJLabel("

工号:

"

k2=newJLabel("

姓名:

k3=newJLabel("

当月工时:

k4=newJLabel("

:

k5=newJLabel("

当月工作天数"

k6=newJLabel("

当月富余:

f1=newJTextField(5);

f2=newJTextField(5);

f3=newJTextField(5);

f4=newJTextField(5);

f5=newJTextField(5);

f6=newJTextField(5);

box3=Box.createHorizontalBox();

box4=Box.createHorizontalBox();

box5=Box.createHorizontalBox();

box1.add(k1);

box1.add(f1);

box1.add(k2);

box1.add(f2);

box2.add(k3);

box2.add(f3);

box2.add(k4);

box2.add(f4);

box3.add(k5);

box3.add(f5);

box4.add(k6);

box4.add(f6);

box5.add(b1);

box.add(Box.createVerticalStrut(20));

box.add(box3);

box.add(box4);

box.add(box5);

b1.addActionListener(newActionListener()//确定

AttendFrameframe=newAttendFrame();

publicclassConnectionDB{

privateStringJDriver="

sun.jdbc.odbc.JdbcOdbcDriver"

;

privateStringsqlURL="

jdbc:

odbc:

bobo"

//privateStringJDriver="

com.microsoft.sqlserver.jdbc.SQLServerDriver"

//privateStringsqlURL="

sqlserver:

//localhost:

1433;

DatabaseName=MyTest;

integratedSecurity=TRUE;

privateConnectionconnection;

privateStatementstatement;

privatestaticConnectionconn=null;

privateString[]tableSQL=newString[4];

publicConnectionDB(){

try{

Class.forName(JDriver);

connection=DriverManager.getConnection(sqlURL);

statement=connection.createStatement();

}catch(ClassNotFoundExceptione){

e.printStackTrace();

}catch(SQLExceptione){

}

publicConnectiongetConnection(){

returnconnection;

publicStatementgetStatement(){

returnstatement;

publicvoidbreakDB(){

statement.close();

connection.close();

}catch(SQLExceptione){

publicvoidcreateTable(){

tableSQL[0]="

createtablestaff_info("

+

"

Snochar(9)primarykey,"

"

Snamechar(10)notnull,"

Sagesmallint,"

enter_timechar(10)notnull,"

positionchar(10)notnull,"

sexchar

(1),"

passwordchar(6));

tableSQL[1]="

createtablepz_info("

arrive_hourchar

(2),"

arrive_minutechar

(2),"

leave_hourchar

(2),"

leave_minutechar

(2),"

everyday_timechar

(2));

tableSQL[2]="

createtableeverymonth_statistics("

Snochar(9)notnull,"

remain_timechar(4),"

late_timessmallint,"

early_leavesmallint,"

work_daysmallint,"

primarykey(Sno),"

foreignkey(Sno)"

referencesstaff_info(Sno)ondeletecascade);

tableSQL[3]="

createtableeveryday_statistics("

hourchar

(2),"

minutechar

(2),"

actionchar(6),"

timechar(4),"

try{

for(inti=0;

i<

4;

i++)

statement.executeUpdate(tableSQL[i]);

}catch(SQLExceptione){

e.printStackTrace();

}

privatestaticResultSetexecuteQuery(Stringsql){

try{

if(conn==null)

newConnectionDB();

returnconn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE).executeQuery(sql);

}catch(SQLExceptione){

e.printStackTrace();

returnnull;

}finally{

classEqu_FrameextendsJFrame//配置信息

publicEqu_Frame()

配置信息"

this.create();

JLabelk1,k2,k3,k4,k5,k6,k7,k8,k9,k10;

JLabelf1,f2,f3,f4,f5,f6,f7,f8,f9,f10;

Boxbox1,box2,box3,box4,box5,box6,box7,box;

JButtonb1,b2;

上班时间:

下班时间:

每月工作总时间:

每月工作天数:

k7=newJLabel("

每月工作日期:

k8=newJLabel("

~"

k9=newJLabel("

每月放假日期:

k10=newJLabel("

修改"

f1=newJLabel("

08"

f2=newJLabel("

30"

f3=newJLabel("

17"

f4=newJLabel("

f5=newJLabel("

200"

f6=newJLabel("

22"

f7=newJLabel("

星期一"

f8=newJLabel("

星期五"

f9=newJLabel("

星期六"

f10=newJLabel("

星期日"

box6=Box.createHorizontalBox();

box7=Box.createHorizontalBox();

box5.add(k7);

box5.add(f7);

box5.add(k8);

box5.add(f8);

box6.add(k9);

box6.add(f9);

box6.add(k10);

box6.add(f10);

box7.add(b1);

box7.add(Box.createHorizontalStrut(20));

box7.add(b2);

box.add(box6);

box.add(box7);

EquAltFrameframe=newEquAltFrame();

b2.addActionListener(newActionListener()//确定

classEquAltFrameextendsJFrame//修改配置信息

publicEquAltFrame()

修改配置信息"

JTextFieldf1,f2,f3,f4,f5,f6,f7,f8,f9,f10;

保存"

取消"

f7=new

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

当前位置:首页 > 法律文书 > 调解书

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

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