Thiếtkế giao diện

Một phần của tài liệu CÔNG TY TNHH PHẦN MÊM TRÍ TUỆ ISOFTCO VÀ ĐỀ TÀI NGHIÊN CỨU (Trang 75 - 103)

* Form giao diện chớnh

*Form danh mục phũng ban

*Tỡm kiếm nhõn viờn

KẾT LUẬN

Nguồn lực trong một tổ chức doanh nghiệp là một trong những nguồn lực quan trọng và tốn kộm nhất. Đi kốm với sự phỏt triển của tổ chức, số lượng cỏn bộ cụng nhõn viờn ngày càng tăng cụng tỏc quản lý nhõn sự sẽ gạp phải những khú khăn trong cụng tỏc quản lý như tra cứu hồ sơ, lý lịch CBCNV, cụng tỏc tuyển dụng thờm lao động, cỏc phụ cấp, trợ cấp… Một phần mờm quản lý nhõn sự tốt sẽ giỳp cho tổ chức quản ly nhõn sự của mỡnh một cỏch dễ dàng. Với hệ thống cỏc bỏo cỏo của phần mềm sẽ đỏp ứng nhanh nhất cỏc thụng tin về nhõn sự hỗ trợ trưởng phũng, nhà quản lý, ban giỏm đốc những quyết định chớnh xỏc nhất, nhanh nhất về cụng tỏc nhõn sự của Tổ chức.

Đề tài “Xõy dựng phần mềm quản lý Nhõn sự tại cụng ty TNHH phần mềm trớ tuệ ISOFTCO” đó đạt được một số kết quả như sau:

- Tỡm hiểu về quỏ trỡnh hỡnh thành phỏt triển của cụng ty TNHH phần mềm trớ tuệ ISOFTCO, tỡm hiểu những đũi hỏi, yờu cầu, tớnh cấp thiết cũng như cỏc tớnh năng cần cú của phần mờm QLNS.

- Áp dụng những kiến thức cơ bản của hệ thống thụng tin quản lý cũng như cụng cụ phỏt triển phần mềm để xõy dựng đề tài.

- Phõn tớch một cỏch chi tiết cỏc yờu cầu của cụng ty TNHH phần mềm trớ tuệ ISOFTCO cũng như đũi hỏi về chức năng của phần mềm. Thiết kế vật lý, chi tiết, thiết kế giao diện, thiết kế dữ liệu, thiết kế giải thuật đảm bảo cho tớnh bền vững của hệ thống. Trờn cơ sở đú kết hợp với cỏc cụng cụ phỏt triển phần mềm là ngụn ngữ lập trỡnh Visual Basic 6.0 , cơ sở dữ liệu Microsoft Access tạo nờn một phần mềm hoàn chỉnh cú tớnh ứng dựng trong thực tế.

Giỳp cho quỏ trỡnh quản lý nhõn sự tại Cụng ty TNHH phần mờm trớ tuệ ISOFTCO trở nờn dễ dàng gọn nhẹ, đỏp ứng cỏc yờu cầu thực tế về nhõn sự.

Một lần nữa em xin chõn thành cảm ơn TS Đặng Quế Vinh đó hướng dẫn, đồng thời cũng xin chõn thành cảm ơn sự giỳp đỡ nhiệt tỡnh từ phớa cụng ty TNHH phần mềm trớ tuệ ISOFTCO mà đặc biệt là ban lónh đạo và phũng kĩ thuật của cụng ty trong suốt

thời gian em đến thực tập. Những sự giỳp đỡ, hướng dẫn nhiệt tỡnh đó giỳp em hoàn thành phần mềm cũng như mục tiờu của khúa thực tập. Tuy vậy trong quỏ trỡnh thực tập cũng như viết đề tài em khụng trỏnh khỏi những sai sút. Em rất mong được nhự gúp ý từ cụng ty cũng như giỏo viờn hướng dẫn để ngày càng hoàn thiện hơn.

Hà Nội, ngày 06 thỏng 05 năm 2009 Sinh viờn: Đặng Thanh Bỡnh

Lớp : Tin học kinh tế 47B- Khoa tin học kinh tế Trường : ĐH Kinh tế Quốc dõn

Danh mục tài liệu tham khảo

1. “ Hệ thống thụng tin quản lý” Ts Trương Văn Tỳ – Ts Trần Thị Song Minh 2. “ Cấu trỳc dữ liệu và giải thuật” PGS TS Hàn Viết Thuận

3. “Cơ sở dữ liệu 1” Ths Trần Cụng Uẩn

4. “ Giỏo trỡnh Kỹ thuật lập trỡnh 1” Ts Đặng Quế Vinh

