工资管理系统43096文档格式.docx

上传人:b****5 文档编号:16743374 上传时间:2022-11-25 格式:DOCX 页数:32 大小:1.13MB
下载 相关 举报
工资管理系统43096文档格式.docx_第1页
第1页 / 共32页
工资管理系统43096文档格式.docx_第2页
第2页 / 共32页
工资管理系统43096文档格式.docx_第3页
第3页 / 共32页
工资管理系统43096文档格式.docx_第4页
第4页 / 共32页
工资管理系统43096文档格式.docx_第5页
第5页 / 共32页
点击查看更多>>
下载资源
资源描述

工资管理系统43096文档格式.docx

《工资管理系统43096文档格式.docx》由会员分享,可在线阅读,更多相关《工资管理系统43096文档格式.docx(32页珍藏版)》请在冰豆网上搜索。

工资管理系统43096文档格式.docx

系统管理模块:

对人事工资管理系统的维护、升级和对用户的管理:

用户信息添加、用户信息修改、用户信息删除和用户权限分配。

2、参与者列表

人事部门:

对员工信息的管理,包括对员工信息的输入、查询、修改。

对于转出、辞职、辞退、退休员工信息的删除。

对人事调动的管理,包括对员工岗位和部门的查询与修改。

财务部门:

根据员工的考勤和工作评价,完成工资的核算并发放工资。

系统管理员:

员工:

系统的主要使用者,登陆系统后,对自己的基本信息的查询和对自己工资的查询。

考勤部门:

对员工的出勤情况进行记录,对员工的工作进行评价。

3、用例图

图1财务部门用例

图2人事部门用例

图6人事工资管理系统用例图

一、分析

1、类图

2、状态图

图1系统状态图

3、活动图

图1用户注册活动图

图2登录活动图

图3员工信息查询活动图

图4对员工信息删除、添加、修改的活动图

图5考勤管理活动图

4、顺序图

图1用户注册顺序图

图2登录顺序图

图3添加员工信息顺序图

图4人事调动顺序图

图5考勤管理顺序图

5、协作图

图1用户注册协作图

图2登录协作图

图3添加员工信息协作图

图4考勤管理协作图

三、设计

1、流程图

2、实体E-R图

3、数据字典

(1)、员工档案信息表:

PERSONNEL.DBF

字段

字段名

类型

宽度

说明

1

员工号

字符型

3

数字

2

员工姓名

10

小于等于5个汉字

3

员工性别

2

“男”或“女”

4

员工学历

5

婚姻状况

4

“已婚”或“未婚”

6

工龄

数值型

1~99之间

7

岗位编号

8

部门编号

(2)、工资设置表:

COURSE.DBF

字段名

宽度

1

员工号

工资年月

20

_年_月_日

应发工资

5

1-99999之间

奖励金额

1-9999之间

扣除工资

1~9999之间

6

实发工资

(3)、岗位设置表:

RANK.DBF

岗位编号

岗位名称

14

小于等于7个汉字

部门编号

(4)、部门设置表:

APARTMENT.DBF

1-99之间

部门名称

部门负责人

部门人数

1~9999之间

(5)、考勤设置表:

KAOQIN.DBF

正常出勤天数

1~999之间

异常出勤天数

加班天数

评价情况

优秀、良好、中等、差

4、数据库E-R图

四、实现

1、源代码

(1)登录界面代码设计

本代码实现Form1,作用是对登录用户审核,将登录用户信息与数据库中用户表相比对,存在此用户且信息正确则进入,否则登录失败。

usingSystem;

usingSystem.Collections.Generic;

usingSystem.ComponentModel;

usingSystem.Data;

usingSystem.Drawing;

usingSystem.Linq;

usingSystem.Text;

usingSystem.Windows.Forms;

usingSystem.Data.OleDb;

namespace工资管理系统

