![工資管理系統(tǒng)csqlserver_第1頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/5/4cdabe95-9179-4d55-a525-542d7c611998/4cdabe95-9179-4d55-a525-542d7c6119981.gif)
![工資管理系統(tǒng)csqlserver_第2頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/5/4cdabe95-9179-4d55-a525-542d7c611998/4cdabe95-9179-4d55-a525-542d7c6119982.gif)
![工資管理系統(tǒng)csqlserver_第3頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/5/4cdabe95-9179-4d55-a525-542d7c611998/4cdabe95-9179-4d55-a525-542d7c6119983.gif)
![工資管理系統(tǒng)csqlserver_第4頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/5/4cdabe95-9179-4d55-a525-542d7c611998/4cdabe95-9179-4d55-a525-542d7c6119984.gif)
![工資管理系統(tǒng)csqlserver_第5頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/5/4cdabe95-9179-4d55-a525-542d7c611998/4cdabe95-9179-4d55-a525-542d7c6119985.gif)
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、數(shù)據(jù)庫課程設計設計題目: 工資管理系統(tǒng) 班 級: 學 號: 姓 名: 任務分配表第 一 組學號姓名負責部分成績組長數(shù)據(jù)庫的建表與連接組員實驗報告完善與界面設計目錄一 緒論····································
2、;······3二 需求分析·······································3三 概要設計··
3、83;····································4四 物理設計············
4、183;··························5五 詳細設計······················&
5、#183;················6六 調試分析································
6、·······9七 小結··········································1
7、6八 附件············································16 一、緒論隨著計算機技術的飛速發(fā)展和經(jīng)濟體制改革的不斷深入
8、,傳統(tǒng)企業(yè)管理方法、手段以及工作效率已不能適應新的發(fā)展需要,無法很好地完成員工工資管理工作。提高公司企業(yè)管理水平的主要途徑是更新管理者的思想,增強對管理活動的科學認識?;贑#與SQL server數(shù)據(jù)庫技術建立一個通用工資管理系統(tǒng),該系統(tǒng)為提供了查詢、增加記錄、刪除等功能,功能比較的齊全,并對工資進行了統(tǒng)計如津貼管理、報表統(tǒng)計等。基本上能滿足管理員和公司的要求。此次數(shù)據(jù)庫課程設計的主要設計如下:原理分析、程序設計過程、程序實現(xiàn)和程序調試以及數(shù)據(jù)庫的設計。需求分析、概要結構設計、邏輯結構設計、物理結構設計和數(shù)據(jù)庫的實施和維護。主要包括兩大大功能模塊:1 管理員管理界面設計。2 員工管理界面設計
9、。二、 需求分析 功能需求分析:該通用工資管理系統(tǒng)具備下列功能:管理員通過輸入用戶名和密碼進下該系統(tǒng)后,可以進行一些基本查詢(員工信息查詢、工資獎金信息查詢)、工資管理(計算總工資、獎金管理);通過輸入密碼,可以進行查詢員工的數(shù)據(jù)(工資,獎金,稅收等)。具體功能的詳細描述如下1、 在首頁進行選擇,員工與管理員通道2、 點擊管理員登陸3、用戶名和密碼即可進入 工資管理功能窗體,在此可以選擇功能,添加,查詢,人員列表4、點擊添加功能窗體,添加員工工資信息。5、點擊查詢功能窗體,輸入員工號即可查詢員工信息。6、點擊人員列表功能窗體,可查看所有員工的列表,這界面內可以進行刪除操作。7、點擊員工登陸8、
10、用戶名和密碼即可進入 員工工資查詢功能窗體,在此可以選擇查詢基本信息,查詢工資信息。9、在查詢基本信息,員工可自己查看自己的信息。10、在查詢工作信息,員工可自己查看自己的工作信息。數(shù)據(jù)流需求分析: 登陸信息 返回信息 用 戶登 錄操 作數(shù)據(jù)庫 錯誤信息 尋找信息 數(shù)據(jù)庫需求分析數(shù)據(jù)流圖三、概要設計根據(jù)需求分析階段得到的功能需求,管理員、員工通過輸入用戶名號和密碼進下該系統(tǒng)后,可以進行一些基本查詢(員工工資信息查詢、信息查詢)、還可以進行員工刪除和添加員工的操作,員工通過登錄并輸入密碼,可以進行查詢自己的數(shù)據(jù)(工資,基本信息)。 模塊功能大概可以分為如圖下幾個個方面:圖如下圖所示 四、物理設計
11、1. 選擇登陸 則會進入相應登陸界面。 2. 選擇員工登陸 管理員登陸 按鈕命令3. 選擇管理員登陸按鈕命令即可進入 管理功能窗體。4. 選擇員工登陸 按鈕命令即可進入 員工查詢功能窗體。5. 在添加,管理員對員工的信息進行添加。6. 在查詢,可以對員工查詢并進行修改。7. 在列表,可以查看所有員工的列表。五、詳細設計 (1) 數(shù)據(jù)庫的E-R圖及合并部分視圖生成E-R 圖員工信息E-R圖:病假天數(shù)工作天數(shù)Empinfotale姓名工齡銀行卡 年齡 工種名稱用戶名性別員工工資信息E-R圖:銀行卡號退休工資國家稅收 Salaryinfo工作天數(shù)基本工資獎金 員號總工資實際工作管理員用戶E-R圖:
12、admin 用戶 用戶號 密碼(2) 數(shù)據(jù)庫結構設計根據(jù)上面概念結構設計階段得到的E-R圖,下一步應該將它轉化為關系模型??梢缘玫綄年P系模式為:Empinfotale(cin,name,year,sex,workyear,position,creditcard,workday,illday)Salaryinfo(cin,bonus,salary,individual,individual2,workout,workday,Reality,creditcar)admin(id,cin,password)數(shù)據(jù)庫表的建立:(sql語句及截圖) 語句如下:CREATE TABLE dbo.Admi
13、n(id int IDENTITY(1,1) NOT NULL,cin int NULL,password char(20) NULL,);CREATE TABLE dbo.Empinfotale(cin int NOT NULL,name char(8) NULL,year int NULL,sex char(4) NULL,workyear int NULL,position char(18) NULL,creditcard char(19) NULL,workday int NULL,illday int NULL,);CREATE TABLE dbo.Admin(id int IDEN
14、TITY(1,1) NOT NULL,cin int NULL,password char(20) NULL,);六、調試分析(1)數(shù)據(jù)庫的表的建立與實現(xiàn)admin表的建立:Salaryinfo表的建立:Empinfotale表的建立:1. 數(shù)據(jù)庫的運行和截圖:選擇登錄界面截圖:管理員登錄后:查詢界面:添加界面:顯示所有信息:(2)調試與運行程序分析及存在的主要問題在此次課程設計中的主要數(shù)據(jù)庫部分為數(shù)據(jù)庫的連接部分,該部分直接影響到數(shù)據(jù)庫與應用程序的接口實現(xiàn),而且必須注意數(shù)據(jù)庫的名稱與連接數(shù)據(jù)庫是取的名稱一致。 七、小結該工資管理系統(tǒng)總體說來功能不是很齊全齊全,只具備管理員和員工的一些基本的功
15、能;數(shù)據(jù)庫的設計方面,建有員工信息表、個人信息表、工資表。數(shù)據(jù)庫中存在一些問題,如數(shù)據(jù)冗余,不夠完善。但在做課程設計的過程中也遇到很多問題,一開始時其中最大的問題是不知道用哪種編譯工具,后來選擇了Microsoft Visual Studio,在編寫程序時,編寫程序起來也有點困難,但是也越來越順利了。經(jīng)過調試后終于把自已想到實現(xiàn)的功能一步步實現(xiàn)了,通過這次課程設計使我收獲了好多,熟悉了C#的運用,還復習了數(shù)據(jù)庫相關語句的編寫。 此次課程設計讓我感受頗多:做一個數(shù)據(jù)庫其實是一件很有趣的事情。想到自己可以創(chuàng)建一個小型的數(shù)據(jù)庫系統(tǒng),有點學習后的滿足感。數(shù)據(jù)庫的建立并非難事,難點在于數(shù)據(jù)庫的連接和編程
16、語言的選擇。C#的功能很強大,這也是我以后需要學習的課程,于是我毅然選擇了它。再就是建立數(shù)據(jù)庫系統(tǒng)的步驟,我的經(jīng)驗就是要先總體規(guī)劃,再局部整理。先做好總的界面,再通過該界面的布置一步一步實現(xiàn)其功能!同時我體會到:熟練的編程能力,對知識運用的強烈渴望及其創(chuàng)新和團隊的合作精神設做好一個大型數(shù)據(jù)庫的基礎。因此通過此次課程設計我明顯感覺到自身的不足,并希望以后能更加用心地運用所學知識和學習新的知識。 在這個系統(tǒng)中我主要負責了數(shù)據(jù)庫的建立和管理員管理的頁面設計,雖然做的不是很好的,但是讓我們學到了很多關于數(shù)據(jù)庫連接方面的知識。我會繼續(xù)完善下去的。 八、附件一、程序代碼選擇登陸頁面using System
17、;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Configuration;namespace GZMS public partial class index : Form public index() InitializeComponent(); private void button1_C
18、lick(object sender, EventArgs e) Form1 indexform = new Form1(); indexform.Owner = this; indexform.Show(); this.Hide(); private void button2_Click(object sender, EventArgs e) Form11 indexform = new Form11(); indexform.Owner = this; indexform.Show(); this.Hide(); 驗證用戶名登陸頁面using System;using System.Col
19、lections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;using System.Configuration;namespace GZMS public partial class Form1 : Form public Form1() InitializeComponent(); protected o
20、verride void OnClosed(EventArgs e) Application.Exit(); private void index_Click(object sender, EventArgs e) string username = txusername.Text; string usrepaw = txuserpaw.Text; if (username = "" | usrepaw = "") MessageBox.Show("請輸入用戶名或密碼", "提示"); return; SqlCon
21、nection sqlCon = new SqlConnection(ConfigurationManager.ConnectionStrings"GZB.Properties.Settings.ConnectionString".ConnectionString); /string ConnectionString = "Data Source=(local);Initial Catalog=GZB;User=sa;Password=admin;Integrated Security=True" /SqlConnection sqlCon = new
22、SqlConnection(ConnectionString); /創(chuàng)建Connection對象 /Data Source=.;Initial Catalog=數(shù)據(jù)庫名;Integrated Security=True id = 用戶名 password = 密碼 try sqlCon.Open(); string sql = String.Format("select cin,password from Admin where cin='0'and password = '1' ", username, usrepaw); SqlComma
23、nd comm = new SqlCommand(sql,sqlCon); SqlDataReader c = comm.ExecuteReader(); if (c.Read() this.DialogResult = DialogResult.OK; /觸發(fā)確定¨ /MessageBox.Show("成功|", "登陸成功|", MessageBoxButtons.OK); search add = new search(); add.Owner = this; add.Show(); this.Hide(); else MessageBo
24、x.Show("成功", "登陸成功|", MessageBoxButtons.OK); catch (SqlException ex) MessageBox.Show("數(shù)據(jù)庫錯誤","錯誤"); finally sqlCon.Close(); private void quet_Click(object sender, EventArgs e) Application.Exit(); 功能選擇頁面using System;using System.Collections.Generic;using System
25、.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;using System.Configuration;namespace GZMS public partial class Form1 : Form public Form1() InitializeComponent(); protected override void OnClosed(EventAr
26、gs e) Application.Exit(); private void index_Click(object sender, EventArgs e) string username = txusername.Text; string usrepaw = txuserpaw.Text; if (username = "" | usrepaw = "") MessageBox.Show("請輸入用戶名或密碼", "提示"); return; SqlConnection sqlCon = new SqlConne
27、ction(ConfigurationManager.ConnectionStrings"GZB.Properties.Settings.ConnectionString".ConnectionString); /string ConnectionString = "Data Source=(local);Initial Catalog=GZB;User=sa;Password=admin;Integrated Security=True" /SqlConnection sqlCon = new SqlConnection(ConnectionStrin
28、g); /創(chuàng)建Connection對象 /Data Source=.;Initial Catalog=數(shù)據(jù)庫名;Integrated Security=True id = 用戶名 password = 密碼 try sqlCon.Open(); string sql = String.Format("select cin,password from Admin where cin='0'and password = '1' ", username, usrepaw); SqlCommand comm = new SqlCommand(sql,
29、sqlCon); SqlDataReader c = comm.ExecuteReader(); if (c.Read() this.DialogResult = DialogResult.OK; /觸發(fā)確定 /MessageBox.Show("成功", "登陸成功", MessageBoxButtons.OK); search add = new search(); add.Owner = this; add.Show(); this.Hide(); else MessageBox.Show("no成功|", "登陸no成
30、功|", MessageBoxButtons.OK); catch (SqlException ex) MessageBox.Show("數(shù)據(jù)庫錯誤","錯誤"); finally sqlCon.Close(); private void quet_Click(object sender, EventArgs e) Application.Exit(); 添加員工信息頁面using System;using System.Collections.Generic;using System.ComponentModel;using System.D
31、ata;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;using System.Configuration;namespace GZMS public partial class add : Form public add() InitializeComponent(); protected override void OnClosed(EventArgs e) Application.Exit(); private
32、void button2_Click(object sender, EventArgs e) this.Close(); private void button1_Click(object sender, EventArgs e) try string name = tbname.Text; string num = tbnum.Text; string sex = "" if (rbboy.Checked) sex = rbboy.Text; else sex = rdgirl.Text; int year = Convert.ToInt32(tbyear.Text);
33、int workyear = Convert.ToInt32(tbworkyear.Text); string position = cbposition.SelectedItem.ToString(); int workday = Convert.ToInt32(tbworkday.Text); int illday = Convert.ToInt32(tbillday1.Text); string credit = tbcredit.Text; / string constring = "server = (local); database = GZB;UID=sa;Passwo
34、rd=admin; integrated security=True" / SqlConnection conn = new SqlConnection(constring); SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings"GZB.Properties.Settings.ConnectionString".ConnectionString); conn.Open(); string sql = string.Format("insert into
35、 Empinfotale(cin,name,year,sex,workyear,position,creditcard,workday,illday)VALUES('0','1','2','3','4','5','6','7',8)", num, name, year, sex, workyear, position, credit, workday, illday); SqlCommand com = new SqlCommand(sql, conn);
36、int i = com.ExecuteNonQuery(); if (i != 0) MessageBox.Show("成功", "插入成功|", MessageBoxButtons.OK, MessageBoxIcon.None); catch (FormatException ex) MessageBox.Show("請重新輸入空白地方", "輸入錯誤", MessageBoxButtons.OK); catch (SqlException ex) MessageBox.Show("錯誤",
37、 "數(shù)據(jù)庫連接異常", MessageBoxButtons.OK); private void tbworkday_TextChanged(object sender, EventArgs e) try int workday = Convert.ToInt32(tbworkday.Text); if (workday >= 30 && workday <= 1) MessageBox.Show("輸入有誤", "請重新輸入", MessageBoxButtons.OK); return; int illd
38、ay = 30 - workday; tbillday1.Text = illday.ToString(); catch (Exception ex) return; using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;using System
39、.Configuration;namespace GZMS public partial class add1 : Form public add1() InitializeComponent(); /* int bonus = Convert.ToInt32(tbbonus.Text); int salary = Convert.ToInt32(tbsalary.Text); int individual = Convert.ToInt32(tbindividual.Text); int individual1 = Convert.ToInt32(tbindividual1.Text); i
40、nt workout = Convert.ToInt32(tbworkout.Text); int toworkout = individual1 + individual; tbtotal.Text = Convert.ToString(toworkout); int total = Convert.ToInt32(tbtotal.Text); int toreality = salary + bonus - toworkout + workout; tbreality.Text = Convert.ToString(toreality); int reality = Convert.ToI
41、nt32(tbreality.Text); string credit = tbcredit.Text;*/ private void button1_Click(object sender, EventArgs e) int num = Convert.ToInt32(tbnum.Text); int bonus = Convert.ToInt32(tbbonus.Text); int salary = Convert.ToInt32(tbsalary.Text); int individual = Convert.ToInt32(tbindividual.Text); int indivi
42、dual1 = Convert.ToInt32(tbindividual1.Text); int workout = Convert.ToInt32(tbworkout.Text); int total = Convert.ToInt32(tbtotal.Text); string credit = tbcredit.Text; int reality = Convert.ToInt32(tbreality.Text); SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings"GZB.
43、Properties.Settings.ConnectionString".ConnectionString); try conn.Open(); string sql = string.Format("insert into Salaryinfo(cin,bonus,salary,individual,individual2,workout,workday,Reality,creditcard)VALUES('0','1','2','3','4','5','6'
44、,'7',8)", num, bonus, salary, individual, individual1, workout, total, reality, credit); SqlCommand com = new SqlCommand(sql, conn); int i = com.ExecuteNonQuery(); if (i != 0) MessageBox.Show("成功", "插入成功", MessageBoxButtons.OK, MessageBoxIcon.None); catch (Exception
45、ex) MessageBox.Show("出錯了", "錯誤", MessageBoxButtons.RetryCancel); private void tbworkout_TextChanged(object sender, EventArgs e) try int bonus = Convert.ToInt32(tbbonus.Text); int salary = Convert.ToInt32(tbsalary.Text); int individual = Convert.ToInt32(tbindividual.Text); int ind
46、ividual1 = Convert.ToInt32(tbindividual1.Text); int workout = Convert.ToInt32(tbworkout.Text); int toworkout = individual1 + individual; tbtotal.Text = Convert.ToString(toworkout); int total = Convert.ToInt32(tbtotal.Text); int toreality = salary + bonus - toworkout + workout; tbreality.Text = Conve
47、rt.ToString(toreality); int reality = Convert.ToInt32(tbreality.Text); string credit = tbcredit.Text; catch (Exception ex) return; private void button2_Click(object sender, EventArgs e) this.Close(); 查詢頁面using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;using System.Configuration;namespace GZMS public
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 借款擔保人協(xié)議書
- 軟件開發(fā)和測試技術作業(yè)指導書
- 策劃推廣服務合同
- 數(shù)據(jù)挖掘與商業(yè)智能解決方案作業(yè)指導書
- XXX高校報告廳項目會議播音系統(tǒng)設計方案
- 農(nóng)業(yè)產(chǎn)業(yè)化環(huán)境保護方案
- 小學二年級數(shù)學上學期口算訓練 打印版
- 2025年益陽貨運從業(yè)資格證模擬考試保過版
- 2025年貴陽貨運從業(yè)資格證考試模擬考試題庫答案解析
- 疼痛管理服務合同(2篇)
- 新高考2024屆高三物理二輪復習策略講座
- 中考英語必背單詞匯總手冊(打印版)
- IATF-16949:2016質量管理體系培訓講義
- 記賬憑證封面直接打印模板
- 北京房地產(chǎn)典當合同
- 全世界各國的新年風俗
- 公開招標文件范本
- 第三單元為生活增添情趣第1課插花課件
- 教育的目的主題班會ppt
- 兒童歌曲彈唱課程標準
- 大學生心理健康教育全套PPT完整教學課件
評論
0/150
提交評論