重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

关于vb.net人事管理系统的信息

谁有VB.NET+Access数据库的人事管理系统原代码及论文?过几天我们要答辩了,急.

刚好做过这个论文,给你回答啦~~独家哦,分数要给偶~~

创新互联网站设计,为客户量身定制各类网站建设业务,包括企业型、电子商务型、成都响应式网站建设公司、行业门户型等各类网站,实战经验丰富,成功案例众多。以客户利益为出发点,创新互联网站制作为客户规划、按需设计网站符合企业需求、带有营销价值的网络建站方案认真对待每一个客户,我们不用口头的语言来吹擂我们的优秀,千余家的成功案例见证着我们的成长。

1) 系统意义

随着计算机应用的日益普及,各企事业在人事方面实现规范化、计算机自动化管理势在必行,是提高科学管理水平的重要手段,是提高工作效率的可靠途径。

2) 系统特点

1 将人事信息实现自动化管理;

2 提供各种查询、修改、删除、插入人才信息功能;

3 提供各种信息统计功能。

3) 系统设计环境

1 Windows 2000 Server 或 Windows XP;

2 SQL Server 2000数据库管理系统;

3 VB 6.0。

二 系统需求分析

1) 系统设计目标

1 在人事管理过程中,实现信息自动化管理。

2 实现各种信息的修改、删除、插入功能。

3 实现对各种信息的查询、统计。

4 按年份月份统计某个职工的出勤情况信息。

5 按某年某月某日统计查询某部门的迟到和早退人数。

6 按月统计每个人的加班天数。

7 按年统计调入调出人数信息。

2) 系统需求分析

1. 信息需求分析

通过对人事信息系统的分析,此系统需要包含如下信息(数据字典):

1)人事档案基本信息:

编号、姓名、性别、出生日期、工作年限、电话、地址、E-mail、学历、专业、进入本单位时间(编号要求:长度为6的数字字符组成)

2)人事调动信息:

原部门、新部门、原职务、新职务、调出时间、调入时间

3)人事考勤信息:

上下班时间、迟到次数、早退次数、请假天数、加班天数、加班日期

4)系统用户管理信息:

用户帐号、密码(由6个数字组成)、记录用户最近一次登录信息:年月日

2.功能需求分析

1)人事档案基本信息的录入、更新、删除、查询;

2)人事调动信息的录入、更新、删除、查询;

3)人事考勤信息的录入、更新、删除、查询;

3. 概念结构设计

系统的E-R图如图1.1所示:

1)数据库设计

1 逻辑结构设计

人事基本信息(编号,姓名,出生日期,工作年限,电话,E-mail,学历,进单位时间);

人事调动信息(编号,原部门,新部门,原职务,新职务,调出时间,调入时间);

人事考勤信息(编号,上下班时间,迟到次数,早退次数,请假天数,加班天数,加班日期)。

2 各数据表结构

根据实体间E – R模型的需求分析,本系统需要4个数据表分别来存放人是基本信息,调动信息,考勤信息和系统管理员帐号信息,具体如下:

人事基本信息表

字段名 数据类型 长度 是否为空 说明

bh char 10 Not null 编号

name varchar 8 Not null 姓名

sex varChar 3 Not null 性别

gznx varchar 10 null 工作年限

birth Datetime 10 null 出生日期

email Varchar 20 null E-mail

dh Varchar 20 null 电话

xl Varchar 10 null 学历

jdwsj Datetime 10 null 进单位时间

人事调动表

字段名 数据类型 长度 是否为空 说明

ybm varchar 12 Not null 原部门

xbm varchar 12 Not null 新部门

yzw varChar 12 Not null 原职务

xzw varchar 12 null 新职务

dcsj Datetime 10 null 调出时间

drsj Datetime 10 null 调入时间

人事考勤表

字段名 数据类型 长度 是否为空 说明

sxb varchar 10 Not null 上下班时间

cd varchar 5 Not null 迟到次数

zt varChar 5 Not null 早退次数

qj varchar 5 null 请假天数

jbts Datetime 5 null 加班天数

jbrq Datetime 10 null 加班日期

管理员表

字段名 数据类型 长度 是否为空 说明

name char 20 Not null 用户名

password char 8 Not null 密码

人事基本信息模块代码

Option Explicit

Dim mblchange As Boolean

Public txtSQL As String

Public msgtext As String

Dim mrc As ADODB.Recordset

Private Sub cmdcancle_Click()

Unload Me

