Shiva Li
Shiva Li
Shiva Li
Guide:
Submitted By:
SUBMITTED TO
Candidates Monika REGD No: KA1202PGR0009 2. Project Title: LEAVE RECORD MANAGEMENT SYSTEM. 1. 3. Software Base: Visual Basic.Net & Ms Access (Os Support Windows XP) 4. Submitted for course and year: PGDCA 2 SEMESTER Year 2013. 5. Forwading by Head of Study Center.. (Signature, Name & Study Center Seal) Remarks of Study Center:......
PROJECT REPORT
............................................................................................ 6. University Project Examiner Evaluation. Total Marks Awarded......Out of 00. Detail of Evaluation along with Name & Sign of University Examiner Particular Marks Out Of Marks Awarded External Examiners Name & Signature
INDEX
SR.N O
1. 2 3. 4. 5. 6. 7. 8. 9. 10. 11. 12 13 14 15 16 17 18. 19 20
CONTENTS ACKNOWLEDGEMENT CERTIFICATE SELF CERTIFICATE SYNOPHSIS OF PROJECT OBJECTIVE OF THE PROJECT STATEMENTS ABOUT THE PROBLEM WHY IS THE PARTICULAR TOPIC CHOSEN CONCLUSION FRONT END VISUAL BASIC.NET BACK END ORACLE A GLANCE AT VISUAL VASIC.NET WHY WE PREFER VISUAL VASIC.NET ADVANTAGE OF VISUAL PROGRAMMING DISADVANTAGE OF VISUAL PROGRAMMING HARDWARE AND SOFTWARE USED SYMBOLS USED IN FLOW CHART DATAFLOW DIAGRAM(DFD) ENTITY RELATIONSHIP DIAGRAM FLOW CHARTS AND DFDS WELCOME FORM LEAVE RECORD MANAGEMENT SYSTEM
PAGE NO
5 6 7 8 9 10 11 12 13-14 15-16 17 18 19 20 21 22 23 24 26-33 34 2
PROJECT REPORT
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
41 42
LOGIN FORM CHANGE PASSWORD MDI FORM EMPLOYEE RECORD FORM LEAVE RECORD FORM HALFPAY LEAVE FORM SEARCH FORM EMPLOYEE REPORT LEAVE REPORT HALFPAY LEAVE REPORT CODING OF MODULE CODING OF WELCOME FORM CODING OF LOGIN FORM CODING OF CHANGE PASSWORD CODING OF MDI FORM CODING OF EMPLOYEE RECORD FORM CODING OF LEAVE RECORD FORM CODING OF HALFPAY RECORD FORM DATABASE DATABASE SUMMARY: I. EMPLOYEE RECORD II. LEAVE RECORD III. HALFPAY RECORD IV. LOGIN FORM SYSTEM ANYLISIS AND TESTING
Bibliography
71-74 75
PROJECT REPORT
ACKNOWLEDGEMENT
As we all know that when ever we are going to do something new we have to face many obstacles and of course many new experiences too. To introduce a new thing is not an easy task for anybody. We pay my gratitude to the management for their wholehearted co-operation and guidance to make this Project. We wish to acknowledge my deep sense of gratitude and personal regards to our Project Guide MISS SIMPLE for his valuable guidance in the completion of our project. We feel great pleasure in presenting this project on LEAVE RECORD
MANAGEMENT SYSTEM We have applied my concentration, alteration, attention and best efforts to present this project in simplest way.
PROJECT REPORT
CERTIFICATE
This is to certify that the project entitled LEAVE RECORD MANGEMENT SYSTEM Submitted in the partial fulfillment of the PGDCA to the NATIONAL INSTITUTE OF ELECTRONIC AND INFORMATION TECHNOLOGY 1. , through HIPA done by Monika
REGD No: KA1202PGR0009 2. Ashish KUmar REGD No: KA1202PGR0005 3. Rakesh kumar REGD No: KA1202PGR0014 4. Pradeep kumar REGD No: KA1202PGR0036 5. Kuldeep Kumar REGD No: KA1202PGR0007 6. Praveen Kumar REGD No: KA1202PGR0034
is an authentic work carried out by them under my Guidance. To the best of my knowledge and belief, this work has not been submitted for award of any other degree or diploma.
2. Ashish Kumar_________________ 3. Rakesh kumar_________________ 4. Pradeep kumar_________________ 5. Kuldeep Kumar_________________ 6. Praveen Kumar_________________
(MISS. SIMPLE)
PROJECT REPORT
Submitted By:
Monika REGD No:
SUBMITTED TO
NATIONAL INSTITUTE OF ELECTRONIC AND INFORMATION TECHNOLOGY
PROJECT REPORT
STUDY CENTRE
HIPA(NIELIT), DHARAMSHALA
PROJECT REPORT
related tasks like Registration of new employee, maintains leave record etc. This will lead to increase in the efficiency of the staff member. This project is user friendly so that anyone can use it with little knowledge of computer. The project will reduce the tedious job of the paper work by keeping all the details of employees stored in the form of database in computers hard disk. Up-to-date information of the employees can be provided to the high authority within minutes.
PROJECT REPORT
1. The manual system consumes a lot of time in paper work, a number of registers have to be consulted this is the main cause of delay. The process is further slowed down by the mistake in typing, entering information into the registers etc. 2. Mistakes are often made during calculations. Numeric calculations like the calculation of salary, leave record, quite often results in mistakes. 3. In order to answer query, one has to consult voluminous registers, which result in the wastage of time. If the query involves the consultation of multiple registers it result in lots of confusion, as the required information cannot be zeroed properly. The registers are quite often transferred form one place to another, which results in damage to the registers and the subsequent loss. 4. The registers call for enormous work in terms searching and sorting whenever information regarding a leaves data is to be added or modified.
PROJECT REPORT
10
PROJECT REPORT
CONCLUSION
Implementation of LEAVE RECORD MANAGEMENT SYSTEM will help the department/organization to retrieve and updates information and leave record easily. It will also help the department in maintaining error free and up to date information with automatics checks and calculation. It will also help to generate quick, up to date and error free reports which in turns helps the organization to make quick and effective decisions. It will also provide user friendly interface, which will help to enter data quickly and efficiently with no errors. This application has been developed using the approach of software engineering. There are various modules in the application and if any modifications are needed in any module they can be incorporated without affecting the other modules.
11
PROJECT REPORT
PROJECT REPORT
control does, ADO generally write more program code than you would with the data control, you can write code that accesses the various data control methods, ADO enable you to control data access in much stricter way than the data control. In some cases, however, we want to be able to store a few lines of text to a file or read a few numbers from a binary file. Setting up an entire database is an over skill in these situations. Its much simpler to create a file, store the information there, and recall it as needed.
13
PROJECT REPORT
14
PROJECT REPORT
15
PROJECT REPORT
Queries
To find and retrieve just the data that meets conditions that you specify, including data from multiple tables, create a query. A query can also update or delete multiple records at the same time, and perform predefined or custom calculation on your data. About designing a database Good database design ensures that your database is easy to maintain. You store data in tables and each table contains data about only one subject, such as customers. Therefore, you update a particular piece of data, such as an address, in just one place and that change automatically appears throughout the database. A well designed database usually contains different types of queries that show the information you need. A query might show a subset of data, such as all customers in Delhi or combinations of data from different tables, such as order information combined with customer information.
16
PROJECT REPORT
17
PROJECT REPORT
Visual Programming:
Visual Programming aims at providing the user with an interface that is intuitive and easy-to-use. In developing such an interface, the programmer employs user-friendly features such as windows, menus, buttons and list boxes. A visual programming environment provides all features that are required to develop a graphical user interface as ready-to-use components. The programmer does not have to write code to create and display commonly required user-friendly features each time around.
18
PROJECT REPORT
5.
The interface components provided by the visual programming environment have some code built into them.
6.
The programmer can create the user interface visually he can align, move or size the components as required without having to resort to writing code.
19
PROJECT REPORT
2.
Visual development environment require computers of a highs configuration in comparison to the conventional programming tools. Larger capacity hard disk More RAM Faster Processor
3.
Primarily, visual development environment can be used only with GUI operating systems such as windows.
Events: A major part of the interactions between people in every day life is in the form of events and responses to events. An event is any action directed at the application. An event driven application operates by responding to the user events. The ability to recognize events is built into an interface component. The events that an interface component recognizes are different for each type of component.
20
PROJECT REPORT
Software Requirement: Front End Language:-Visual Basic.Net. Back End:-MS ACCESS. Windows XP.
21
PROJECT REPORT
22
PROJECT REPORT
23
PROJECT REPORT
which is a part of solution. They are constructed by special symbols. Arrows to obtain a complete flowchart join the symbols
24
PROJECT REPORT
The Symbol Is Used For Decision Making. Used to document points in the program with a branch to alternative paths is possible.
Terminal use to point the End and Beginning or to point the interruption in a program.
25
PROJECT REPORT
Data Flow Diagram (DFD): Data Flow Diagram is another tool use to describe the design specification. It is also a Pictorial representation of data flow. The only difference between Flowchart and the Data Flow Diagram is that DFD show only the flow of data not the actual procedure or coding to perform that function. On the other hand Flowchart Show the actual calculation to perform the task.
Describe the Source and Destination of data or information. The Source Must is written in capital letters. A Circle used to show the Process. These can be number of process in a program. Each process must be assign a suitable number
Arrow Used to shoe the flow of Data . A DFD can be drawn from top to bottom or from left to right
26
PROJECT REPORT
Rectangle Ellipses Diamonds Lines Double Ellipses Double lines Doubles Rectangles Dashed ellipses
: Represent the entity sets : Represent the attributes : Represent the relationship sets : Link attributes to entity sets and entity sets to relationship sets. : Represent multi values attributes : Indicate total participation of an entity in a relationship sets. : Represent week entity sets. : Denote derived attributes.
Entities
An entity is an object that is of to interest to an organization. Objects of similar type characterized by the same set of attributes of properties. Such similar objects from an entity set or entity type. Objects are represented by their attributes.
27
PROJECT REPORT
add
loc
employee
Registere d for
department
Maintain s
leaves
Leaves taken
balance Leaves
28
PROJECT REPORT
29
PROJECT REPORT
System User
Login Process
30
PROJECT REPORT
To save the record the user must enter the data to required fields Then Click the save button. If any fields are blank the Visual Basic.Net displays the information message.
USER
leave
31
PROJECT REPORT
START
Yes
EXIT
32
PROJECT REPORT
(Example)
USER_INFO
DATABASE
33
PROJECT REPORT
DATABASE FILE
START
DATABASE FILE
34
PROJECT REPORT
Yes
EXIT
35
PROJECT REPORT
DESIGING OF FORM
36
PROJECT REPORT
WELCOME FORM
CLICK HERE TO START PROJECT: CLICK ON THIS LINK LABLE TO START THE
PROJECT.
CLICK HERE TO START PROJECT: CLICK ON THIS LINK LABLE TO EXIT FROM
THE PROJECT
37
PROJECT REPORT
LOGIN FORM
OK:-OK BUTTON IS USED TO ENTER THE SYSTEM CANCEL:-CANCEL BUTTON IS USED TO EXIT FROM THE SYSTEM
38
PROJECT REPORT
OK:-OK BUTTON IS USED TO CHANGE THE PASSWORD. CANCEL:-CANCEL BUTTON IS USED TO EXIT FROM THIS FORM.
39
PROJECT REPORT
MAIN FORM
THE MDI FORM
MDI STANDS FOR MULTIPLE DOCUMENT INTERFACES .IT HOLDS ALL THE CONTROL OF RUNNING PROJECT ITEM (SOFTWARE).IT IS JUST LIKE THE ORDINARY WINDOWS APPLICATION FORM, BUT A DIFFERENCE IS THERE WHEN ISMDICONTAINER PROPERTY OF ANY WINDOWS APPLICATION FORM IS COME TO TRUE, THEN THAT FORMS CONVERTS INTO MDI PARENT FORM.
40
PROJECT REPORT
THIS FORM IS USED HERE TO ENTER THE RECORD OF EMPLOYEE LIKE HIS/HER NAME, ADDRESS, SEXCODE, DOJ ETC.
SHOWDATA:-THIS BUTTON WILL SHOW THE DATA IN THE DATAGRIDBOX. SAVE:-THIS BUTTON IS USED TO SAVE THE RECORDS. SEARCH:-THIS BUTTON IS USED TO FIND THE RECORDS. DELETE:-THIS BUTTON IS USED TO DELETE THE RECORDS. MODIFY:-THIS BUTTON IS USED TO UPDATE/MODIFY THE RECORD. EXIT:-THIS BUTTON IS USED TO EXIT FROM THE CURRENT FORM.
41
PROJECT REPORT
THIS FORM IS USED TO ENTER THE LEAVE RECORD OF THE EMPLOYEES.IN THIS FORM IT IS SHOWN THAT HOW MANY LEAVES AND WHAT KIND OF LEAVE IS TAKEN BY THE EMPLOYEE.
SHOW:-THIS BUTTON WILL SHOW THE DATA IN THE DATAGRIDBOX. SAVE:-THIS BUTTON IS USED TO SAVE THE RECORDS. SEARCH:-THIS BUTTON IS USED TO FIND THE RECORDS. DELETE:-THIS BUTTON IS USED TO DELETE THE RECORDS. MODIFY:-THIS BUTTON IS USED TO UPDATE/MODIFY THE RECORD. EXIT:-THIS BUTTON IS USED TO EXIT FROM THE CURRENT FORM.
42
PROJECT REPORT
THIS IS HALFPAY LEAVE FORM.THIS FORM WILL SHOW HOW MANY HALFPAY LEAVES ARE GIVEN AND HOW MANY LEAVES ARE TAKEN.
SHOW:-THIS BUTTON WILL SHOW THE DATA IN THE DATAGRIDBOX. SAVE:-THIS BUTTON IS USED TO SAVE THE RECORDS. SEARCH:-THIS BUTTON IS USED TO FIND THE RECORDS. DELETE:-THIS BUTTON IS USED TO DELETE THE RECORDS. MODIFY:-THIS BUTTON IS USED TO UPDATE/MODIFY THE RECORD. CANCEL:-THIS BUTTON IS USED TO EXIT FROM THE CURRENT FORM.
43
PROJECT REPORT
SEARCH FORM
THIS IS THE SEARCH FORM IN THIS FORM SEARCHED ENTRIES WILL BE SHOWN.WHEN YOU WANT TO SEARCH SOME DATA THE DATA WILL BE SHOWN IN THE SEARCH FORM IN DATAGRID.
44
PROJECT REPORT
EMPLOYEE REPORT
45
PROJECT REPORT
LEAVE REPORT
46
PROJECT REPORT
47
PROJECT REPORT
CODING OF FORMS
48
PROJECT REPORT
CODING OF MODULE
Module Module2 Public con As New OracleClient.OracleConnection Public da As New OracleClient.OracleDataAdapter Public ds As New Data.DataSet Public com As New OracleClient.OracleCommand Public Command As String Function connection_open() On Error GoTo chkerr con = New OracleClient.OracleConnection con.ConnectionString = "user Id=leave1; password=leave" con.Open() Exit Function chkerr: MsgBox("Connection is not Establish" & Err.Description) End Function Function Save_Record(ByVal command) If con.State = ConnectionState.Closed Then con.Open() End If com = New OracleClient.OracleCommand(command, con) com.ExecuteNonQuery() End Function End Module
49
PROJECT REPORT
Private Sub WELCOME_FORM_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load connection_open() End Sub Private Sub LinkLabel2_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel2.LinkClicked End End Sub Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked Dim frm As New LOGIN_FORM frm.Show() Me.Hide() End Sub End Class
50
PROJECT REPORT
51
PROJECT REPORT
Private Sub LOGIN_FORM_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load connection_open() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Command = "select * from login" da = New OracleClient.OracleDataAdapter(Command, con) ds = New Data.DataSet ' MsgBox("" & ds.GetXml) da.Fill(ds, "login") If TextBox1.Text = "" And TextBox2.Text = "" Then MsgBox("PLEASE ENTER OLD USERNAME AND PSSSWORD FIRST") ElseIf TextBox1.Text = ds.Tables("LOGIN").Rows(0).Item("USERNAME") And TextBox2.Text = ds.Tables("LOGIN").Rows(0).Item("PASSWORD") Then Dim FRM As New CHANGE_PASSWORD FRM.Show() Else MsgBox(" SORRY YOU CAN'T CHANGE PASSWORD")
End If
End Sub
52
PROJECT REPORT
53
PROJECT REPORT
54
PROJECT REPORT
Next
End While
frmcrv.CrystalReportViewer1.ReportSource = rep1 frmcrv.MdiParent = Me frmcrv.Show() End Sub Private Sub MenuItem13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem13.Click Dim NAME As String Dim ITEM As Integer Dim S_FORM As New SEARCH_FORM NAME = InputBox("Enter NAME of employee which you want to search") Command = "select * from EMP_RECORD where EMP_NAME='" & NAME & "'" da = New OracleClient.OracleDataAdapter(Command, con) ds = New Data.DataSet da.Fill(ds, "EMP_RECORD") ITEM = ds.Tables("EMP_RECORD").Rows.Count MsgBox(" " & ITEM) If ITEM = 0 Then MsgBox("No Record is not found", MsgBoxStyle.Critical) Else S_FORM.DataGrid1.DataSource = ds.Tables("EMP_RECORD") S_FORM.MdiParent = Me S_FORM.Show() End If End Sub Private Sub MenuItem9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem9.Click Dim frmcrv As New REPORT 'Form1 on which we have Crystal Report Viewer Dim REP1 As New EMPREPORT Dim mytable As CrystalDecisions.CrystalReports.Engine.Table Dim mylogin As CrystalDecisions.Shared.TableLogOnInfo For Each mytable In rep1.Database.Tables() 'used if connects in more than one try While mytable.TestConnectivity = False Debug.Write(mytable.Name) mylogin = mytable.LogOnInfo mylogin.ConnectionInfo.ServerName = ""
55
PROJECT REPORT
frmcrv.CrystalReportViewer1.ReportSource = REP1 frmcrv.MdiParent = Me frmcrv.Show() End Sub Private Sub MenuItem11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem11.Click Dim frmcrv As New REPORT 'Form1 on which we have Crystal Report Viewer Dim rep1 As New HALFPAY_LEAVE_REPORT 'Report Dim mytable As CrystalDecisions.CrystalReports.Engine.Table Dim mylogin As CrystalDecisions.Shared.TableLogOnInfo
For Each mytable In rep1.Database.Tables() 'used if connects in more than one try While mytable.TestConnectivity = False Debug.Write(mytable.Name) mylogin = mytable.LogOnInfo mylogin.ConnectionInfo.ServerName = "" mylogin.ConnectionInfo.UserID = "leave1" mylogin.ConnectionInfo.Password = "leave" mytable.ApplyLogOnInfo(mylogin) Next End While
frmcrv.CrystalReportViewer1.ReportSource = rep1 frmcrv.MdiParent = Me frmcrv.Show() End Sub Private Sub MenuItem14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem14.Click Dim ID As Integer Dim ITEM As Integer Dim S_FORM As New SEARCH_FORM Name = InputBox("Enter ID of employee which you want to search")
56
PROJECT REPORT
Command = "select *from EMP_RECORD where emp_no=" & ID & "" da = New OracleClient.OracleDataAdapter(Command, con) ds = New Data.DataSet da.Fill(ds, "EMP_RECORD") ITEM = ds.Tables("EMP_RECORD").Rows.Count MsgBox(" " & ITEM) If ITEM = 0 Then MsgBox("No Record is not found", MsgBoxStyle.Critical) Else S_FORM.DataGrid1.DataSource = ds.Tables("EMP_RECORD") S_FORM.MdiParent = Me S_FORM.Show() End If End Sub Private Sub MenuItem15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem15.Click Dim ITEM As Integer Dim S_FORM As New SEARCH_FORM Command = "select * from EMP_RECORD" da = New OracleClient.OracleDataAdapter(Command, con) ds = New Data.DataSet da.Fill(ds, "EMP_RECORD") ITEM = ds.Tables("EMP_RECORD").Rows.Count MsgBox(" " & ITEM) If ITEM = 0 Then MsgBox("No Record is not found", MsgBoxStyle.Critical) Else S_FORM.DataGrid1.DataSource = ds.Tables("EMP_RECORD") S_FORM.MdiParent = Me S_FORM.Show() End If End Sub Private Sub MenuItem16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem16.Click Dim ITEM As Integer Dim NAME As String NAME = InputBox("ENTER NAME OF EMPLOYEE WHICH YOU WANT TO DELETE") Command = "DELETE from EMP_RECORD WHERE EMP_NAME='" & NAME & "'" Save_Record(Command) ITEM = ds.Tables("EMP_RECORD").Rows.Count MsgBox(" " & ITEM) If ITEM = 0 Then MsgBox("No, Record is not found", MsgBoxStyle.Critical) Else
57
PROJECT REPORT
MsgBox("RECORD IS DELETED SUCCESSFULLY", MsgBoxStyle.Information) End If End Sub Private Sub MenuItem17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem17.Click Dim ITEM As Integer Dim ID As Integer ID = InputBox("ENTER ID OF EMPLOYEE WHICH YOU WANT TO DELETE") Command = "DELETE from EMP_RECORD WHERE EMP_NAME=" & ID & "" Save_Record(Command) ITEM = ds.Tables("EMP_RECORD").Rows.Count MsgBox(" " & ITEM) If ITEM = 0 Then MsgBox("No, Record is not found", MsgBoxStyle.Critical) Else MsgBox("RECORD IS DELETED SUCCESSFULLY", MsgBoxStyle.Information) End If End Sub Private Sub MenuItem18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem18.Click Dim ITEM As Integer Command = "DELETE from EMP_RECORD" Save_Record(Command) ITEM = ds.Tables("EMP_RECORD").Rows.Count MsgBox(" " & ITEM) If ITEM = 0 Then MsgBox("No, Record is not found", MsgBoxStyle.Critical) Else MsgBox(" ALL RECORDS ARE DELETED SUCCESSFULLY", MsgBoxStyle.Information) End If End Sub End Class
58
PROJECT REPORT
59
PROJECT REPORT
= = = =
Catch MsgBox("" & Err.Description) End Try End Sub Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox1.Enter End Sub Private Sub But_del_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_del.Click Dim result As Integer result = InputBox("Please enter employee id which you want to delete") Command = "delete from emp_record where emp_no=" & result & "" Save_Record(Command) MsgBox("Record is deleted successfully")
End Sub Private Sub EMPLOYEE_RECORD_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load connection_open() Dim dsl As New DataSet connection_open() Dim i As Integer Command = "select * from emp_record" da = New OracleClient.OracleDataAdapter(Command, con) da.Fill(ds, "emp_record") i = ds.Tables("emp_record").Rows.Count If i = 0 Then TXT1.Text = 100 Else Command = "select max(emp_no)+1 from emp_record" da = New OracleClient.OracleDataAdapter(Command, con) da.Fill(dsl, "emp_record") TXT1.Text = dsl.Tables("emp_record").Rows(0).Item("max(emp_no)+1") End If End Sub Private Sub But_mod_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_mod.Click
60
PROJECT REPORT
"" Then
If TXT2.Text = "" Or TXT5.Text = "" Or TXT6.Text = "" Or TXT7.Text = MsgBox("Please fill all the field", MsgBoxStyle.YesNo) Exit Sub
Command = "update EMP_DOB= '" & DT1.Text & "' , EMP_SALARY =" & TXT5.Text & " TXT6.Text & "' ,EMP_PNO = " &
Else
EMP_RECORD set Emp_name='" & TXT2.Text & "', sex_code = '" & CB1.SelectedItem & "' , , Emp_DOJ='" & DT2.Text & "',EMP_ADD='" & TXT7.Text & " where Emp_NO= " & TXT1.Text & ""
Save_Record(Command) MsgBox("Record Modified ", MsgBoxStyle.Information, "Saved Information") End If End Sub Private Sub But_search_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_search.Click Dim ID As Integer Dim ITEM As Integer ID = InputBox("enter ID of employee which you want to search") Command = "select *from emp_record where emp_no=" & ID & "" da = New OracleClient.OracleDataAdapter(Command, con) ds = New Data.DataSet da.Fill(ds, "EMP_RECORD") ITEM = ds.Tables("emp_record").Rows.Count MsgBox(" " & ITEM) If ITEM = 0 Then MsgBox("No Record is not found", MsgBoxStyle.Critical) Else DataGrid1.DataSource = ds.Tables("emp_record") End If TXT1.Text = ds.Tables("emp_record").Rows(0).Item("Emp_No") TXT2.Text = ds.Tables("emp_record").Rows(0).Item("Emp_name") DT1.Text = ds.Tables("emp_record").Rows(0).Item("Emp_dob") CB1.Text = ds.Tables("emp_record").Rows(0).Item("sex_code") TXT5.Text = ds.Tables("emp_record").Rows(0).Item("emp_salary") DT2.Text = ds.Tables("emp_record").Rows(0).Item("Emp_doj") TXT6.Text = ds.Tables("emp_record").Rows(0).Item("Emp_add") TXT7.Text = ds.Tables("emp_record").Rows(0).Item("Emp_pno") End Sub Private Sub But_cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_cancel.Click Me.Hide() End Sub End Class
PROJECT REPORT
Private Sub But_show_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_show.Click Command = "select * from LEAVE " da = New OracleClient.OracleDataAdapter(Command, con) ds = New Data.DataSet da.Fill(ds, "LEAVE") DG1.DataSource = ds.Tables("LEAVE") If TXTNO.Text = ds.Tables("LEAVE").Rows(0).Item("EMP_NO") Then TXTDNO.Text = ds.Tables("LEAVE").Rows(0).Item("DEPT_NO") TXTNAME.Text = ds.Tables("LEAVE").Rows(0).Item("EMP_NAME") CB1.Text = ds.Tables("LEAVE").Rows(0).Item("LEAVE_TYPE") TXT_TL.Text = ds.Tables("LEAVE").Rows(0).Item("TOTAL_LEAVE") TXT_LT.Text = ds.Tables("LEAVE").Rows(0).Item("LEAVE_TAKEN") + ds.Tables("LEAVE").Rows(0).Item("LEAVE_REQUIRED") TXT_BAL.Text = ds.Tables("LEAVE").Rows(0).Item("TOTAL_LEAVE") ds.Tables("LEAVE").Rows(0).Item("LEAVE_TAKEN") ds.Tables("LEAVE").Rows(0).Item("LEAVE_REQUIRED") Else MsgBox("NO LEAVE RECORD IS FOUND") End If End Sub Private Sub But_save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_save.Click Command = "INSERT INTO LEAVE values(" & TXTNO.Text & "," & TXTDNO.Text & ",'" & TXTNAME.Text & "','" & CB1.SelectedItem & "'," & TXT_TL.Text & "," & TXT_LT.Text & "," & TXT_BAL.Text & "," & TXT_LR.Text & ",'" & DT1.Text & "','" & DT2.Text & "')" MsgBox("" & Err.Description) Save_Record(Command) MsgBox("RECORD IS SAVED", MsgBoxStyle.Information, "SAVE INFORMATION") TXTDNO.Text = "" TXTNAME.Text = "" TXT_TL.Text = "" TXT_LT.Text = "" TXT_BAL.Text = "" TXT_LR.Text = "" End Sub Private Sub But_del_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_del.Click Dim result As Integer result = InputBox("Please enter employee id which you want to delete") Command = "delete from LEAVE where emp_no=" & result & "" Save_Record(Command) MsgBox("Record is deleted successfully") End Sub
62
PROJECT REPORT
Private Sub But_search_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_search.Click Dim result As String result = InputBox("enter name which you want to search") Command = "select *from LEAVE where emp_name='" & result & "'" da = New OracleClient.OracleDataAdapter(Command, con) ds = New Data.DataSet da.Fill(ds, "LEAVE") DG1.DataSource = ds.Tables("LEAVE") End Sub Private Sub But_cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_cancel.Click Me.Hide() End Sub Private Sub LEAVE_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub TXT_LT_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TXT_LT.Leave TXT_BAL.Text = Val(TXT_TL.Text) - Val(TXT_LT.Text) End Sub Private Sub CB1_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles CB1.Leave Dim EMP As New EMPLOYEE_RECORD Dim DAY As New Date Dim CURRENT, DOJ As Integer Dim dd As Integer If CB1.SelectedIndex() = 0 Then TXT_TL.Text = 12 ElseIf CB1.SelectedIndex() = 1 Then TXT_TL.Text = 20 ElseIf CB1.SelectedIndex() = 2 Then TXT_TL.Text = 30 ElseIf CB1.SelectedIndex() = 6 Then TXT_TL.Text = 15 ElseIf CB1.SelectedIndex() = 5 Then TXT_TL.Text = 180 ElseIf CB1.SelectedIndex() = 4 Then DOJ = Val(EMP.DT2.Text) CURRENT = Val(DAY.Now) dd = CURRENT - DOJ If dd >= 2555 Then TXT_TL.Text = 730 Else MsgBox("Leave not Reconmended") End If
63
PROJECT REPORT
Else : Exit Sub End If End Sub Private Sub But_mod_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_mod.Click If TXTDNO.Text = "" Or TXTNAME.Text = "" Or TXT_TL.Text = "" Or TXT_LT.Text = "" Or TXT_BAL.Text = "" Then MsgBox("Please fill all the field", MsgBoxStyle.YesNo) Exit Sub Else Command = "update LEAVE set DEPT_NO=" & TXTDNO.Text & ", EMP_NAME= '" & TXTNAME.Text & "' , LEAVE_TYPE = '" & CB1.SelectedItem & "' , TOTAL_LEAVE =" & TXT_TL.Text & " , LEAVE_TAKEN=" & TXT_LT.Text & ",BALANCE=" & TXT_BAL.Text & ",LEAVE_REQUIRED=" & TXT_LR.Text & " , LT_FROM= '" & DT1.Text & "', LT_TO= '" & DT2.Text & "'where Emp_NO= " & TXTNO.Text & " " Save_Record(Command) MsgBox("Record Modified ", MsgBoxStyle.Information, "Saved Information") End If End Sub Private Sub CB1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles CB1.DoubleClick Dim FRM6 As New HALFPAY_LEAVE_RECORD If CB1.SelectedIndex() = 3 Then FRM6.Show() End If End Sub End Class
64
PROJECT REPORT
Private Sub HALFPAY_LEAVE_RECORD_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load connection_open() End Sub Private Sub But_save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_save.Click Command = "INSERT INTO half_pay values(" & TXTNO.Text & "," & TXTDNO.Text & ",'" & TXTNAME.Text & "'," & TXTSALARY.Text & "," & TXTHPL.Text & "," & TXTLT.Text & "," & TXTS_A_HPL.Text & ")" MsgBox("" & Err.Description) Save_Record(Command) MsgBox("RECORD IS SAVED", MsgBoxStyle.Information, "SAVE INFORMATION") TXTDNO.Text = "" TXTNAME.Text = "" TXTSALARY.Text = "" TXTHPL.Text = "" TXTLT.Text = "" TXTS_A_HPL.Text = "" Me.Hide() End Sub Private Sub But_show_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_show.Click Command = "select * from half_pay" da = New OracleClient.OracleDataAdapter(Command, con) ds = New Data.DataSet da.Fill(ds, "half_pay") DataGrid1.DataSource = ds.Tables("half_pay") End Sub Private Sub But_del_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_del.Click Dim result As Integer result = InputBox("Please enter employee id which you want to delete") Command = "delete from half_pay where emp_no=" & result & "" Save_Record(Command) MsgBox("Record is deleted successfully") End Sub Private Sub But_cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_cancel.Click Me.Hide() End Sub
65
PROJECT REPORT
Private Sub But_search_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_search.Click Dim result As String result = InputBox("enter name which you want to search") Command = "select *from half_pay where emp_name='" & result & "'" da = New OracleClient.OracleDataAdapter(Command, con) ds = New Data.DataSet da.Fill(ds, "half_pay") DataGrid1.DataSource = ds.Tables("half_pay") End Sub Private Sub But_mod_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_mod.Click If TXTDNO.Text = "" Or TXTNAME.Text = "" Or TXTSALARY.Text = "" Or TXTHPL.Text = "" Or TXTLT.Text = "" Or TXTS_A_HPL.Text = "" Then MsgBox("Please fill all the field", MsgBoxStyle.YesNo) Exit Sub Else Command = "update HALF_PAY set DEPT_NO=" & TXTDNO.Text & ", EMP_NAME= '" & TXTNAME.Text & "' , SALARY = '" & TXTSALARY.Text & "' , HALFPAY_LEAVE =" & TXTHPL.Text & " , LEAVE_TAKEN=" & TXTLT.Text & ",SALARY_AFTER_HPL=" & TXTS_A_HPL.Text & " where Emp_NO= " & TXTNO.Text & " " Save_Record(Command) MsgBox("Record Modified ", MsgBoxStyle.Information, "Saved Information") End If End Sub End Class
66
PROJECT REPORT
67
PROJECT REPORT
DATABASE
INTRODUCTION:
A DATABASE SYSTEM IS BASICALLY A COMPUTER BASED RECORD KEEPING SYSTEM. IT MAINTAINS ANY INFORMATION THAT MAY BE NECESSARY TO THE DECISION MAKING PROCESS. A DATABASE MAY ALSO BE DEFINED AS THE COLLECTION OF INTERRELATED DATA STORE TOGETHER TO SERVE MULTIPLE APPLICATIONS. THE DATA STORED SO THAT IT IS INDEPENDENT OF PROGRAMS WHICH USE THE DATA. A COMMON AND CONTROLLED APPROACH IS USED IN ADDING NEW DATA AND IN MODIFYING AND RETIEVING EXISTING DATA WITHIN DATABASE.
PURPOSE OF DATABASE:
A DATABASE SYSTEM SHOULD BE REPOSITORY WHICH IS NEEDED FOR AN ORGANIZATINS DATA PROCESSING.SOME OF THE ADVANTAGES OF THE DATABASE ARE:
68
PROJECT REPORT
DATABASE SUMMARY
ORGANIZATION: DHARAMSHALA POST OFFICE.L SYSTEM SPECIFICATION: leave record management system.
DATABASE TABLES:
S.NO
1 2 3
TABLE
EMP_RECORD LEAVE HALF_PAY
DISCRIPTION
TO ENTER RECORD OF NEW EMPLOYEE LEAVE RECORD OF EMPLOYEE. RECORD OF HALF PAY LEAVE.
69
PROJECT REPORT
TABLE NAME:-EMP_RECORD
PURPOSE: IT IS USED TO STORE THE DATA OF NEW EMPLOYEE.
FIELDS
EMP_NO EMP_NAME EMP_DOB SEX_CODE EMP_SALARY EMP_DOJ EMP_ADD EMP_P NO
DATA TYPE
NUMBER VARCHAR2 DATE VARCHAR2 NUMBER DATE VARCHAR2 NUMBER
SIZE
5 15
DESCRIPTIO N
UNIQUE ID NO OF EMPLOYEE NAME OF EMPLOYEE DATE OF BIRTH OF EMPLOYEE SEX CODE OF EMPLOYEE. SALARY GIVEN TO EMPLOYEE DATE OF JOINING OF EMPLOYEE. ADDRESS OF EMPLOYEE. PHONE NUMBER OF EMPLOYEE
7 10
20 12
70
PROJECT REPORT
TABLE NAME:-LEAVE
PURPOSE: IT IS USED TO STORE DATA OF LEAVE TAKEN AND LEAVES LEFT.
FIELDS
EMP_NO DEPT_NO EMP_NAME LEAVE_TYPE TOTAL_LEAVES LEAVES_TAKEN BALANCE LEAVE_REQUIRE D LT_FROM LT_TO
DESCRIPTION
EMP NO OF EMPLOYEE. DEPARTMENT NO IN WHICH EMPLOYEE WORK NAME OF EMPLOYEE. TYPE OF LEAVES TAKEN BY EMPLOYEE. TOTAL LEAVES ALLOWED TO EMPLOYEE. TOTAL LEAVES TAKEN BY EMPLOYEE. HOW MANY LEAVES ARE LEFT. NUMBER OF LEAVES REQUIRED BY EMPLOYEE DATE FROM WHICH EMPLOYEE TAKEN LEAVE DATE TO WHICH EMPLOYEE TAKEN LEAVE
71
PROJECT REPORT
FIELDS
EMP_NO DEPT_NO EMP_NAME SALARY HP_LEAVES LEAVES_TAKEN SALARY_AHPL
DATA TYPE
NUMBER NUMBER TEXT NUMBER NUMBER NUMBER NUMBER
SIZE
10 10 30 15 10 10 15
DESCRIPTIO N
EMP NO OF EMPLOYEE. DEPARTMENT NO OF EMPLOYEE. NAME OF EMPLOYEE. SALARY OF EMPLOYEE. TOTAL HALF PAY LEAVE PROVIDED. TOTAL LEAVES TAKEN. SALARY AFTER HALF PAY LEAVE.
72
PROJECT REPORT
TABLE NAME:-LOGIN
PURPOSE: IT IS USED TO STORE THE USER NAME AND PASSWORD.
FIELDS
USERNAME PASSWORD
DATA TYPE
VARCHAR2 VARCHAR2
SIZE
20 20
DESCRIPTIO N
TO STORE THE USER NAME. TO STORE THE PASSWORD.
73
PROJECT REPORT
SYSTEM ANALYSIS
THE BRIEF INTRODUCTION OF PROJECT
LEAVE RCORD MANAGEMENT SYSTEM: The LEAVE RECORD MANAGEMENT SYSTEM is a computer based system build to maintain the database of a school. The application we created is according to the requirement of DEPARTMENT. We go through live experience of managements of LEAVE RECORD handling manually at DHARAMSHALA POST OFFICE. We got the knowledge about the working of school. This project is divided into five modules. The first major module covers the new employee, i.e. new entry.. The second module covers the id_no issued to the employee. The third part of the project deals with the leave record. The fourth module covers that for which purpose the leave record is required for department. The next module covers the total leaves taken and not taken the employee. The project is based on the Visual Basic.Net as Front End Tool and the MS Access as the Back End Tool. The project use run time object variable to connect front end with back End. At some place we also use the ADODC control to achieve this task.
74
PROJECT REPORT
TESTING
TESTING
Theoretically a newly designed system should have all the pieces in working order, but in reality, each piece work independently. The purpose of the system testing is to consider all the likely variation to which it will be subjected and then push the system to its limits. It is tedious but necessary step in the system development. The first test of the system is to see weather it produces correct outputs. No other tests can be more crucial than this. Following this step, a variety of other tests were conducted, such as follows:
Program testing:
A program represents the logical elements of a system. For a program to run satisfactorily it must compile and test data correctly and tie it properly with other programs. Program testing checks for two types of error i.e. syntax and logic. A syntax error is a program statement that violates one or more rules of the language in which it is written. These errors are shown through error messages generated by computer. A logic error on the other hand, deals with incorrect data fields, output of range items and invalid combinations. The programs were checked for syntax using watches in the code. The codes are carefully written and each logical path is traced during testing for avoiding the logical errors. No errors are left for correction.
75
PROJECT REPORT
String Testing:
Program is related to one another and interacts in a total system. Each program module in software is tested to see whether it confirms to related program in the system. Each portion of the system is tested against the entire module with both test and live data before the entire system is ready to test. Tests are carried out to check whether all the forms, which are, connected work in order. Tests were also carried out to see whether the path of the forms is in order.
76
PROJECT REPORT
BIBLIOGRAPHY
Visual Basic.net programming BLACK BOOK. By: Steven Holzter Programming in Visual Basic.Net. By: Harloas Davis MS Office 2003 For every one. By: Sanjay Saxena Visual Basic Beginners. By: Reeta Sahoo Mastering in Visual Basic.Net. By: E. Petroutsos (BPB Publication)
77