{

publicpartialclassForm1:

Form

{

publicstaticstringpassword;

publicstaticstringusername;

publicForm1()

InitializeComponent();

}

publicintCheckUsers()//连接数据库进行查询

username=textBox1.Text.ToString();

password=textBox2.Text.ToString();

stringAfile="

Provider=Microsoft.Jet.OLEDB.4.0;

DataSource=C:

\\Users\\lenovo\\Desktop\\C#\\db.mdb;

PersistSecurityInfo=True"

;

//access文件

OleDbConnectionAconnStr=newOleDbConnection(Afile);

OleDbCommandAcmd=newOleDbCommand("

select*from[user]whereuserName='

"

+username+"

'

andpassword='

+password+"

AconnStr);

OleDbDataReaderodr=null;

AconnStr.Open();

try

odr=Acmd.ExecuteReader();

catch(Exceptionex)

if(ex!

=null)return0;

while(odr.Read())

return1;

odr.Close();

AconnStr.Close();

return0;

privatevoidbutton1_Click(objectsender,EventArgse)

{//对登录信息进行审核,正确则进入,否则登录失败

if(textBox1.Text=="

||textBox2.Text=="

MessageBox.Show("

请输入信息"

"

信息提示"

);

elseif(CheckUsers()==1)

this.Hide();

Form6form6=newForm6();

form6.Show();

else

你输入的用户名或口令不正确!

privatevoidbutton2_Click(objectsender,EventArgse)

textBox1.Text="

textBox2.Text="

}

(2)员工信息更新界面

本代码实现Form3,作用是对员工信息进行更新,可以员工信息作查找,添加,删除,修改等操作,还可以查询工资信息,并能计算总工资。

publicpartialclassForm3:

publicstaticintstring1,string2,string3,day;

publicForm3()

privatevoidForm3_Load(objectsender,EventArgse)

loadUsers();

privatevoidloadUsers()

{//连接数据库

stringconnectionString="

//access文件连接

stringOleDbString="

select*from[Message]"

OleDbConnectionconnection=newOleDbConnection(connectionString);

DataSetds=newDataSet();

connection.Open();

OleDbDataAdaptercommand=newOleDbDataAdapter(OleDbString,connection);

command.Fill(ds,"

Message"

catch(OleDbExceptionex)

thrownewException(ex.Message);

//将表绑定到dataGridView1控件

this.dataGridView1.DataSource=ds.Tables[0];

this.dataGridView1.Columns[0].ReadOnly=true;

//先0列,即用户名列为关键定不许修改

connection.Close();

privatevoidpictureBox1_Click(objectsender,EventArgse)

privatevoidbtnDelete_Click(objectsender,EventArgse)

stringSQLString="

deletefrom[Message]where[sno]='

+this.dataGridView1.CurrentRow.Cells["

Sno"

].Value+"

OleDbConnectionconnection=newOleDbConnection(connectionString);

OleDbCommandcommand=newOleDbCommand(SQLString,connection);

if(command.ExecuteNonQuery()==1)

删除成功!

if(connection!

=null)

privatevoidAddbutton_Click(objectsender,EventArgse)

{//连接数据库实现添加操作。

if(textBox1.Text=="

||textBox2.Text=="

请输入要添加的信息!

"

提示信息"

insertinto[Message]([Sno],[员工姓名])values('

+this.textBox2.Text+"

'

+this.textBox1.Text+"

)"

if(command.ExecuteNonQuery()==1)

添加成功!

privatevoiddataGridView1_CellEndEdit(objectsender,DataGridViewCellEventArgse)

{//当前修改过的值

stringupdateValue=dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();

//当前修改行的用户名(关键字)

stringusername=dataGridView1.Rows[e.RowIndex].Cells["

].Value.ToString();

stringcolName=dataGridView1.Columns[e.ColumnIndex].Name;

//修改值对应的列名

update[Message]set["

+colName+"

]='

+updateValue+"

whereSno='

+username+"

OleDbCommandcommand=newOleDbCommand(OleDbString,connection);

privatevoidbutton4_Click(objectsender,EventArgse)

{//实现操作信息

if(MessageBox.Show("

确定退出?

确认信息"

MessageBoxButtons.YesNo)==DialogResult.Yes)

Application.Exit();

privatevoidbutton5_Click(objectsender,EventArgse)

Form4form4=newForm4();

form4.Show();

更新成功"

请输入要查找的信息!

stringOleDbString="

select*from[Message]whereSno='

privatevoidForm3_FormClosing(objectsender,FormClosingEventArgse)

publicstringFindstring1()

OleDbCommandAcmd=newOleDbCommand("

select[基本工资]from[Message],[工资]whereSno='

+textBox2.Text+"

andMessage.员工工种=工资.员工工种andMessage.工资等级=工资.工资等级"

AconnStr);

OleDbDataReaderodr=null;

odr=Acmd.ExecuteReader();

=null)returnnull;

if(odr!

{returnodr[0].ToString();

returnnull;

publicstringFindday()

select[考勤天数]from[Message]whereSno='

+textBox2.Text+"

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

当前位置:首页 > 小学教育 > 数学

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

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