End Sub

Private Sub cmdOK_Click()

Dim intCount As Integer

Dim txtSQL As String

Dim MsgString As String

Dim sMeg As String

Dim i As Integer

For intCount = 0 To 1

If Trim(Text1(intCount) "") = "" Then

Select Case intCount

Case 0

sMeg = "编号"

Case 1

sMeg = "姓名"

End Select

sMeg = sMeg "不能为空"

MsgBox sMeg, vbOKOnly + vbExclamation, "警告"

Text1(intCount).SetFocus

Exit Sub

End If

Next intCount

If Trim(Text1(3) "") = "" Then

MsgBox "出生日期不能为空", vbOKOnly + vbExclamation, "警告"

End If

If Trim(Text1(3) "") "" Then

If Not IsDate(Text1(3)) Then

MsgBox "出生日期应为(yyyy-mm-dd)!", vbOKOnly + vbExclamation, "警告"

Text1(3).SetFocus

Exit Sub

Else

Text1(3) = Format(Text1(3), "yyyy-mm-dd")

End If

End If

If Trim(Text1(2) "") = "" Then

MsgBox "年龄不能为空", vbOKOnly + vbExclamation, "警告"

Exit Sub

End If

If gintMode = 1 Then

txtSQL = "select * from dangan where ygid='" Trim(Text1(0)) "'"

Set mrc = ExecuteSQL(txtSQL, msgtext)

If mrc.EOF = False Then

MsgBox "有重复记录", vbOKOnly + vbExclamation, "警告"

Text1(0).SetFocus

End If

mrc.Close

txtSQL = "delete * from dangan where ygid='" Trim(Text1(0)) "'"

Set mrc = ExecuteSQL(txtSQL, msgtext)

txtSQL = "select * from dangan"

Set mrc = ExecuteSQL(txtSQL, msgtext)

mrc.AddNew

For intCount = 0 To 1

mrc.Fields(intCount) = Trim(Text1(intCount))

Next intCount

For intCount = 2 To 5

mrc.Fields(intCount) = Trim(Text1(intCount))

Next intCount

For intCount = 6 To 10

mrc.Fields(intCount) = Trim(Text1(intCount))

Next intCount

mrc.Fields(11) = Trim(Combo1.Text)

mrc.Update

If gintMode = 1 Then

MsgBox "添加记录成功", vbOKOnly, "提示"

For i = 0 To 10

Text1(i).Text = ""

Next i

frmyuangong.Show

frmyuangong.ZOrder 0

frmmanrecord.ShowTitle

frmmanrecord.ShowData

frmmanrecord.ZOrder 1

End If

ElseIf gintMode = 2 Then

txtSQL = "select * from dangan where ygid='" Trim(Text1(0).Text) "'"

Set mrc = ExecuteSQL(txtSQL, msgtext)

For intCount = 0 To 10

mrc.Fields(intCount) = Trim(Text1(intCount))

Next intCount

mrc.Fields(11) = Trim(Combo1.Text)

mrc.Update

MsgBox "修改成功", vbOKOnly, "提示"

Unload Me

frmmanrecord.ShowTitle

frmmanrecord.ShowData

frmmanrecord.ZOrder 0

End If

gintMode = 0

End Sub

Private Sub Form_Load()

Dim msgtext As String

Dim intCount As Integer

With Combo1

.AddItem "男"

.AddItem "女"

End With

If gintMode = 1 Then

Me.Caption = Me.Caption "添加"

Combo1.ListIndex = 0

ElseIf gintMode = 2 Then

Set mrc = ExecuteSQL(txtSQL, msgtext)

If mrc.EOF = False Then

With mrc

For intCount = 0 To 10

Text1(intCount) = .Fields(intCount)

Next intCount

If Not IsNull(!sex) Then

Combo1 = !sex

End If

mrc.Close

Me.Caption = Me.Caption "修改"

End With

End If

End If

mblchange = False

End Sub

Option Explicit

Public sQSql As String

Public mrc As ADODB.Recordset

Public txtSQL As String

Public msgtext As String

Private Sub Check1_Click(Index As Integer)

If Index = 0 Then

Text1(Index).SetFocus

End If

If Index = 1 Then

Text1(Index).SetFocus

Else

Text1(Index).SetFocus

End If

End Sub

Private Sub cmdcancel_Click()

Unload Me

End Sub

Private Sub cmdOK_Click()

If Check1(0).Value = vbChecked Then