5. “Bài giảng cụng nghệ phần mềm ” PGS TS Hàn Viết Thuận 6. “Bài giảng lập trỡnh trong quản lý” Ths Trịnh Hoài Sơn

Phụ lục

Một số đoạn mó chương trỡnh tiờu biểu

Global cn As New ADODB.Connection

Public Sub Main()

Set cn = New ADODB.Connection With cn

.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Database\QLNS.mdb;Persist Security Info=False"

.Open End With End Sub

Option Explicit

Dim strbang As String

Dim strtruongdulieu As String Dim strften As String

Private Sub Hienthithongtin()

If lstdanhmuc.ListIndex = 0 Then Label1.Caption = "Mã bằng :" Label2.Caption = "Tên bằng :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_bangcap" Call Toanbobangcap txtma.MaxLength = 2 (adsbygoogle = window.adsbygoogle || []).push({});

lvwchitiet.ColumnHeaders.Clear strbang = "hr_chucvu"

txtma.MaxLength = 3 Call Toanbochucvu

ElseIf lstdanhmuc.ListIndex = 2 Then Label1.Caption = "Mã CN :" Label2.Caption = "Tên ngành :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_chuyennganh" txtma.MaxLength = 2 Call Toanbochuyennganh

ElseIf lstdanhmuc.ListIndex = 3 Then Label1.Caption = "Mã DV :"

Label2.Caption = "Tên đơn vị :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_donvi"

txtma.MaxLength = 3 Call Toanbodonvi

ElseIf lstdanhmuc.ListIndex = 4 Then Label1.Caption = "Mã DT :"

Label2.Caption = "Tên dân tộc :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_dantoc"

txtma.MaxLength = 2 Call Toanbodantoc

ElseIf lstdanhmuc.ListIndex = 5 Then Label1.Caption = "Mã CV :"

Label2.Caption = "Nội dung :" lvwchitiet.ColumnHeaders.Clear

strbang = "hr_congviec" txtma.MaxLength = 2 Call Toanbocongviec

ElseIf lstdanhmuc.ListIndex = 6 Then Label1.Caption = "Mã tỉnh :" Label2.Caption = "Tên tỉnh :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_tinh" txtma.MaxLength = 2 Call Toanbotinhthanh

ElseIf lstdanhmuc.ListIndex = 7 Then Label1.Caption = "Mã QG :"

Label2.Caption = "Tên quốc gia :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_quocgia"

txtma.MaxLength = 2 Call Toanboquocgia

ElseIf lstdanhmuc.ListIndex = 8 Then Label1.Caption = "Mã QH :"

Label2.Caption = "Tên quan hệ :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_quanhe"

txtma.MaxLength = 2 Call Toanboquanhe

ElseIf lstdanhmuc.ListIndex = 9 Then Label1.Caption = "Mã HD :"

Label2.Caption = "Tên hợp đồng :" lvwchitiet.ColumnHeaders.Clear

txtma.MaxLength = 2 Call Toanbohopdong

ElseIf lstdanhmuc.ListIndex = 10 Then Label1.Caption = "Mã TG :"

Label2.Caption = "Tên tôn giáo :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_tongiao"

txtma.MaxLength = 2 Call Toanbotongiao

ElseIf lstdanhmuc.ListIndex = 11 Then Label1.Caption = "Mã NN :"

Label2.Caption = "Tên ngoại ngữ :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_ngoaingu"

txtma.MaxLength = 2 Call Toanbongoaingu

ElseIf lstdanhmuc.ListIndex = 12 Then Label1.Caption = "Mã HV :" Label2.Caption = "Tên học vấn :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_hocvan" txtma.MaxLength = 2 Call Toanbohocvan

ElseIf lstdanhmuc.ListIndex = 13 Then Label1.Caption = "Mã HV :" (adsbygoogle = window.adsbygoogle || []).push({});

Label2.Caption = "Tên học vị :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_hocvi"

Call Toanbohocvi

ElseIf lstdanhmuc.ListIndex = 14 Then Label1.Caption = "Mã ND :" Label2.Caption = "Tên nghề đến :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_ngheden" txtma.MaxLength = 2 Call Toanbonghekhiden

ElseIf lstdanhmuc.ListIndex = 15 Then Label1.Caption = "Mã TPBT :" Label2.Caption = "Thành phần BT :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_tpbt" txtma.MaxLength = 2 Call Toanbothanhphanbanthan ElseIf lstdanhmuc.ListIndex = 16 Then Label1.Caption = "Mã TPXT :" Label2.Caption = "Thành phần XT :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_tpxt" txtma.MaxLength = 2 Call Toanbothanhphanxuatthan ElseIf lstdanhmuc.ListIndex = 17 Then Label1.Caption = "Mã NN :"

Label2.Caption = "Trình độ NN :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_trinhdonn"

ElseIf lstdanhmuc.ListIndex = 18 Then Label1.Caption = "Mã VT :" Label2.Caption = "Trình độ VT :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_trinhdovt" txtma.MaxLength = 2 Call Toanbotrinhdovitinh

ElseIf lstdanhmuc.ListIndex = 19 Then Label1.Caption = "Lý do :" Label2.Caption = "Tên lý do :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_lydonghi" txtma.MaxLength = 2 Call Toanbolydonghi

ElseIf lstdanhmuc.ListIndex = 20 Then Label1.Caption = "Mã GDCS :" Label2.Caption = "Ghi chú :" lvwchitiet.ColumnHeaders.Clear strbang = "hr_gdcs" txtma.MaxLength = 2 Call Toanbogiadinhchinhsach

ElseIf lstdanhmuc.ListIndex = 21 Then Label1.Caption = "Mã TD" Label2.Caption = "Tên trình độ :" lvwchitiet.ColumnHeaders.Clear strbang = "HR_Trinhdo" txtma.MaxLength = 4 Call Toanbotrinhdo End If

End Sub

Private Sub cmdluu_Click()

If cmdluu.Caption = "Lu" Then

If txtten.text = "" Or txtma.text = "" Then

MsgBox "Bạn phải nhập đầy đủ thông tin trớc khi lu", vbExclamation, "Luu" Else lvwchitiet.ColumnHeaders.Clear Call Nhapthemgiatri Call Capnhatdanhsach frmMain.Capnhattoanbodulieu Editstate (NotEditing) txtma.text = "" txtten.text = "" End If Else If txtten.text = "" Then

MsgBox "Bạn phải nhập tên trớc khi lu", vbExclamation, "Luu" Else lvwchitiet.ColumnHeaders.Clear Call Capnhatdulieu Call Capnhatdanhsach frmMain.Capnhattoanbodulieu Editstate (NotEditing) cmdluu.Caption = "Lu" txtma.text = "" txtten.text = "" End If

End Sub

Private Sub cmdsua_Click()

If txtma.text = "" Then

MsgBox "Bạn phải chọn trớc khi sửa chữa thông tin", vbExclamation, "Thong bao" Else Editstate (Editing) cmdluu.Caption = "Cập nhật" txtma.Enabled = False End If End Sub

Private Sub cmdthem_Click()

If cmdthem.Caption = "Thêm" Then Editstate (Editing) txtma.text = "" txtten.text = "" txtma.SetFocus Else cmdluu.Caption = "Lu" Editstate (NotEditing) txtma.text = "" txtten.text = "" End If End Sub

Private Sub cmdthoat_Click()

End Sub

Private Sub cmdxoa_Click()

Dim m As Integer If txtma.text = "" Then

MsgBox "Bạn phải lựa chọn trớc khi xoá", vbExclamation, "Xoa" Else

m = MsgBox("Bạn có chắc chắn muốn xoá mã số " & "'" & lvwchitiet.SelectedItem & "'" & " trong danh mục " & "'" & lstdanhmuc.text & "'" & " không ?", vbQuestion + vbYesNo, "Xoa")

If m = vbYes Then lvwchitiet.ColumnHeaders.Clear Call Xoadulieu Call Capnhatdanhsach frmMain.Capnhattoanbodulieu Editstate (NotEditing) txtma.text = "" txtten.text = "" Else Exit Sub End If End If End Sub

Private Sub Nhapthemgiatri()

On Error GoTo HandleErrors Dim strthem As String (adsbygoogle = window.adsbygoogle || []).push({});

strthem = "insert into " & strbang & " values (" & "'" & txtma.text & "','" & txtten & "')" ExecuteSQL (strthem) mconCurrent.Close Exit Sub HandleErrors:

MsgBox "Đã có lỗi xảy ra bạn hãy xem lại trớc khi lu", vbCritical, "Loi" End Sub

Private Sub Capnhatdulieu()

On Error GoTo HandleErrors Dim strcapnhat As String

strcapnhat = "Update " & strbang & " set " & _

strften & "=" & "'" & txtten.text & "'" & " where " & strtruongdulieu & " = " & "'" & txtma.text & "'"

ExecuteSQL (strcapnhat) mconCurrent.Close Exit Sub

HandleErrors:

MsgBox "Đã có lỗi xảy ra bạn hãy xem lại trớc khi lu", vbCritical, "Loi" End Sub

Private Sub Thongtinchietiet()

On Error GoTo HandleErrors Dim strchietiet As String

strchietiet = "select * from " & strbang & " where " & strtruongdulieu & "=" & "'" & CStr(lvwchitiet.SelectedItem) & "'"

OpenSQL (strchietiet)

txtten.text = "" & mrstCurrent(1) & "" mconCurrent.Close Exit Sub HandleErrors: On Error GoTo 0 End Sub

Private Sub lvwchitiet_Click()

Call Luachontruongdulieu Call Thongtinchietiet End Sub

Private Sub Luachontruongdulieu()

If lstdanhmuc.ListIndex = 0 Then strtruongdulieu = "Mabang" strften = "tenbang"

ElseIf lstdanhmuc.ListIndex = 1 Then strtruongdulieu = "Machucvu" strften = "tenchucvu"

ElseIf lstdanhmuc.ListIndex = 2 Then strtruongdulieu = "ma_cn"

strften = "tennganh"

ElseIf lstdanhmuc.ListIndex = 3 Then strtruongdulieu = "Madv"

strften = "tendv"

ElseIf lstdanhmuc.ListIndex = 4 Then strtruongdulieu = "Madt"

ElseIf lstdanhmuc.ListIndex = 5 Then strtruongdulieu = "macv"

strften = "noidung"

ElseIf lstdanhmuc.ListIndex = 6 Then strtruongdulieu = "matinh"

strften = "tentinh"

ElseIf lstdanhmuc.ListIndex = 7 Then strtruongdulieu = "maqg"

strften = "tenqg" (adsbygoogle = window.adsbygoogle || []).push({});

ElseIf lstdanhmuc.ListIndex = 8 Then strtruongdulieu = "maqh"

strften = "tenqh"

ElseIf lstdanhmuc.ListIndex = 9 Then strtruongdulieu = "mahd"

strften = "tenhd"

ElseIf lstdanhmuc.ListIndex = 10 Then strtruongdulieu = "matgiao"

strften = "tentgiao"

ElseIf lstdanhmuc.ListIndex = 11 Then strtruongdulieu = "mann"

strften = "tennn"

ElseIf lstdanhmuc.ListIndex = 12 Then strtruongdulieu = "mahvan"

strften = "tenhvan"

ElseIf lstdanhmuc.ListIndex = 13 Then strtruongdulieu = "mahocvi"

strften = "tenhocvi"

ElseIf lstdanhmuc.ListIndex = 14 Then strtruongdulieu = "mangheden"

strften = "ngheden"

ElseIf lstdanhmuc.ListIndex = 15 Then strtruongdulieu = "matpbt"

strften = "thanhphanbt"

ElseIf lstdanhmuc.ListIndex = 16 Then strtruongdulieu = "matpxt"

strften = "thanhphanxt"

ElseIf lstdanhmuc.ListIndex = 17 Then strtruongdulieu = "matrinhdonn" strften = "tentrinhdonn"

ElseIf lstdanhmuc.ListIndex = 18 Then strtruongdulieu = "mavitinh"

strften = "tentdvt"

ElseIf lstdanhmuc.ListIndex = 19 Then strtruongdulieu = "lydo"

strften = "tenlydo"

ElseIf lstdanhmuc.ListIndex = 20 Then strtruongdulieu = "maGDCS"

strften = "ghichu"

ElseIf lstdanhmuc.ListIndex = 21 Then strtruongdulieu = "Matrinhdo" strften = "tentrinhdo"

End If End Sub

Private Sub Xoadulieu()

On Error GoTo HandleErrors Dim strxoa As String

strxoa = "Delete from " & strbang & " where " & strtruongdulieu & "=" & "'" & txtma.text & "'" ExecuteSQL (strxoa) mconCurrent.Close Exit Sub HandleErrors: (adsbygoogle = window.adsbygoogle || []).push({});

MsgBox "Đã có lỗi xảy ra bạn hãy xem lại trớc khi lu", vbCritical, "Loi" End Sub

Private Sub Capnhatdanhsach()

If lstdanhmuc.ListIndex = 0 Then Call Toanbobangcap

ElseIf lstdanhmuc.ListIndex = 1 Then Call Toanbochucvu

ElseIf lstdanhmuc.ListIndex = 2 Then Call Toanbochuyennganh

ElseIf lstdanhmuc.ListIndex = 3 Then Call Toanbodonvi

ElseIf lstdanhmuc.ListIndex = 4 Then Call Toanbodantoc