sQSql = "ygname='" Trim(Text1(0) "") "'"

End If

If Check1(1).Value = vbChecked Then

If Trim(sQSql " ") = "" Then

sQSql = "ygid='" Trim(Text1(1) "") "'"

Else

sQSql = sQSql "and ygid='" Trim(Text1(1) "") "'"

End If

End If

If Check1(2).Value = vbChecked Then

If Trim(sQSql " ") = "" Then

sQSql = "ygdept='" Trim(Text1(2) "") ""

Else

sQSql = sQSql "and ygdept='" Trim(Text1(2) "") "'"

End If

End If

If Trim(sQSql " ") = "" Then

frmmanrecord.txtSQL = "select * from dangan"

flagEdit = True

frmmanrecord.ShowTitle

frmmanrecord.ShowData

frmmanrecord.Show

Else

frmmanrecord.txtSQL = "select * from dangan where " sQSql

flagEdit = True

frmmanrecord.ShowTitle

frmmanrecord.ShowData

frmmanrecord.Show

End If

Me.Hide

End Sub

Private Sub Form_Load()

Dim i As Integer

For i = 0 To 2

Text1(i) = ""

Next

End Sub

人事考勤模块代码

Option Explicit

Dim mblchange As Boolean

Dim mrc As ADODB.Recordset

Public txtSQL As String

Private Sub cboItem_Click(Index As Integer)

Dim msgtext As String

txtSQL = "select ygid,ygname from dangan where ygdept='" Trim(DataCombo1) "'"

Set mrc = ExecuteSQL(txtSQL, msgtext)

mrc.MoveFirst

mrc.Move cboItem(1).ListIndex

txtid = Trim(mrc!ygid)

End Sub

Private Sub cboItem_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)

EnterToTab KeyCode

End Sub

Private Sub cboMonth_Click()

Dim dateTemp As Date

dateTemp = DateAdd("d", -1, DateAdd("m", 1, DateSerial(CInt(cboYear), CInt(cboMonth), 1)))

txtItem(0) = Day(dateTemp)

End Sub

Private Sub cboYear_Click()

Dim dateTemp As Date

If Trim(cboMonth " ") "" Then

dateTemp = DateAdd("d", -1, DateAdd("m", 1, DateSerial(CInt(cboYear), CInt(cboMonth), 1)))

txtItem(0) = Day(dateTemp)

End If

End Sub

Private Sub cmdExit_Click()

If mblchange And gintMode 3 And cmdSave.Enabled Then

If MsgBox("保存当前记录的变化吗?", vbOKCancel + vbExclamation, "警告") = vbOK Then

Call cmdSave_Click

End If

End If

Unload Me

End Sub

Private Sub cmdSave_Click()

Dim intCount As Integer

Dim sMeg As String

Dim rectemp As Recordset

Dim sSql As String

Dim msgtext As String

For intCount = 0 To 3

If Trim(txtItem(intCount) " ") = "" Then

Select Case intCount

Case 0

sMeg = "本月天数"

Case 2

sMeg = "应出勤天数"

Case 3

sMeg = "出勤"

End Select

If intCount 1 Then

sMeg = sMeg "不能为空!"

MsgBox sMeg, vbOKOnly + vbExclamation, "警告"

txtItem(intCount).SetFocus

Exit Sub

End If

End If

Next intCount

If gintMode = 1 Then

txtSQL = "select * from checkin where kqid='" Trim(txtid) "' and kqdate= '" Format(cboYear.Text "-" cboMonth.Text "-01", "yyyy-mm-dd") "'"

Set mrc = ExecuteSQL(txtSQL, msgtext)

If mrc.EOF = False Then

MsgBox "已经存在该员工在该月的考勤记录!", vbOKOnly + vbExclamation, "警告"

cboMonth.SetFocus

Exit Sub

End If

mrc.Close

txtSQL = "delete from checkin where kqid='" Trim(txtid) "' and kqdate='" Format(cboYear "-" cboMonth "-01", "yyyy-mm-dd") "'"

Set mrc = ExecuteSQL(txtSQL, msgtext)

txtSQL = "select * from checkin"

Set mrc = ExecuteSQL(txtSQL, msgtext)

mrc.AddNew

mrc.Fields(0) = Trim(txtid)

mrc.Fields(1) = Trim(cboItem(1))

mrc.Fields(2) = Format(cboYear "-" cboMonth "-01", "yyyy-mm-dd")

For intCount = 0 To 15