ElseIf lstdanhmuc.ListIndex = 5 Then Call Toanbocongviec

ElseIf lstdanhmuc.ListIndex = 6 Then Call Toanbotinhthanh

ElseIf lstdanhmuc.ListIndex = 7 Then Call Toanboquocgia

ElseIf lstdanhmuc.ListIndex = 8 Then Call Toanboquanhe

Call Toanbohopdong

ElseIf lstdanhmuc.ListIndex = 10 Then Call Toanbotongiao

ElseIf lstdanhmuc.ListIndex = 11 Then Call Toanbongoaingu

ElseIf lstdanhmuc.ListIndex = 12 Then Call Toanbohocvan

ElseIf lstdanhmuc.ListIndex = 13 Then Call Toanbohocvi

ElseIf lstdanhmuc.ListIndex = 14 Then Call Toanbonghekhiden

ElseIf lstdanhmuc.ListIndex = 15 Then Call Toanbothanhphanbanthan ElseIf lstdanhmuc.ListIndex = 16 Then Call Toanbothanhphanxuatthan ElseIf lstdanhmuc.ListIndex = 17 Then Call Toanbotrinhdongoaingu

ElseIf lstdanhmuc.ListIndex = 18 Then Call Toanbotrinhdovitinh

ElseIf lstdanhmuc.ListIndex = 19 Then Call Toanbolydonghi

ElseIf lstdanhmuc.ListIndex = 20 Then Call Toanbogiadinhchinhsach

ElseIf lstdanhmuc.ListIndex = 21 Then Call Toanbotrinhdo

End If End Sub

Dim lanTC As Byte

Private Sub cmdcancel_Click()

End End Sub

Private Sub cbousername_Change()

Call Luachonquyentruycap End Sub

Private Sub cbousername_Click() Call Luachonquyentruycap End Sub

Private Sub cmdok_Click() (adsbygoogle = window.adsbygoogle || []).push({});

Dim err_name As String lanTC = lanTC + 1 If lanTC < 3 Then ConnectDatabase Set rsPL = Nothing

rsPL.Open "Select * From HR_TruycapHS Where TenTC='" & cbousername.text & "'", mconCurrent, adOpenKeyset, adLockOptimistic

If rsPL.RecordCount > 0 Then

If Not IsNull(rsPL.Fields("Matkhau")) Then

If rsPL.Fields("Matkhau") = txtPassword.text Then Ok = True Else

If txtPassword.text = "" Then Ok = True End If

Ok = False End If

If Ok = False Then

MsgBox "Tên đăng nhập hoặc mật khẩu không chính xác. Xin vui lòng nhập lại", vbInformation + vbOKOnly, "Error"

txtPassword.SetFocus SendKeys "{home}+{end}" Exit Sub

End If Else

MsgBox "Bạn đã nhập sai quá 3 lần. Chơng trình sẽ tự động kết thúc", vbInformation, "Thoat" End End If If Ok = True Then Ok = False strusername = cbousername.text Unload Me MDI.Show End If End Sub

Private Sub cmdthoat_Click() End

End Sub

Private Sub Form_Load()

cbousername.ListIndex = 0 Exit Sub

HandleErrors: On Error GoTo 0 End Sub

Private Sub txtPassword_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmdok_Click

End Sub

Private Sub txtUserName_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmdok_Click

End Sub

Private Sub Luachonquyentruycap()

On Error GoTo HandleErrors Dim strdn As String

strdn = "select quyen from TRUYCAP where tentc=" & "'" & cbousername.text & "'" OpenSQL (strdn) strpermission = mrstCurrent("quyen") mconCurrent.Close Exit Sub HandleErrors: On Error GoTo 0 End Sub

Private Sub Toanbonguoidangnhap()

On Error GoTo HandleErrors Dim strdn As String

strdn = "select * from hr_truycaphs" OpenSQL (strdn)

cbousername.Clear Do Until mrstCurrent.EOF cbousername.AddItem mrstCurrent("Tentc") mrstCurrent.MoveNext Loop mconCurrent.Close Exit Sub HandleErrors: On Error GoTo 0 End Sub

Private Sub Timer1_Timer()

Label3.Caption = " Chào mừng bạn đến với chơng trình quản lý nhân sự" End Sub (adsbygoogle = window.adsbygoogle || []).push({});

Private Sub Timer2_Timer()

Label3.Caption = " Hãy đăng nhập để vào hệ thống " End Sub

Một phần của tài liệu CÔNG TY TNHH PHẦN MÊM TRÍ TUỆ ISOFTCO VÀ ĐỀ TÀI NGHIÊN CỨU (Trang 75 - 103)