mrc.Fields(intCount + 3) = Trim(txtItem(intCount).Text)

Next intCount

For intCount = 16 To 17

mrc.Fields(intCount + 3) = Trim(txtItem(intCount).Text)

Next intCount

mrc.Update

MsgBox "记录添加成功!", vbOKOnly + vbExclamation, "警告"

For intCount = 0 To 17

txtItem(intCount) = ""

Next intCount

mblchange = False

ElseIf gintMode = 2 Then

txtSQL = "select kqid,kqname,kqdays,kqrday,kqtday,kqwork,kqabsent,kqrest,kqleave,kqlate,kqearly,kqforget,kqover1,kqvoer2,kqfill,kqgo,kqpay,kqdeduct,kqother,kqremark from checkin where kqid='" Trim(txtid) "'"

Set mrc = ExecuteSQL(txtSQL, msgtext)

mrc.Fields(0) = Trim(txtid)

mrc.Fields(1) = Trim(cboItem(1))

For intCount = 0 To 15

mrc.Fields(intCount + 2) = Trim(txtItem(intCount).Text)

Next intCount

For intCount = 16 To 17

mrc.Fields(intCount + 2) = Trim(txtItem(intCount).Text)

Next intCount

mrc.Update

MsgBox "记录修改成功!", vbOKOnly, "提示"

mrc.Close

Unload Me

frmCheck.ShowTitle

frmCheck.ShowData

frmCheck.ZOrder 0

End If

gintMode = 0

End Sub

Private Sub DataCombo1_Click(Area As Integer)

Dim sSql As String

Dim msgtext As String

txtSQL = "select ygid,ygname from dangan where ygdept='" Trim(DataCombo1) "'"

Set mrc = ExecuteSQL(txtSQL, msgtext)

cboItem(1).Clear

If Not mrc.EOF Then

With cboItem(1)

Do While Not mrc.EOF

.AddItem Trim(mrc!ygname)

mrc.MoveNext

Loop

.ListIndex = 0

End With

cmdSave.Enabled = True

Else

MsgBox "请先建立员工档案!", vbOKOnly + vbExclamation, "警告"

cmdSave.Enabled = False

Exit Sub

End If

End Sub

Private Sub Form_Load()

Dim intCount As Integer

Dim dateTemp As Date

Dim msgtext As String

Adodc1.Visible = False

cboYear.AddItem Year(Now)

cboYear.AddItem Year(Now) - 1

cboYear.ListIndex = 0

For intCount = 1 To 12

cboMonth.AddItem intCount

Next intCount

cboMonth = Month(Now)

If gintMode = 1 Then

Me.Caption = Me.Caption "添加"

'初始化部门名称

txtSQL = "select DISTINCT ygdept from dangan"

Set mrc = ExecuteSQL(txtSQL, msgtext)

If mrc.EOF Then

MsgBox "请先进行员工档案登记!", vbOKOnly + vbExclamation, "警告"

cmdSave.Enabled = False

Exit Sub

End If

'初始化本月天数

dateTemp = DateAdd("d", -1, DateAdd("m", 1, DateSerial(CInt(cboYear), CInt(cboMonth), 1)))

txtItem(0) = Day(dateTemp)

mrc.Close

ElseIf gintMode = 2 Then

Set mrc = ExecuteSQL(txtSQL, msgtext)

If mrc.EOF = False Then

With mrc

cboItem(1).AddItem .Fields(1)

cboItem(1).ListIndex = 0

For intCount = 2 To 19

If Not IsNull(.Fields(intCount)) Then

txtItem(intCount - 2) = .Fields(intCount)

End If

Next intCount

txtid = .Fields(0)

End With

End If

mrc.Close

Me.Caption = Me.Caption "修改"

End If

mblchange = False

End Sub

人事调动模块代码

Option Explicit

Dim mblchange As Boolean

Public txtSQL As String

Public msgtext As String

Dim mrc As ADODB.Recordset

Dim mybookmark As Variant

Private Sub cmdcancel_Click()

Unload Me

End Sub

Private Sub cmdchange_Click()

cmdchange.Enabled = False

Command1.Enabled = False

cmddelete.Enabled = False

gintMode = 2

End Sub

Private Sub cmddelete_Click()

Dim st As String

mybookmark = mrc.Bookmark

st = MsgBox("是否删除当前记录?", vbOKCancel, "提示")

If st = vbOK Then

mrc.MoveNext

If mrc.EOF Then

mrc.MoveFirst

mybookmark = mrc.Bookmark

mrc.MoveLast

mrc.Delete

mybookmark = mrc.Bookmark

Call viewdata

Else

mybookmark = mrc.Bookmark

mrc.MovePrevious

mrc.Delete

mrc.Bookmark = mybookmark

Call viewdata

End If

Else

mrc.Bookmark = mybookmark

Call viewdata

End If

End Sub

Private Sub cmdOK_Click()

Dim intCount As Integer

Dim txtSQL As String

Dim MsgString As String

If Text(0) = "" Then

MsgBox "编号不能为空!", vbOKOnly + vbExclamation, "警告"

Text(0).SetFocus

End If

If Text(1) = "" Then

MsgBox "事件不能为空!", vbOKOnly + vbExclamation, "警告"

Text(1).SetFocus

End If

If gintMode = 1 Then

txtSQL = "select * from renshi1 where id='" Trim(Text(0)) "'"

Set mrc = ExecuteSQL(txtSQL, msgtext)

If mrc.EOF = False Then

MsgBox "己存在此编号的记录,请重新输入!", vbOKOnly + vbExclamation, "警告"

Text(0).SetFocus

Exit Sub

End If

mrc.Close

txtSQL = "delete * from renshi1 where id='" Trim(Text(0)) "'"

Set mrc = ExecuteSQL(txtSQL, msgtext)

txtSQL = "select * from renshi1"

Set mrc = ExecuteSQL(txtSQL, msgtext)

mrc.AddNew

For intCount = 0 To 2

mrc.Fields(intCount) = Trim(Text(intCount))

Next intCount

mrc.Update

MsgBox "添加记录成功!", vbOKOnly, "提示"

frmrenshi.ZOrder 1

frmrenshi.Show

Command1.Enabled = True

cmdchange.Enabled = True

cmddelete.Enabled = True

first.Enabled = True

previous.Enabled = True

next1.Enabled = True

last.Enabled = True

End If

If gintMode = 2 Then

txtSQL = "select * from renshi1"

Set mrc = ExecuteSQL(txtSQL, msgtext)

For intCount = 0 To 2

mrc.Fields(intCount) = Text(intCount).Text

Next intCount

mrc.Update

MsgBox "记录修改成功!", vbOKOnly, "提示"

cmdchange.Enabled = True

Command1.Enabled = True

cmddelete.Enabled = True

End If

gintMode = 0

End Sub

Private Sub Command1_Click()

Dim i As Integer

For i = 0 To 2

Text(i).Text = ""

Next i

Command1.Enabled = False

cmdchange.Enabled = False

cmddelete.Enabled = False

first.Enabled = False

previous.Enabled = False

next1.Enabled = False

last.Enabled = False

gintMode = 1

End Sub

Private Sub first_Click()

mrc.MoveFirst

Call viewdata

End Sub

Private Sub Form_Load()

Dim txtSQL As String

Dim msgtext As String

Dim i As Integer

txtSQL = "select * from renshi1 "

Set mrc = ExecuteSQL(txtSQL, msgtext)

If mrc.EOF = True Then

MsgBox "没有任何记录,请添加!", vbOKOnly, "提示"

Else

mrc.MoveFirst

Call viewdata

mybookmark = mrc.Bookmark

mblchange = True

End If

mblchange = True

End Sub

Private Sub next1_Click()

mrc.MoveNext

If mrc.EOF Then

mrc.MoveFirst

End If

Call viewdata

End Sub

Private Sub previous_Click()

mrc.MovePrevious

If mrc.BOF Then

mrc.MoveLast

End If

Call viewdata

End Sub

Public Sub viewdata()

Dim intCount As Integer

For intCount = 0 To 2

Text(intCount) = mrc.Fields(intCount)

Next intCount

End Sub

用VBA编制人事管理系统

这种系统不会有的。原因做为一个独立的人事管理系统,会要实现很多的功能。而VBA做为办公辅助编程,不具备这种能力。它要是做一部分功能的实现,还是可以的。这得看你的具体需要。

我用VB做了个人事管理系统,链接SQL的,但是老是提示说链接SQL出错,有高人帮我看下哪出问题了吗?

自己做一个吧 孩子 我想你应该是我的小师弟或者师妹 当时我们也好郁闷做这个东西 但是后来事实证明 这个东西对我有很大的帮助

请参考


当前标题:关于vb.net人事管理系统的信息
文章网址:http://cqcxhl.com/article/hjisio.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP