Вы находитесь на странице: 1из 127

Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 1




CHAPTER-1
Project Introduction
1.1 Introduction
This chapter introduces the desktop based application for WASA (Water and Sanitation
Agency) Human Resource Management System. The main functionality of this project is related
to develop best computerized system for WASA employees.
1.2 Business Requirements
The requirements that are found by the studying the problem domain and having a couple of
sessions with the user (employee) are as follows:
1. The system is required a computerized way for management of employees record.
2. This system is required a secure database i.e. any record once entered will never be delete
or modify by any user/data entry operator .Only managing person can change any detail
of specific record.
3. Employee record is the core requirement of this software.
4. This system is required the online access to the database server from anywhere in the
office.
5. This system is also required the complete representation of analyzed information through
reports.

1.2.1 background
Currently in WASA they are saving there employee record manually which is causing following
problems:
1. Time consuming
2. Manual file management
3. Inefficient updating
4. Less secure
5. Chance of error
6. Labor cost
7. Chance of data loss
8. Complexity
9. Stationary & other overheads
10. High cost
11. More Human effort
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 2

12. Difficult to find a single record out of 1000s
13. Human error might be occurs
14. Retrieval of data is very slow

1.2.2 Business Opportunity
Due to our newly developed system, management problem is solved which was major
issue for administration. This project offer for users to get right information with no
error and within seconds which was not possible in the manual system.
1.2.3 Business Objectives and Success Criteria
Designing any computerized system is important and helpful to establish the business
objectives of the new system.
Our new system is flexible and capable of adapting to changing environmental
conditions. Thus this system is designed so to meet its desired objectives and
institutional goals.
It is acceptable to the organizational design standards and provides a smooth
flow of information from one step to the next.
Accuracy has been increased during data storage and report generation.
The new system is error free and efficient in searching.
It provides proper data storage and maintenance. There is no need of
maintaining huge amount of files and registers to handle valuable data.
All type of timely reports is generated which facilitate the management to set
the dimensions about expenditure in a right way.
The update & Previous old record of every employee is also provided in a
system.
The report of every employee easily generated.
It is not time consuming, it is time saving i.e. a single record can be find easily out
of 1000s.
Required less human effort.
Low human error ratio.
Low percentage of data losses.
The backup of every employee record is also secured.
Reduce employee cost, liability and admin burden through integrated solution.

The new computerized system is necessary to improve performance,
information, economics, security, efficiency, service, precision and accuracy.


Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 3

1.2.4 Customer or Market Needs
By making the new desktop-application the requirement and needs of users (employee) are
fulfilled. The major needs of users were improve performance, information, economics,
security, efficiency, service, precision and accuracy. That was never possible in previous working
environment. In the new system the previous problems are solved.
1.3 Vision of the solution

1.3.1 Vision statement
The processing of information has been one of the basic tasks of every civilization .because of
the economic & population growth there are ever increasing needs to administrate large
quantities of interrelated data for administrative purposes.
Today the data processing system of an organization may be an old fashioned one with a clerk
entering the data processing system of an organization may be a modern one with the latest
computer hardware and software running round the clock and an expert team of IT professionals
always ready to face challenges of this highly competitive business world. The basic goal is
always same i.e. to provide the correct information to the authorized person at right time, at right
place and at right cost. Human Resources Management system has become vial for every
organization.
There are many overheads of manual system like inconsistency, lack of accuracy and precision,
lack of data updating, improper shifting of data into accounting cycle etc. Solution of all these
problems lies under the scope of our project.
The project desktop based application for employee Management system will replace the
current manual system of WASA.
The project employee management system constitutes of the following modules.
New Record of employee(personal info, job, qualification)
Email system
Inquiry
Court cases
Leave
Report
Print
Search
Delete record & Update record

Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 4

This system will produce customized report for decision making by the higher management. It
will produce different analysis report for higher management. The output from the main
employee management system will serve as input for sub modules thus avoiding the duplication
of data and providing the accurate, in-time information and employee related documents.

1.4 Overall Description
1.4.1 Product perspective
The main objective of this project is to develop a data base system to
fulfill the requirement of end users, management & employees.
In the manual system, for the process of different entries have to be entered into
related registered which require a lot of time. The proposed system will save
much of time as its different segment will be integrated.
The manual system a lot of staff and stationary for keeping the record and all
collection of data. Our developed system will be economical. It will minimize all
the above-mentioned expenses.
In the existing there is possibility of the loss of data but in new computerized
system data will be stored in such a way that there is no chance of its loss. Data
will be centralized and will not allow irrelevant DML operation by unauthorized
users.
In the existing system there is no mechanism for backup & recovery of data in
case of loss but in computerized system data will be back up on daily basis and
efficient algorithms will be used to recover the data in case of data lost.
The proposed system will provide the facility of retrieving the data with accuracy
and superhuman speed.
This software will be so easy and convenient to use that he/she can enter and
retrieve data very easily and friendly.

Furthermore it emphasized on:
Data security and safety.
It will provide bird eye view of whole process to the management.
It will save the time and the resources for generating report & other
official, unofficial documents.
It will minimize chances of errors thus providing accurate, efficient and in
time documents needed for the process of export.
It will be highly flexible and cloud be easily enhanced with changing
requirements of employee management system.
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 5

It will be easily integrated with other system, i.e. costing system, accounts
& finance systems of the WASA if needed in future.
This software will help the management to perform the complex analysis
in a very simple, user friendly and easy way thus directly affecting the
performance and growth of the WASA.


1.4.2 Operating Environment
After doing the complete study of existing system and taking in view the shortcomings it is
necessary to refine the system by removing the deficiencies. It is needed to build a new system
according to the requirements of WASA. Hence an SQL based computerization system is
selected which will improve the currently manual system.
Database is designed in SQL server 2008 r 2.
Forms are built in C# environment.
Report is also design in C#.
1.4.3 User Documentation
For developing desktop based application of WASA managing staff help us and provide
material about WASA employee. We get some information from concerning websites.
For designing of database different tutorials also helped us.
1.4.4 Assumption and Dependencies
The database will be accessible in real time.
Initially our system manages only the work of WASA.
Only managing person of WASA has the rights of any modification in database.
Sql runtime software must be installed on the computer of end user.
Database server could be accessible through internet from the remote distance.
User must have the rights to use the application.

1.5 Project Life Cycle

We select waterfall process model for system development.

Reasons to use:
By far the most commonly used approach up to now.
All the most widely used methods are underpinned by the waterfall model.
The stages are clear cut.
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 6

The original thinking behind it was that documents (tangible outputs) are produced at
each stage.
Consequently favored by top-management as easy to manage.
All R&D done before coding start implies better quality program design.
Well suited for developing stable, well understood web-based applications.
For smaller software products shorter time from requirements to product completion.
When a clear cut goal of the product is reached before the process begins.
Requirements less likely to change


















Requirements

Design
Implementation
Verification
Maintenance
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 7


CHAPTER -2
Requirements Specifications

2.1. Introduction
A software requirement specification is a complete of the behavior of system to be developed.
The software requirements specification begins the translation process that converts the software
requirement into language to developers will use.
With respect to our project this chapter includes:
1. System features
2. External interface requirements
3. Other non-functional requirements
2.2. System Features
The current system of WASA becomes useful by including some features. These features are:
2.2.1. Main Form:
a) Description and priority:
Main form provides the security to application and authentication the user i.e. whether its
authorized user or not. Every user has its own username and password.
b) Functional Requirements:
Main window
Application has the main window which will provide user interface. This window contains two
input fields for username and password and buttons for login and change password.

Login:
Login requires username and password if both are typed correctly the application show its menu
page. From the menu page any form or report can be executed.
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 8



Change password:
Clicking change password button another form will be open. Users provide their old password
with new one then click on change password button results the change in password.
New Record:
Clicking on the new record button a form will be open in which we enter the record of new
employee. If any field of this form is empty the software will not save the record. In new record
form we must want three requirement of employee.
1. Personal information
2. Job qualification
3. Qualification information

Inquiry:
Clicking on the inquiry button a form will be open in which we enter the inquiry record of
employee. If any employee has an allegation then this allegation will be save in his inquiry form
record.
Court Cases:
Clicking on the court cases button a form will be open in which we enter the court cases of any
employee. If any employee has any court case then this record of court case will be save in court
cases form.
Leaves:
Clicking on the leave button a form will be open in which we enter the leaves of any employee.
You cannot check the leave record of any employee until you enter the CNIC number of an
employee. It also saves the leaves record of the employees.
Training:
Clicking on the training button a form will be open in which we enter the training record of any
employee. In training form we enter the starting date when an employee start the training session
an when it ends we enter the ending date of training.
Update:
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 9

Clickings on the update button a form will be open in which we update the employee record.
Only the HEAD of the WASA update the employee record.

Delete:
Clicking on the delete button a form will be open in which we delete the employee record. Only
the HEAD of the WASA delete the employee record.
Search:
Clicking on the search button a form will be open in which we search the employee record. In
search form we define some categories to search the employee record.
Report:
Clicking on the report button a form will be open in which we open the reports of any employee.
We generate the daily basis report of the employees.
Email:
In email form we have some requirements to send the email to any employee.










Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 10

Requirement #1
Login:













Requirement #
Req-01
Requirement type:
Functional
Description
In this requirement, Data operator enters in system
by entering user name and password. To login Data
operator must enter user name and password. This
can be match or not with database. If the id and
password match with database we will login
successfully.
Rationale

Source

Fit Criterion
Operator will be successfully login.
Customer Satisfaction: Customer Dissatisfaction:
Dependencies

Supporting Materials:

Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 11

Requirement #2
Change Password:














Requirement # Req-02 Requirement type: Functional
Description In this requirement, sometimes due to security
failures we can loss our password, for which it
becomes necessary to change password to
defend WASA.
Rationale
Source
Fit Criterion Password will be successfully changed.
Customer Satisfaction: Customer Dissatisfaction:
Dependencies
Supporting Materials:
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 12

Requirement # 3
New Record:
















Requirement # Req-03 Requirement type: Functional
Description In this requirement, we recruit some of new
employees. It is necessary to enter all required
record in our data base.
Rationale
Source
Fit Criterion New Record of the employee will be saved.
Customer Satisfaction: Customer Dissatisfaction:
Dependencies
Supporting Materials:
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 13

Requirement # 4
Inquiry:















Requirement # Req-04 Requirement type: Functional
Description In this requirement, employee record is
verified due to some allegations. In which we
check the employee previous record, his
experience, his attitude with organization e.t.c.
Rationale
Source
Fit Criterion Employee is successfully inquired.
Customer Satisfaction: Customer Dissatisfaction:
Dependencies
Supporting Materials:
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 14

Requirement # 5
Court cases:















Requirement # Req-05 Requirement type: Functional
Description In this requirement, the employee which is
offended is represented in front of higher
authorities who take decisions about their
future working in organization.
Rationale
Source
Fit Criterion Employee is represented in front of court.
Customer Satisfaction: Customer Dissatisfaction:
Dependencies
Supporting Materials:
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 15

Requirement # 6
Leaves:















Requirement # Req-06 Requirement type: Functional
Description In this requirement, employees are given
leaves on the basis of their throughout carrier
leaves, their yearly leaves or on the basis of
their monthly leaves.
Rationale
Source
Fit Criterion Employees are granted by leaves.
Customer Satisfaction: Customer Dissatisfaction:
Dependencies
Supporting Materials:
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 16

Requirement # 7
Update:















Requirement # Req-07 Requirement type: Functional
Description In this requirement, data is revised on the basis
of changes in organization that change may be
in form of salary, designation or job rotations.
Rationale
Source
Fit Criterion Data is updated successfully.
Customer Satisfaction: Customer Dissatisfaction:
Dependencies
Supporting Materials:
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 17

Requirement # 8
Delete:















Requirement # Req-08 Requirement type: Functional
Description In this requirement, the un appropriate data
which is not in use is deleted from the data
base. This removal can be the elimination of
record of employee who has left the
organization.
Rationale
Source
Fit Criterion Un appropriate Data is deleted successfully.
Customer Satisfaction: Customer Dissatisfaction:
Dependencies
Supporting Materials:
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 18

Requirement # 9
Search:















Requirement # Req-09 Requirement type: Functional
Description In this requirement, we can check detail
information of our employee leaves, over time.
Our court cases, inquires and other issues faced
by organization.
Rationale
Source
Fit Criterion Data is searched successfully.
Customer Satisfaction: Customer Dissatisfaction:
Dependencies
Supporting Materials:
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 19

Requirement # 10
Report:















Requirement # Req-10 Requirement type: Functional
Description In this requirement, reports are generated.
These reports can be based on our daily
performance. It may include any other record
which we required.
Rationale
Source
Fit Criterion Report is searched successfully.
Customer Satisfaction: Customer Dissatisfaction:
Dependencies
Supporting Materials:
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 20


Requirement # 11
Email:















Requirement # Req-10 Requirement type: Functional
Description In this requirement, all the necessary
information is emailed to all the employees of
our organization.
Rationale
Source
Fit Criterion Email sends successfully.
Customer Satisfaction: Customer Dissatisfaction:
Dependencies
Supporting Materials:
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 21

Schedules:











Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 22


2.2.2. Information/management System

a) Description and priority:
Information system provides the facility of management the record of employees. Our new
system introduce a new bio data from having many mandatory fields including personal
information, educational background, job information etc.
b) Functional Requirements:
Form Selection
Application has the two major categories of input forms as setup forms for setup data.
Transactional form for detailed information. Setup data is used in transactional form.
Setup forms
Setup form are used to save core information like cities name, designations etc.
Setup data once entered and rapidly used in transactional form in the form of LOV (list of
values).
Transaction Forms
These forms include bio data/record, designation wise employee r employee other record.
2.2.3. Reports
a) Description and priority:
This system is generating different types of reports. Complete list of employee with their bio
data/record. Different types of reports generated by the employee management system. Reports
are generated in PDF format.

c) Functional Requirements:
Adobe redder software must be installed because reports will be generated in PDF format. User
can specify a location/folder for print to file option in reports. So user can save reports in a
specific directory.

Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 23

Parameter Reports
Required values must be entered in specific format correctly.

2.3 External Interface Requirements
2.3.1 User Interfaces
User interface is used to provide communication between user and system. User interface is user
friendly and very easy to learn. All action and queries against each button is performed correctly.
Some user interfaces of new desktop based application are:
New Record of employee form(personal info, job, qualification)
Email system
Inquiry
Court cases
Leave
Report
Print
Search
Delete record & Update record
2.3.2 Hardware Interfaces
Desktop based employee management system for WASA is Sql server dependant. Our hardware
includes:

Tool Requirement
Processor dual core
Minimum 1GB RAM
80GB hard disk or greater
Database Requirement
Pentium III or higher
512 RAM or higher
80 GB of hard disk
Dual core processor

Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 24

2.3.3 Software Interfaces
During implementation of effective employee management system (EMS) solution, following
tools have been used:
Microsoft windows 2007/XP professional Edition.
SQL
VB.net
C#
The reasons for using these tools and operating system have been given below:
SQL is a flexible, easiest and most productive language.
MS windows XP is one of the best operating systems equipped with better security,
interfaces and recovery techniques.
VB.net is very user friendly interface designing software.
2.3.4 Communication Interfaces
The front end of the system is directly concerned with the end users. It consists of user interfaces
and forms. We have developed it using c# form builder. For communication with database server
following installation are required:
Vb.net
C#
SQL server 2008 R2

2.4. Other Nonfunctional Requirements
2.4.1 Performance Requirements
New system performs best services even though many number of users requested the different
desired services.SQL server can response within seconds even simultaneously more than
500users send entirely different requests.
Twenty-four hour availability
Peak usage across all time zones
Complete database recovery

2.4.2 Safety Requirements
There must be power of backup for data base server.
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 25

Describe user-managed backup and recovery operations.
Perform closed database backup.
Backup the control files.
Use DB VERIFY utility to verify the backups and to detect corruption.
2.4.3 Security Requirements
In Microsoft access based system there was no reliable security measures. Chances of loss of
data and damage of information were high. New system provides security from deliberate
accidental damage or access by unauthorized persons. Each data operator has given access to
required table and views by assigning privileges and roles.
The ability to natively encrypt data in the SQL Database enables applications to guard their
sensitive data, even if unwanted intruders gain access to the server.
2.4.4 Software Quality Attributes
In our application database server is never accessible by any user. But administration
can easily update and maintain the database. Because of that some software quality
attributes of new system are:
Adaptable
Availability
Correctness
Flexibility
Maintainability
Portability
Reliability
Reusability

2.4.5 Other Requirements
Database Requirements:
The system use SQL database that provides advanced security to client-server and server-server
network security using encryption and data integrity, and support enhanced user authentication
services. An SQL architecture includes number of primary components:
SQL server 2008 R2
SQL database
Other key files
User and server processes

Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 26



CHAPTER-3
System Architecture

3.1 Introduction
Our product for WASA employee management system has been developed using three tier
architectural model. Overview of each tier has been given below:
3.1.1 Front Tier
The front end of the system is directly concerned with the end users. It consists of user interface
and forms. we have developed it using vb.net and c.# form builder.
3.1.2 Middle Tier
This tier is purely concerned with the core of the project that is business logic; all the
programming has been accomplished SQL server. This tier acts as bridge between the front end
and back end.
3.1.3 Information Tier
This tier is related to the database management system. SQL server 2008 R2 has been used for
this purpose.
All the relationships between these tier has been shown in this diagram:




Actor1



Front Tier
(End User)
Middle Tier
(Business User)
Information
Tier (DBMS)
Database
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 27



3.2 Analysis and Design

The abstract use case model of system is shown here that gives an abstract overview of
system functionalities.
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 28





Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 29

3.2.1 Description of Each Use Case
Use Case Name: Login















UC # 01 Ref: Req. # 01
UC Name Login
Level Abstract
Description In this module, Data operator must enter user
name and password to login. This can be match
or not with database. If the id and password
match with database we will login
successfully.
Actor (S) Data operator
Stakeholder DO, Administrator
Preconditions
Success Guarantee User login successfully and main interface
display for data operator.

Main Success Scenario

Action System Response
1. DO provide login
id and password.
2. Main interface will
be opened.
Extensions 1a.Invalid data entry. System asks to re-
enter wrong entry.
Special Requirements No special requirement
Frequency of Occurrence As per requirement
Miscellaneous No
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 30


Use Case Name: Change Password
















UC # 02 Ref: Req. # 02
UC Name Change Password
Level Abstract
Description In this module, sometimes due to security
failures we can loss our password, for which it
becomes necessary to change password to
defend WASA.
Actor (S) Data operator
Stakeholder DO, Administrator, Employee, Guest
Preconditions
Success Guarantee Password will be successfully changed.

Main Success Scenario

Action System Response
1. DO changes the
password.
2. system change the
password
successfully.
Extensions 1a.Invalid data entry. System asks to re-
enter wrong entry.
Special Requirements No special requirement
Frequency of Occurrence As per requirement
Miscellaneous No
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 31


Use Case Name: New Record

















UC # 03 Ref: Req. # 03
UC Name New Record
Level Abstract
Description In this module, we recruit some of new
employees. It is necessary to enter all required
record in our data base.
Actor (S) Data operator
Stakeholder DO, Administrator, Employee, Guest
Preconditions
Success Guarantee New Record of the employee will be saved.

Main Success Scenario

Action System Response
1. DO save the record
of new employee.
2. system successfully
save the record.
Extensions 1a.Invalid data entry. System asks to re-
enter wrong entry.
Special Requirements No special requirement
Frequency of Occurrence As per requirement
Miscellaneous No
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 32


Use Case Name: Inquiry
















UC # 04 Ref: Req. # 04
UC Name Inquiry
Level Abstract
Description In this module, employee record is verified due
to some allegations. In which we check the
employee previous record, his experience, his
attitude with organization e.t.c.
Actor (S) Data operator
Stakeholder DO, Administrator, Employee, Guest
Preconditions
Success Guarantee Employee is successfully inquired.

Main Success Scenario

Action System Response
1. DO saves the
inquiry record of the
employees.
2. system successfully
saves the inquiry
record.
Extensions 1a.Invalid data entry. System asks to re-
enter wrong entry.
Special Requirements No special requirement
Frequency of Occurrence As per requirement
Miscellaneous No
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 33

Use Case Name: Court Cases













UC # 05 Ref: Req. # 05
UC Name Court Cases
Level Abstract
Description In this module, the employee which is
offended is represented in front of higher
authorities which take decisions about their
future working in organization.
Actor (S) Data operator
Stakeholder DO, Administrator, Employee, Guest
Preconditions
Success Guarantee Employee is represented in front of court.

Main Success Scenario

Action System Response
1. DO saves the court
cases record of the
employees.
2. system successfully
saves the court cases
record.
Extensions 1a.Invalid data entry. System asks to re-
enter wrong entry.
Special Requirements No special requirement
Frequency of Occurrence As per requirement
Miscellaneous No
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 34

Use Case Name: Leaves

















UC # 06 Ref: Req. # 06
UC Name Leaves
Level Abstract
Description In this module, employees are given leaves on
the basis of their throughout carrier leaves,
their yearly leaves or on the basis of their
monthly leaves.
Actor (S) Data operator
Stakeholder DO, Administrator, Employee, Guest
Preconditions
Success Guarantee Employee are granted by leaves.

Main Success Scenario

Action System Response
1. DO saves the
leaves record of the
employee.
2. system successfully
saves the leaves
record.
Extensions 1a.Invalid data entry. System asks to re-
enter wrong entry.
Special Requirements No special requirement
Frequency of Occurrence As per requirement
Miscellaneous No
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 35

Use Case Name: Update



















UC # 07 Ref: Req. # 07
UC Name Update
Level Abstract
Description In this module, data is revised on the basis of
changes in organization that change may be in
form of salary, designation or job rotations.
Actor (S) Data operator
Stakeholder DO, Administrator, Employee, Guest
Preconditions
Success Guarantee Data is updated successfully.

Main Success Scenario

Action System Response
1. DO update the
employee record.
2. system successfully
update record.
Extensions 1a.Invalid data entry. System asks to re-
enter wrong entry.
Special Requirements No special requirement
Frequency of Occurrence As per requirement
Miscellaneous No
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 36

Use Case Name: Delete
















UC # 08 Ref: Req. # 08
UC Name Update
Level Abstract
Description In this module, the un appropriate data which
is not in use is deleted from the data base. This
removal can be the elimination of record of
employee who has left the organization.
Actor (S) Data operator
Stakeholder DO, Administrator, Employee, Guest
Preconditions
Success Guarantee Un appropriate Data is deleted successfully.

Main Success Scenario

Action System Response
1. DO delete the un
appropriate data of the
employee.
2. system successfully
delete record.
Extensions 1a.Invalid data entry. System asks to re-
enter wrong entry.
Special Requirements No special requirement
Frequency of Occurrence As per requirement
Miscellaneous No
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 37

Use Case Name: Search
















UC # 09 Ref: Req. # 09
UC Name Search
Level Abstract
Description In this module, we can check detail
information of our employee leaves, over time.
Our court cases, inquires and other issues faced
by organization.
Actor (S) Data operator
Stakeholder DO, Administrator, Employee, Guest
Preconditions
Success Guarantee Data is searched successfully.

Main Success Scenario

Action System Response
1. DO search the
employee record.
2. system successfully
search record.
Extensions 1a.Invalid data entry. System asks to re-
enter wrong entry.
Special Requirements No special requirement
Frequency of Occurrence As per requirement
Miscellaneous No
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 38

Use Case Name: Report

















UC # 10 Ref: Req. # 10
UC Name Report
Level Abstract
Description In this module, reports are generated. These
reports can be based on our daily performance.
It may include any other record which we
required.
Actor (S) Data operator
Stakeholder DO, Administrator, Employee, Guest
Preconditions
Success Guarantee Report is generated successfully.

Main Success Scenario

Action System Response
1. DO generate the
report of the
employee on daily
basis.
2. system successfully
generate report.
Extensions 1a.Invalid data entry. System asks to re-
enter wrong entry.
Special Requirements No special requirement
Frequency of Occurrence As per requirement
Miscellaneous No
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 39

Use Case Name: Email













UC # 11 Ref: Req. # 11
UC Name Email
Level Abstract
Description In this module, all the necessary information is
emailed to all the employees of our
organization.
Actor (S) Data operator
Stakeholder DO, Administrator, Employee, Guest
Preconditions
Success Guarantee Email sends successfully.

Main Success Scenario

Action System Response
1. DO sends the email
to the employees.
2. system successfully
sends mail.
Extensions 1a.Invalid data entry. System asks to re-
enter wrong entry.
Special Requirements No special requirement
Frequency of Occurrence As per requirement
Miscellaneous No
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 40

3.3 System Sequence Diagram
To a Login User:



DO

Do come in to system
System show login interface
Do enter user name and password

System show main interface

















System
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 41

Change Password:




DO


DO come in to system
System show login interface
DO click on change password button
System show change password interface
DO enter Old and new password
System show change password message














System
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 42

New Record:





DO

Do come in to system and login
System show main interface
Do Click new record button

System show new record form
Do operator enter new record and press save button
System Show message to Save Record












System
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 43

Inquiry:





DO

Do come in to system and login
System show main interface
Do Click inquiry button

System show inquiry form
Do operator enter inquiry record and press save button
System Show message to Save inquiry record












System
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 44


Court Cases:





DO

Do come in to system and login
System show main interface
Do Click court cases button

System show court cases form
Do operator enter court cases record
System Show message to save court cases record










System
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 45


Leaves:





DO

Do come in to system and login
System show Leaves interface
Do Click Leaves button

System show Leaves form
Do operator enter Leaves record
System Show message to save Leaves record










System
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 46

Training:





DO

Do come in to system and login
System show training interface
Do Click training button

System show training form
Do operator enter training record
System Show message to save training record












System
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 47


Update:





DO

Do come in to system and login
System show update interface
Do Click update button

System show update form
Do operator enter update record
System Show message to save update record











System
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 48


Delete:




DO

Do come in to system and login
System show delete interface
Do Click delete button

System show delete form
Do operator enter delete record
System Show message to save delete record











System
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 49


Search:




DO

Do come in to system and login
System show Search interface
Do Click Search button

System show search form
Do operator enter search record
System Show message to search record












System
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 50


Report:




DO

Do come in to system and login
System show report interface
Do Click report button

System show report
Do operator generate report
System Show message to generate report












System
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 51


Email:




DO

Do come in to system and login
System show email interface
Do Click email button

System show requirement to send mail
Do operator sending mail
System Show message to send mail










System
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 52

3.4 Sequence Diagrams

Login sequence diagram:




DO

Do come in to system interface
System show login interface
Do enter user name and password
System verify user name and password

Verify
Database sends result after verification

System interface show main interface









System
Interface
Database
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 53


Change password sequence diagram:




U
DO

Do come in to system interface
System show login interface
DO click on Change Password button
System show change password interface
Do enter old and new password

System request for verify old password In DB
Verify

Database sends result after verification
System show Change password Message







System
Interface
Database
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 54

New Record:





DO

Do come in to system interface
System shows New Record interface
Do enter require Data in Field

System request to save New Record
Verify
Response about save New Record

System show save new record message










System
Interface
Database
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 55


Inquiry:





DO

Do come in to system interface
System show Inquiry interface
Do enter require Data in Field

System request to save inquiry record
Verify
Response about save inquiry record

System show inquiry record save message









System
Interface
Database
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 56

Court Cases:





DO

Do come in to system interface
System show court cases interface
Do enter require Data to save court cases

System request to save court cases record
Verify
Response about save court cases record
System show court cases record message










System
Interface
Database
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 57

Leaves:





DO

Do come in to system interface
System shows Leaves interface
Do enter require Leaves record

System request to save Leave record
Verify
Response about save Leaves record

System show save Leaves record message








System
Interface
Database
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 58

Training:





DO

Do come in to system interface
System shows Training interface
Do enter require Training record

System request to save Training record
Verify
Response about save Training record

System show save Training record message










System
Interface
Database
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 59

Update:





DO

Do come in to system interface
System shows Update interface
Do enter require Update record

System request to save Update record
Verify
Response about save Update record

System show save Update record message








System
Interface
Database
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 60

Delete:





DO

Do come in to system interface
System shows Delete interface
Do enter Delete record

System request to Delete record
Verify
Response about Delete record

System show Delete message










System
Interface
Database
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 61


Search:





DO

Do come in to system interface
System shows Search interface
Do enter require Search record

System request to Search record
Verify
Response about Search record

System show Search record message








System
Interface
Database
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 62


Report:





DO

Do come in to system interface
System shows Report interface
Do generate report of employee record

System request to generate report
Verify
Response about generate report

System show report generate message







System
Interface
Database
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 63


Email:





DO

Do come in to system interface
System shows Email interface
Do send email to employees

System request to send email
Verify
Response about sending mail

System show send mail message









System
Interface
Database
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 64

3.5 ERD Model:

































Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 65



CHAPTER-4
Implementation and Testing
Now we test our system with every aspect. In the testing phase we apply different types of
testing. These are:



Data and Database Integrity Testing:




Test Objective Our main objective of this is to ensure that the
tables that we created rightly accessed from the
user interfaces and rightly updates modified
and deleted data from the tables.
Test Cases Test Case Description Result
1. From user interface
try to enter data into the
table.
Data successfully
entered.
2. From user interface
select a specific data
and try to delete it.
Selected data
successfully deleted.
3. From user interface
select a specific data
and try to update it.
Selected data
successfully
updated.
Completion Criteria All tables that created are successfully
accessed from the user interfaces and
successfully updated, modified, and deleted.
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 66




Functional Testing:











Test Cases Test Case Description Result
1. Check all buttons
that helps user to
navigate from one page
to another.
All buttons
successfully
performed their
functions.
2. All data entry
operations checked by
entering data.
All data entry
operations
successfully
performed their
functionalities.
3. Checked any other
functions for example
update data buttons.
All other functions
perform their
functionalities.
Completion Criteria All functions are successfully performed their
functionalities.
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 67




User Interface Testing:









Test Objective Our main objective of this is to check
navigation including window to window, field
to field and use of access methods e.g. tab keys,
mouse movements, and other keys. We also
focus on other characteristics like menus, size,
positions, state, colors and any such other
characteristics.
Test Cases Test Case Description Result
1. Every user interface
is checked one by one.

All characteristics
that described above
fulfill by every user
interface.

Completion Criteria Tab key, esc key work properly. Mouse
movement is ok. Colors are professional and
text color is ok and text is easily readable.
Navigation among pages also ok.
Special Consideration Nothing.
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 68



Performance Testing:









Test Objective Our main objective of this is to check that when
users enter data, modify data, and delete data
whether the response showed in proper time or
not. What happens when a lot number of requests
come to server?
Test Cases Test Case Description Result
1. When a lot number of
requests come to
desktop server.
Because wide zone
international has its
own server so these
requests will be
fulfilled in proper time.
2. When user enter,
modify, delete data.
Web server and
database server
response quickly.
Completion Criteria If a single or multiple data entry operations at a
time delete modify enters data then there is no
restriction for this and data successfully modified
and entered.
Special Consideration The web server and database server should have
capability to response at least 8000 to 15000 users
at a time
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 69



Login Testing:







Test Objective Our main objective of this is to check that when
users enter user name and password whether the
response shown in proper or not.
Test Cases Test Case Description Result
1. When a lot number
of requests come to
server.
Because wide zone
international has its
own server so these
requests will be
fulfilled in proper
time.
2. When user enter,
valid user name and
password.
User as granted
access to its account.
3. A wrong user name
or password is entered.
System show error
message.
4.If user click on
remain login tab.
User will remain
login
Completion Criteria All buttons belongs to login section are
functioning properly. Therefore no need to
worry about login section. No invalid user can
gain access to any other account.
Special Consideration The web server and database server should be
in running mode.
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 70



Change Password Testing:













Test Objective Our main objective of this is to check that when
user change the password of the system, then
the system successfully change the password or
not?
Test Cases Test Case Description Result
1. when the user
change the password.
System response, the
password
successfully changed.
Completion Criteria If the user change the password of the system
the password must successfully changed and
system should response quickly and all its
functionately work properly.
Special Consideration Nothing.
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 71



New Record Testing:











Test Objective Our main objective of this is to check that when
a new employee has join the organization the
user entered the data of this employee in the
system then the system save the record
successfully or not?
Test Cases Test Case Description Result
1. When user enter the
record of the employee.
System save the
record successfully.
2. When user left some
fields of form.
System shows the
error message.
Completion Criteria If the user enter the record of the employee the
system save the record quickly and there is no
restriction for this and data successfully save.
Special Consideration If any field of the form is empty then data is not
saved.
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 72



Update Record Testing:











Test Objective Our main objective of this is to check that when
users update the data of the employee the
system response us in proper time or not and
data is updated or not?
Test Cases Test Case Description Result
1. When user update
the record of the
employee.
System update the
record successfully.
2. When user enter
wrong information of
the employee.
System shows the
error message.
Completion Criteria If the user update the record of the employee
the system must the update record of the
employee in proper time and there is no
restriction to update record.
Special Consideration The head of organization login to update the
record.
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 73


Delete Record Testing:













Test Objective Our main objective of this is to check that when
users delete the data of the employee, the
system response us in proper time or not and
data is deleted or not?
Test Cases Test Case Description Result
1. When user delete the
record of the employee.
System delete the
record successfully.
Completion Criteria If the user delete the record of the employee the
system must delete the record of the employee
in proper time and there is no restriction to
delete record.
Special Consideration The head of organization login to delete the
record.
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 74



Report Generate Testing:











Test Objective Our main objective of this is to check that when
users generate the report of the employee on
daily basis the system response us in proper
time or not and report is generated or not?
Test Cases Test Case Description Result
1. When user generate
the report of the
employee.
System generate the
report successfully.
2. When user generate
the wrong report.
System shows the
error message.
Completion Criteria If the user generate the report of the employee
the system must the generate the report of the
employee in proper time and there is no
restriction to generate report.
Special Consideration Nothing.
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 75



Email Testing:











Test Objective Our main objective of this is to check that when
users email some information of the
organization to the employee the system sends
the mail in proper time or not?
Test Cases Test Case Description Result
1. When user sends the
email to the employees.
System sends the
mail successfully.
2. When user enter
wrong ID of the
employee.
System shows the
error message.
Completion Criteria If the user sends the email to the employees the
system sends the mail in proper time to the
employees. There is no restriction to sending
the mail.
Special Consideration Nothing.
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 76


CHAPTER-5
User Manual and Coding:
Employee management system is very user friendly software. All the menus, forms and options
are very easy to use. This manual describes how different forms can be used and how they
behave. The use of dialogue boxes and use of different buttons are described in details in this
manual. Also the use and purpose of all links of button to required form be described.

Login:


Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 77

Change Password:









Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 78

Departments and Global Search Form:














Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 79

New Record Form:













Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 80

Inquiry Form:













Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 81

Court Cases Form:













Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 82

Leaves Form:













Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 83

Training Form:













Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 84

Update Record Form:













Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 85

Delete Record Form:













Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 86

Search Form:













Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 87

Reports:













Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 88

Email Form:













Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 89

Code:
Main Formusing System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FDA_EHRM
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}



private void buttonCancel_Click(object sender, EventArgs e)
{
this.Close();
}

private void buttoncancel_Click_1(object sender, EventArgs e)
{
Departments dep = new Departments();
dep.Show();
this.Hide();
}

private void buttonnewrecord_Click(object sender, EventArgs e)
{

newrccc newrecord = new newrccc();
newrecord.Show();
this.Hide();
}

private void buttonupdate_Click(object sender, EventArgs e)
{
updatepassword1 updatep1 = new updatepassword1();
updatep1.Show();
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 90

this.Hide();

}

private void buttonemail_Click(object sender, EventArgs e)
{

Email mail = new Email();
mail.Show();
this.Hide();
}

private void buttondelete_Click(object sender, EventArgs e)
{
deletelogin1 log = new deletelogin1();
log.Show();
this.Hide();
}

private void buttonreport_Click(object sender, EventArgs e)
{
Report reprt = new Report();
reprt.Show();
this.Hide();
}

private void buttonsearch_Click(object sender, EventArgs e)
{
secarhcat srch = new secarhcat();
srch.Show();
this.Hide();
}

private void button3_Click(object sender, EventArgs e)
{
court_cases court = new court_cases();
court.Show();
this.Hide();
}

private void button1_Click(object sender, EventArgs e)
{
InquiryForm inquiry = new InquiryForm();
inquiry.Show();
this.Hide();
}
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 91


private void button4_Click(object sender, EventArgs e)
{
Training trning = new Training();
trning.Show();
this.Hide();
}

private void button5_Click(object sender, EventArgs e)
{
errorcasenewrecord sut = new errorcasenewrecord();
sut.Show();
this.Hide();
}

private void button2_Click(object sender, EventArgs e)
{
leave leav = new leave();
leav.Show();
this.Hide();
}

}
}
New Record
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.Management;
using FDA_db;
using System.Collections;
using System.Configuration;



namespace FDA_EHRM
{
public partial class newrccc : FDA_EHRM.MainForm
{
Connection conc = new Connection();
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 92

private int i;
private int ii;
private SqlConnection MyConnection = null;
private SqlCommand MyCommand = null;
private SqlDataAdapter MyAdapter = null;
private SqlDataReader dr = null;
private DataSet MyDataset = new DataSet();
public newrccc()
{
InitializeComponent();
this.datetime.Text = Convert.ToString(dateTimePicker1.Value);
}

private void button16_Click(object sender, EventArgs e)
{

}

private void button17_Click(object sender, EventArgs e){
if (this.name.Text == " " || this.cnic.Text == "" || this.job_nature.Text == " " ||
this.Designations.Text == "")
{
MessageBox.Show("Please Fill The Empty OR Require Filed");
}
else
{
conc.SaveRecord("insert into admin_newinfo_tb values ('" + File_no.Text + "','" +
rec_no.Text + "','" + datetime.Text + "','" + name.Text + "','" + fathername.Text + "','" +
cnic.Text + "','" + city.Text + "','" + province.Text + "','" + nationality.Text + "','" + domicle.Text
+ "','" + age.Text + "','" + dob.Text + "','" + paddress.Text + "','" + taddress.Text + "','" +
eaddress.Text + "','" + mnumber.Text + "','" + pnumber.Text + "','" + enumber.Text + "','" +
male.Text + "','" + marital_st.Text + "','" + yes.Text + "','" + muslim.Text + "','" + "','" +
job_nature.Text + "','" + departments.Text + "','" + Designations.Text + "','" + dojs.Text + "','" +
pops.Text + "','" + dopips.Text + "','" + pay_scale.Text + "','" + m_boards.Text + "','" +
m_grades.Text + "','" + m_ages.Text + "','" + m_cgpas.Text + "','" + m_sessions.Text + "','" +
i_boardss.Text + "','" + i_gradess.Text + "','" + i_agess.Text + "','" + i_cgpass.Text + "','" +
i_sessionss.Text + "','" + g_boards.Text + "','" + g_grades.Text + "','" + g_ages.Text + "','" +
g_cgpas.Text + "','" + g_sessions.Text + "','" + p_boards.Text + "','" + p_grades.Text + "','" +
p_ages.Text + "','" + p_cgpas.Text + "','" + p_sessions.Text + "','" + o_boards.Text + "','" +
o_grades.Text + "','" + o_ages.Text + "','" + o_cgpas.Text + "','" + o_sessions.Text + "')");
this.i = Convert.ToInt32(this.File_no.Text);
i++;
this.File_no.Text = Convert.ToString(this.i);
name.Text = null;
fathername.Text = null;
cnic.Text = null;
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 93

city.Text = null;
province.Text = null;
nationality.Text = null;
domicle.Text = null;
age.Text = null;
dob.Text = null;
paddress.Text = null;
taddress.Text = null;
eaddress.Text = null;
mnumber.Text = null;
pnumber.Text = null;
enumber.Text = null;
job_nature.Text = null;
departments.Text = null;
Designations.Text = null;
dojs.Text = null;
pops.Text = null;
dopips.Text = null;
pay_scale.Text = null;
m_boards.Text = null;
m_grades.Text = null;
m_ages.Text = null;
m_cgpas.Text = null;
m_sessions.Text = null;
i_boardss.Text = null;
i_gradess.Text = null;
i_agess.Text = null;
i_cgpass.Text = null;
i_sessionss.Text = null;
g_boards.Text = null;
g_grades.Text = null;
g_ages.Text = null;
g_cgpas.Text = null;
g_sessions.Text = null;
p_boards.Text = null;
p_grades.Text = null;
p_ages.Text = null;
p_cgpas.Text = null;
p_sessions.Text = null;
o_boards.Text = null;
o_grades.Text = null;
o_ages.Text = null;
o_cgpas.Text = null;
o_sessions.Text = null;
}
}
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 94


private void button7_Click(object sender, EventArgs e)
{
name.Text = null;
fathername.Text = null;
cnic.Text = null;
city.Text = null;
province.Text = null;
nationality.Text = null;
domicle.Text = null;
age.Text = null;
dob.Text = null;
paddress.Text = null;
taddress.Text = null;
eaddress.Text = null;
mnumber.Text = null;
pnumber.Text = null;
enumber.Text = null;


}

private void button14_Click(object sender, EventArgs e)
{
job_nature.Text=null;
departments.Text = null;
Designations.Text = null;
dojs.Text = null;
pops.Text = null;
dopips.Text = null;
pay_scale.Text = null;
}

private void button8_Click(object sender, EventArgs e)
{
m_boards.Text = null;
m_grades.Text = null;
m_ages.Text = null;
m_cgpas.Text = null;
m_sessions.Text = null;
i_boardss.Text = null;
i_gradess.Text = null;
i_agess.Text = null;
i_cgpass.Text = null;
i_sessionss.Text = null;
g_boards.Text = null;
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 95

g_grades.Text = null;
g_ages.Text = null;
g_cgpas.Text = null;
g_sessions.Text = null;
p_boards.Text = null;
p_grades.Text = null;
p_ages.Text = null;
p_cgpas.Text = null;
p_sessions.Text = null;
o_boards.Text = null;
o_grades.Text = null;
o_ages.Text = null;
o_cgpas.Text = null;
o_sessions.Text = null;
}

private void newrccc_Load(object sender, EventArgs e)
{
MyConnection = new SqlConnection();
string ConString = "Data source=.; initial catalog=FDA_db; Integrated Security= SSPI";
MyConnection.ConnectionString = ConString;
MyConnection.Open();
MyCommand = new SqlCommand("select File_no from admin_newinfo_tb ORDER BY
File_no", MyConnection);
//MyCommand.ExecuteNonQuery();
dr = MyCommand.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
File_no.Text = dr["File_no"].ToString();
}
}

MyConnection.Close();
this.i = Convert.ToInt32(this.File_no.Text);
i++;
this.File_no.Text = Convert.ToString(this.i);
}

private void button15_Click(object sender, EventArgs e)
{
OpenFileDialog upload = new OpenFileDialog();
upload.Filter = "Image Files(*.jpg;*.jpeg;*.gif;*.bmp;)|*.jpg;*.jpeg;*.gif;*.bmp";
upload.InitialDirectory = @"C:\";
if(upload.ShowDialog()==DialogResult.OK)
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 96

{
pictureBox2.Image = Image.FromFile(upload.FileName);


}
}

private void image_Click(object sender, EventArgs e)
{

}
}
}
Inquiry
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.Management;
using FDA_db;
using System.Collections;
using System.Configuration;

namespace FDA_EHRM
{
public partial class InquiryForm : FDA_EHRM.MainForm
{
Connection conc=new Connection();
private int i;
private int ii;
private SqlConnection MyConnection = null;
private SqlCommand MyCommand = null;
private SqlDataAdapter MyAdapter = null;
private SqlDataReader dr = null;
private DataSet MyDataset = new DataSet();

public InquiryForm()
{
InitializeComponent();
this.datetime.Text = Convert.ToString(dateTimePicker1.Value);
}
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 97



private void InquiryForm_Load(object sender, EventArgs e)
{

MyConnection = new SqlConnection();
string ConString = "Data source=ZAHID-HAMEED-HP; initial catalog=FDA_db;
Integrated Security= SSPI";
MyConnection.ConnectionString = ConString;
MyConnection.Open();
MyCommand = new SqlCommand("select File_no from admin_inqury1_tb ORDER BY
File_no", MyConnection);

dr = MyCommand.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
File_no.Text = dr["File_no"].ToString();
}
}

MyConnection.Close();
this.i = Convert.ToInt32(this.File_no.Text);
i++;
this.File_no.Text = Convert.ToString(this.i);


}

private void button5_Click(object sender, EventArgs e)
{

if (cnic.Text == "" || name_dsg.Text == "" || brief_description.Text == "" || rules.Text ==
"" || pending.Text == "" || name_dsg.Text == "")
{
MessageBox.Show("Plase Enter Data In Empty Filed");
}

else
{
conc.SaveRecord("insert into admin_inqury1_tb values ('" + File_no.Text + "','" +
rec_no.Text + "','" + datetime.Text + "','" + cnic.Text + "','" + name_dsg.Text + "','" +
brief_description.Text + "','" + rules.Text + "','" + pending.Text + "','" + under_action.Text +
"')");

Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 98

this.i = Convert.ToInt32(this.File_no.Text);
i++;
this.File_no.Text = Convert.ToString(this.i);
this.cnic.Text = null;
this.name_dsg.Text = null;
this.brief_description.Text = null;
this.rules.Text = null;
this.pending.Text = null;
this.under_action.Text = null;

}
}

private void File_no_Click(object sender, EventArgs e)
{

}
}
}

Court Cases
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.Management;
using FDA_db;
using System.Collections;
using System.Configuration;
namespace FDA_EHRM
{
public partial class court_cases : FDA_EHRM.MainForm
{
Connection conc = new Connection();
private int i;
private int ii;
private SqlConnection MyConnection = null;
private SqlCommand MyCommand = null;
private SqlDataAdapter MyAdapter = null;
private SqlDataReader dr = null;
private DataSet MyDataset = new DataSet();
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 99

public court_cases()
{
InitializeComponent();
this.datetime.Text = Convert.ToString(dateTimePicker1.Value);
}

private void button5_Click(object sender, EventArgs e)
{

if (cnic.Text == "" || name.Text == "" || title.Text=="")
{
MessageBox.Show("Plase Enter Data In Empty Filed");
}
else
{
conc.SaveRecord("insert into admin_cases_tb values ('" + File_no.Text + "','" +
rec_no.Text + "','" + datetime.Text + "','" + cnic.Text + "','" + name.Text + "','" +
Petitioner_date.Text + "','" + title.Text + "','" + versus.Text + "','" + legal_advisor.Text + "','" +
case_description.Text + "','" + current_progress.Text + "','" + results.Text + "')");
}
}

private void textBox3_TextChanged(object sender, EventArgs e)
{


private void court_cases_Load(object sender, EventArgs e)
{
MyConnection = new SqlConnection();
string ConString = "Data source=ZAHID-HAMEED-HP; initial catalog=FDA_db;
Integrated Security= SSPI";
MyConnection.ConnectionString = ConString;
MyConnection.Open();
MyCommand = new SqlCommand("select File_no from admin_case_tb ORDER BY
File_no", MyConnection);
dr = MyCommand.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
File_no.Text = dr["File_no"].ToString();
}
}

MyConnection.Close();
this.i = Convert.ToInt32(this.File_no.Text);
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 100

i++;
this.File_no.Text = Convert.ToString(this.i);
}

private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
{

}


}
}

Leave
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace FDA_EHRM
{
public partial class leave : FDA_EHRM.MainForm
{
public leave()
{
InitializeComponent();
}

private void button6_Click(object sender, EventArgs e)
{
this.cleave.Text = "48";
this.yleave.Text = "25";
this.tleave.Text = "73";
}

private void button5_Click(object sender, EventArgs e)
{

}
}
}

Training
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 101

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.Management;
using FDA_db;
using System.Collections;
using System.Configuration;

namespace FDA_EHRM
{
public partial class Training : FDA_EHRM.MainForm
{

Connection conc = new Connection();
private int i;
private int ii;
private SqlConnection MyConnection = null;
private SqlCommand MyCommand = null;
private SqlDataAdapter MyAdapter = null;
private SqlDataReader dr = null;
private DataSet MyDataset = new DataSet();
public Training()
{
InitializeComponent();
this.datetime.Text = Convert.ToString(dateTimePicker1.Value);
}

private void button5_Click(object sender, EventArgs e)
{
if (cnic.Text == "" || name.Text == "" || starting_date.Text == "" || Ending_date.Text ==
"" || Subject.Text == "" || given_by.Text == "" || department.Text=="" ||venue.Text=="" )
{
MessageBox.Show("Plase Enter Data In Empty Filed");
}

else
{
conc.SaveRecord("insert into admin_training_tb values ('" + File_no.Text + "','" +
rec_no.Text + "','" + datetime.Text + "','" + cnic.Text + "','" + name.Text + "','" +
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 102

starting_date.Text + "','" + Ending_date.Text + "','" + Subject.Text + "','" + given_by.Text + "','"
+ department.Text + "','" + venue.Text + "')");

this.i = Convert.ToInt32(this.File_no.Text);
i++;
this.File_no.Text = Convert.ToString(this.i);
this.cnic.Text = null;
this.name.Text = null;
this.starting_date.Text = null;
this.Ending_date.Text = null;
this.Subject.Text = null;
this.given_by.Text = null;
this.department.Text = null;
this.venue.Text = null;

}
}

private void Training_Load(object sender, EventArgs e)
{
MyConnection = new SqlConnection();
string ConString = "Data source=ZAHID-HAMEED-HP; initial catalog=FDA_db;
Integrated Security= SSPI";
MyConnection.ConnectionString = ConString;
MyConnection.Open();
MyCommand = new SqlCommand("select File_no from admin_training_tb ORDER BY
File_no", MyConnection);

dr = MyCommand.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
File_no.Text = dr["File_no"].ToString();
}
}

MyConnection.Close();
this.i = Convert.ToInt32(this.File_no.Text);
i++;
this.File_no.Text = Convert.ToString(this.i);
}
}
}

Save Update
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 103

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.Management;
using FDA_db;
using System.Collections;
using System.Configuration;

namespace FDA_EHRM
{
public partial class saveupdatetraing : FDA_EHRM.MainForm
{
Connection conc = new Connection();
private int i;
private SqlConnection MyConnection = null;
private SqlCommand MyCommand = null;
private SqlDataReader dr = null;
public saveupdatetraing()
{
InitializeComponent();
this.datetime.Text = Convert.ToString(dateTimePicker1.Value);
}

private void button7_Click(object sender, EventArgs e)
{
MyConnection = new SqlConnection();
string ConString = "Data source=ZAHID-HAMEED-HP; initial catalog=FDA_db;
Integrated Security= SSPI";
MyConnection.ConnectionString = ConString;
MyConnection.Open();
MyCommand = new SqlCommand("select
File_no,Record_no,CNIC,Name,Starting_date,Ending_date,Subject,Training_given_by,Departm
ent,Venue from admin_training_tb where CNIC='" + cnic.Text + "' ", MyConnection);
dr = MyCommand.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
File_no.Text = dr["File_no"].ToString();
rec_no.Text = dr["Record_no"].ToString();
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 104

cnic.Text = dr["CNIC"].ToString();
name.Text = dr["Name"].ToString();
starting_date.Text = dr["Starting_date"].ToString();
Ending_date.Text = dr["Ending_date"].ToString();
given_by.Text = dr["Training_given_by"].ToString();
department.Text = dr["Department"].ToString();
venue.Text = dr["Venue"].ToString();
}
}

MyConnection.Close();
}

private void button8_Click(object sender, EventArgs e)
{
this.i = Convert.ToInt32(this.rec_no.Text);
i++;
this.rec_no.Text = Convert.ToString(this.i);
conc.SaveRecord("insert into admin_training_tb values ('" + File_no.Text + "','" +
rec_no.Text + "','" + datetime.Text + "','" + cnic.Text + "','" + name.Text + "','" +
starting_date.Text + "','" + Ending_date.Text + "','" + Subject.Text + "','" + given_by.Text + "','"
+ department.Text + "','" + venue.Text + "')");
}
}
}

Save Update Training
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.Management;
using FDA_db;
using System.Collections;
using System.Configuration;

namespace FDA_EHRM
{
public partial class saveupdatetraing : FDA_EHRM.MainForm
{
Connection conc = new Connection();
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 105

private int i;
private SqlConnection MyConnection = null;
private SqlCommand MyCommand = null;
private SqlDataReader dr = null;
public saveupdatetraing()
{
InitializeComponent();
this.datetime.Text = Convert.ToString(dateTimePicker1.Value);
}

private void button7_Click(object sender, EventArgs e)
{
MyConnection = new SqlConnection();
string ConString = "Data source=ZAHID-HAMEED-HP; initial catalog=FDA_db;
Integrated Security= SSPI";
MyConnection.ConnectionString = ConString;
MyConnection.Open();
MyCommand = new SqlCommand("select
File_no,Record_no,CNIC,Name,Starting_date,Ending_date,Subject,Training_given_by,Departm
ent,Venue from admin_training_tb where CNIC='" + cnic.Text + "' ", MyConnection);
dr = MyCommand.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
File_no.Text = dr["File_no"].ToString();
rec_no.Text = dr["Record_no"].ToString();
cnic.Text = dr["CNIC"].ToString();
name.Text = dr["Name"].ToString();
starting_date.Text = dr["Starting_date"].ToString();
Ending_date.Text = dr["Ending_date"].ToString();
given_by.Text = dr["Training_given_by"].ToString();
department.Text = dr["Department"].ToString();
venue.Text = dr["Venue"].ToString();
}
}

MyConnection.Close();
}
private void button8_Click(object sender, EventArgs e)
{
this.i = Convert.ToInt32(this.rec_no.Text);
i++;
this.rec_no.Text = Convert.ToString(this.i);
conc.SaveRecord("insert into admin_training_tb values ('" + File_no.Text + "','" +
rec_no.Text + "','" + datetime.Text + "','" + cnic.Text + "','" + name.Text + "','" +
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 106

starting_date.Text + "','" + Ending_date.Text + "','" + Subject.Text + "','" + given_by.Text + "','"
+ department.Text + "','" + venue.Text + "')");
}
}
}

Save Inquiry
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.Management;
using FDA_db;
using System.Collections;
using System.Configuration;

namespace FDA_EHRM
{
public partial class Save_update_inquiry : FDA_EHRM.MainForm
{
Connection conc = new Connection();
private int i;
private SqlConnection MyConnection = null;
private SqlCommand MyCommand = null;
private SqlDataReader dr = null;
public Save_update_inquiry()
{
InitializeComponent();
this.datetimes.Text = Convert.ToString(dateTimePicker1.Value);
}



private void button6_Click(object sender, EventArgs e)
{


MyConnection = new SqlConnection();
string ConString = "Data source=ZAHID-HAMEED-HP; initial catalog=FDA_db;
Integrated Security= SSPI";
MyConnection.ConnectionString = ConString;
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 107

MyConnection.Open();
MyCommand = new SqlCommand("select * from admin_inqury1_tb where CNIC='" +
cnic.Text + "' ", MyConnection);
dr = MyCommand.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
File_nos.Text = dr["File_no"].ToString();
rec_nos.Text = dr["Record_no"].ToString();
cnic.Text = dr["CNIC"].ToString();
name_dsg.Text = dr["Name_dsg"].ToString();
brief_description.Text = dr["Brief_description"].ToString();
rules.Text = dr["Rules"].ToString();
pending.Text = dr["Pending"].ToString();
under_action.Text = dr["Action_taken"].ToString();
}
}

MyConnection.Close();
}

private void button5_Click(object sender, EventArgs e)
{
this.i = Convert.ToInt32(this.rec_nos.Text);
i++;
this.rec_nos.Text = Convert.ToString(this.i);
conc.SaveRecord("insert into admin_inqury1_tb values ('" + File_nos.Text + "','" +
rec_nos.Text + "','" +datetimes.Text + "','" + cnic.Text + "','" + name_dsg.Text + "','" +
brief_description.Text + "','" + rules.Text + "','" + pending.Text + "','" + under_action.Text +
"')");
}

private void groupBox1_Enter(object sender, EventArgs e)
{

}
}
}

Delete Traing File
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 108

using System.Data.SqlClient;
using System.Data;
using System.Management;
using FDA_db;

namespace FDA_EHRM
{
public partial class deletetrningfile : FDA_EHRM.MainForm
{
Connection conc = new Connection();
public SqlConnection MyConnection = null;
public SqlCommand MyCommand = null;
public SqlDataAdapter MyAdapter = null;
public DataSet MyDataset = new DataSet();
private int i = 0;
public deletetrningfile()
{
InitializeComponent();
}

private void button7_Click(object sender, EventArgs e)
{
MyConnection = new SqlConnection();
string ConString = "Data source=ZAHID-HAMEED-HP; initial catalog=FDA_db;
Integrated Security= SSPI";
MyConnection.ConnectionString = ConString;
MyConnection.Open();
MyAdapter = new SqlDataAdapter("select
File_no,Record_no,Date_time,CNIC,Name,Starting_date,Ending_date,Subject,Training_given_b
y,Department,Venue from admin_training_tb where CNIC='" + cnic.Text + "' ", MyConnection);
SqlCommandBuilder builder = new SqlCommandBuilder(MyAdapter);
MyDataset = new DataSet();
MyAdapter.Fill(MyDataset, "admin_training_tb");
dataGridView1.DataSource = MyDataset.Tables["admin_training_tb"];
if (MyDataset.Tables[0].Rows.Count > 0)
{
i = 0;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
datetime.Text= MyDataset.Tables[0].Rows[i]["Date_time"].ToString();
cnic.Text = MyDataset.Tables[0].Rows[i]["CNIC"].ToString();
name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
starting_date.Text = MyDataset.Tables[0].Rows[i]["Starting_date"].ToString();
Ending_date.Text = MyDataset.Tables[0].Rows[i]["Ending_date"].ToString();
Subject.Text = MyDataset.Tables[0].Rows[i]["Subject"].ToString();
given_by.Text = MyDataset.Tables[0].Rows[i]["Training_given_by"].ToString();
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 109

department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
venue.Text = MyDataset.Tables[0].Rows[i]["Venue"].ToString();
}
}

private void button9_Click(object sender, EventArgs e)
{
MyConnection = new SqlConnection();
string ConString = "Data source=ZAHID-HAMEED-HP; initial catalog=FDA_db;
Integrated Security= SSPI";
MyConnection.ConnectionString = ConString;
MyConnection.Open();
MyAdapter = new SqlDataAdapter("select
File_no,Record_no,Date_time,CNIC,Name,Starting_date,Ending_date,Subject,Training_given_b
y,Department,Venue from admin_training_tb where CNIC='" + cnic.Text + "' ", MyConnection);
SqlCommandBuilder builder = new SqlCommandBuilder(MyAdapter);
MyDataset = new DataSet();
MyAdapter.Fill(MyDataset, "admin_training_tb");
dataGridView1.DataSource = MyDataset.Tables["admin_training_tb"];
if (MyDataset.Tables[0].Rows.Count > 0)
{
i = 0;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
datetime.Text = MyDataset.Tables[0].Rows[i]["Date_time"].ToString();
cnic.Text = MyDataset.Tables[0].Rows[i]["CNIC"].ToString();
name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
starting_date.Text = MyDataset.Tables[0].Rows[i]["Starting_date"].ToString();
Ending_date.Text = MyDataset.Tables[0].Rows[i]["Ending_date"].ToString();
Subject.Text = MyDataset.Tables[0].Rows[i]["Subject"].ToString();
given_by.Text = MyDataset.Tables[0].Rows[i]["Training_given_by"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
venue.Text = MyDataset.Tables[0].Rows[i]["Venue"].ToString();
}
}

private void button10_Click(object sender, EventArgs e)
{
if (i < MyDataset.Tables[0].Rows.Count - 1)
{
i++;

File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
datetime.Text = MyDataset.Tables[0].Rows[i]["Date_time"].ToString();
cnic.Text = MyDataset.Tables[0].Rows[i]["CNIC"].ToString();
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 110

name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
starting_date.Text = MyDataset.Tables[0].Rows[i]["Starting_date"].ToString();
Ending_date.Text = MyDataset.Tables[0].Rows[i]["Ending_date"].ToString();
Subject.Text = MyDataset.Tables[0].Rows[i]["Subject"].ToString();
given_by.Text = MyDataset.Tables[0].Rows[i]["Training_given_by"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
venue.Text = MyDataset.Tables[0].Rows[i]["Venue"].ToString();
}
else
{
MessageBox.Show("u r best");
}
}

private void button11_Click(object sender, EventArgs e)
{
if (i == MyDataset.Tables[0].Rows.Count - 1 || i != 0)
{
i--;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
datetime.Text = MyDataset.Tables[0].Rows[i]["Date_time"].ToString();
cnic.Text = MyDataset.Tables[0].Rows[i]["CNIC"].ToString();
name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
starting_date.Text = MyDataset.Tables[0].Rows[i]["Starting_date"].ToString();
Ending_date.Text = MyDataset.Tables[0].Rows[i]["Ending_date"].ToString();
Subject.Text = MyDataset.Tables[0].Rows[i]["Subject"].ToString();
given_by.Text = MyDataset.Tables[0].Rows[i]["Training_given_by"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
venue.Text = MyDataset.Tables[0].Rows[i]["Venue"].ToString();
}
else
{
}
}

private void button12_Click(object sender, EventArgs e)
{
i = MyDataset.Tables[0].Rows.Count - 1;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
datetime.Text = MyDataset.Tables[0].Rows[i]["Date_time"].ToString();
cnic.Text = MyDataset.Tables[0].Rows[i]["CNIC"].ToString();
name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
starting_date.Text = MyDataset.Tables[0].Rows[i]["Starting_date"].ToString();
Ending_date.Text = MyDataset.Tables[0].Rows[i]["Ending_date"].ToString();
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 111

Subject.Text = MyDataset.Tables[0].Rows[i]["Subject"].ToString();
given_by.Text = MyDataset.Tables[0].Rows[i]["Training_given_by"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
venue.Text = MyDataset.Tables[0].Rows[i]["Venue"].ToString();
}

private void button8_Click(object sender, EventArgs e)
{
conc.DeleteRecord("delete from admin_training_tb where File_no ='" + File_no.Text +
"' ");
File_no.Text = null;
rec_no.Text = null;
datetime.Text = null;
cnic.Text = null;
name.Text = null;
starting_date.Text = null;
Ending_date.Text = null;
Subject.Text = null;
given_by.Text = null;
department.Text = null;
venue.Text = null;
}
}
}

Delete Training Record
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data;
using System.Management;
using FDA_db;
namespace FDA_EHRM
{
public partial class deletetringrec : FDA_EHRM.MainForm
{
Connection conc = new Connection();
public SqlConnection MyConnection = null;
public SqlCommand MyCommand = null;
public SqlDataAdapter MyAdapter = null;
public DataSet MyDataset = new DataSet();
private int i = 0;
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 112

public deletetringrec()
{
InitializeComponent();
}

private void button7_Click(object sender, EventArgs e)
{
MyConnection = new SqlConnection();
string ConString = "Data source=ZAHID-HAMEED-HP; initial catalog=FDA_db;
Integrated Security= SSPI";
MyConnection.ConnectionString = ConString;
MyConnection.Open();
MyAdapter = new SqlDataAdapter("select
File_no,Record_no,Date_time,CNIC,Name,Starting_date,Ending_date,Subject,Training_given_b
y,Department,Venue from admin_training_tb where CNIC='" + cnic.Text + "' ", MyConnection);
SqlCommandBuilder builder = new SqlCommandBuilder(MyAdapter);
MyDataset = new DataSet();
MyAdapter.Fill(MyDataset, "admin_training_tb");
dataGridView1.DataSource = MyDataset.Tables["admin_training_tb"];
if (MyDataset.Tables[0].Rows.Count > 0)
{
i = 0;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
datetime.Text = MyDataset.Tables[0].Rows[i]["Date_time"].ToString();
cnic.Text = MyDataset.Tables[0].Rows[i]["CNIC"].ToString();
name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
starting_date.Text = MyDataset.Tables[0].Rows[i]["Starting_date"].ToString();
Ending_date.Text = MyDataset.Tables[0].Rows[i]["Ending_date"].ToString();
Subject.Text = MyDataset.Tables[0].Rows[i]["Subject"].ToString();
given_by.Text = MyDataset.Tables[0].Rows[i]["Training_given_by"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
venue.Text = MyDataset.Tables[0].Rows[i]["Venue"].ToString();
}
}

private void button9_Click(object sender, EventArgs e)
{
MyConnection = new SqlConnection();
string ConString = "Data source=ZAHID-HAMEED-HP; initial catalog=FDA_db;
Integrated Security= SSPI";
MyConnection.ConnectionString = ConString;
MyConnection.Open();
MyAdapter = new SqlDataAdapter("select
File_no,Record_no,Date_time,CNIC,Name,Starting_date,Ending_date,Subject,Training_given_b
y,Department,Venue from admin_training_tb where CNIC='" + cnic.Text + "' ", MyConnection);
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 113

SqlCommandBuilder builder = new SqlCommandBuilder(MyAdapter);
MyDataset = new DataSet();
MyAdapter.Fill(MyDataset, "admin_training_tb");
dataGridView1.DataSource = MyDataset.Tables["admin_training_tb"];
if (MyDataset.Tables[0].Rows.Count > 0)
{
i = 0;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
datetime.Text = MyDataset.Tables[0].Rows[i]["Date_time"].ToString();
cnic.Text = MyDataset.Tables[0].Rows[i]["CNIC"].ToString();
name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
starting_date.Text = MyDataset.Tables[0].Rows[i]["Starting_date"].ToString();
Ending_date.Text = MyDataset.Tables[0].Rows[i]["Ending_date"].ToString();
Subject.Text = MyDataset.Tables[0].Rows[i]["Subject"].ToString();
given_by.Text = MyDataset.Tables[0].Rows[i]["Training_given_by"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
venue.Text = MyDataset.Tables[0].Rows[i]["Venue"].ToString();
}
}

private void button10_Click(object sender, EventArgs e)
{
if (i < MyDataset.Tables[0].Rows.Count - 1)
{
i++;

File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
datetime.Text = MyDataset.Tables[0].Rows[i]["Date_time"].ToString();
cnic.Text = MyDataset.Tables[0].Rows[i]["CNIC"].ToString();
name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
starting_date.Text = MyDataset.Tables[0].Rows[i]["Starting_date"].ToString();
Ending_date.Text = MyDataset.Tables[0].Rows[i]["Ending_date"].ToString();
Subject.Text = MyDataset.Tables[0].Rows[i]["Subject"].ToString();
given_by.Text = MyDataset.Tables[0].Rows[i]["Training_given_by"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
venue.Text = MyDataset.Tables[0].Rows[i]["Venue"].ToString();
}
else
{
MessageBox.Show("u r best");
}
}

private void button11_Click(object sender, EventArgs e)
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 114

{
if (i == MyDataset.Tables[0].Rows.Count - 1 || i != 0)
{
i--;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
datetime.Text = MyDataset.Tables[0].Rows[i]["Date_time"].ToString();
cnic.Text = MyDataset.Tables[0].Rows[i]["CNIC"].ToString();
name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
starting_date.Text = MyDataset.Tables[0].Rows[i]["Starting_date"].ToString();
Ending_date.Text = MyDataset.Tables[0].Rows[i]["Ending_date"].ToString();
Subject.Text = MyDataset.Tables[0].Rows[i]["Subject"].ToString();
given_by.Text = MyDataset.Tables[0].Rows[i]["Training_given_by"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
venue.Text = MyDataset.Tables[0].Rows[i]["Venue"].ToString();
}
else
{
}
}

private void button12_Click(object sender, EventArgs e)
{
i = MyDataset.Tables[0].Rows.Count - 1;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
datetime.Text = MyDataset.Tables[0].Rows[i]["Date_time"].ToString();
cnic.Text = MyDataset.Tables[0].Rows[i]["CNIC"].ToString();
name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
starting_date.Text = MyDataset.Tables[0].Rows[i]["Starting_date"].ToString();
Ending_date.Text = MyDataset.Tables[0].Rows[i]["Ending_date"].ToString();
Subject.Text = MyDataset.Tables[0].Rows[i]["Subject"].ToString();
given_by.Text = MyDataset.Tables[0].Rows[i]["Training_given_by"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
venue.Text = MyDataset.Tables[0].Rows[i]["Venue"].ToString();
}

private void button8_Click(object sender, EventArgs e)
{
conc.DeleteRecord("delete from admin_training_tb where File_no ='" + File_no.Text +
"' AND Record_no ='" + rec_no.Text + "' ");
File_no.Text = null;
rec_no.Text = null;
datetime.Text = null;
cnic.Text = null;
name.Text = null;
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 115

starting_date.Text = null;
Ending_date.Text = null;
Subject.Text = null;
given_by.Text = null;
department.Text = null;
venue.Text = null;
}

private void groupBox1_Enter(object sender, EventArgs e)
{

}
}
}

Delete Training File
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data;
using System.Management;
using FDA_db;

namespace FDA_EHRM
{
public partial class deleterecordfile : FDA_EHRM.MainForm
{
Connection conc = new Connection();
public SqlConnection MyConnection = null;
public SqlCommand MyCommand = null;
public SqlDataAdapter MyAdapter = null;
public DataSet MyDataset = new DataSet();
private int i = 0;
public deleterecordfile()
{
InitializeComponent();
//this.datetime.Text = Convert.ToString(dateTimePicker1.Value);
}

private void button11_Click(object sender, EventArgs e)
{
MyConnection = new SqlConnection();
string ConString = "Data source=.; initial catalog=FDA_db; Integrated Security= SSPI";
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 116

MyConnection.ConnectionString = ConString;
MyConnection.Open();
MyAdapter = new SqlDataAdapter("select * from admin_newinfo_tb where CNIC='" +
cnic.Text + "' ", MyConnection);
SqlCommandBuilder builder = new SqlCommandBuilder(MyAdapter);
MyDataset = new DataSet();
MyAdapter.Fill(MyDataset, "admin_inqury_tb");
dataGridView1.DataSource = MyDataset.Tables["admin_inqury_tb"];
if (MyDataset.Tables[0].Rows.Count > 0)
{
i = 0;


File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();

name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
father_name.Text = MyDataset.Tables[0].Rows[i]["Father_name"].ToString();

address.Text = MyDataset.Tables[0].Rows[i]["Paddress"].ToString();

department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
Designation.Text = MyDataset.Tables[0].Rows[i]["Designation"].ToString();

}
else
{
MessageBox.Show("Date Not Found");
}
}

private void button7_Click(object sender, EventArgs e)
{
MyConnection = new SqlConnection();
string ConString = ".; initial catalog=FDA_db; Integrated Security= SSPI";
MyConnection.ConnectionString = ConString;
MyConnection.Open();
MyAdapter = new SqlDataAdapter("select * from admin_newinfo_tb where CNIC='" +
cnic.Text + "' ", MyConnection);
SqlCommandBuilder builder = new SqlCommandBuilder(MyAdapter);
MyDataset = new DataSet();
MyAdapter.Fill(MyDataset, "admin_inqury_tb");
dataGridView1.DataSource = MyDataset.Tables["admin_inqury_tb"];
if (MyDataset.Tables[0].Rows.Count > 0)
{
i = 0;
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 117



File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();

name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
father_name.Text = MyDataset.Tables[0].Rows[i]["Father_name"].ToString();

address.Text = MyDataset.Tables[0].Rows[i]["Paddress"].ToString();

department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
Designation.Text = MyDataset.Tables[0].Rows[i]["Designation"].ToString();

}
}

private void button8_Click(object sender, EventArgs e)
{
if (i < MyDataset.Tables[0].Rows.Count - 1)
{
i++;

File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();

name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
father_name.Text = MyDataset.Tables[0].Rows[i]["Father_name"].ToString();

address.Text = MyDataset.Tables[0].Rows[i]["Paddress"].ToString();

department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
Designation.Text = MyDataset.Tables[0].Rows[i]["Designation"].ToString();
}
else
{
MessageBox.Show("u r best");
}
}

private void button9_Click(object sender, EventArgs e)
{
if (i == MyDataset.Tables[0].Rows.Count - 1 || i != 0)
{
i--;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 118


name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
father_name.Text = MyDataset.Tables[0].Rows[i]["Father_name"].ToString();

address.Text = MyDataset.Tables[0].Rows[i]["Paddress"].ToString();

department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
Designation.Text = MyDataset.Tables[0].Rows[i]["Designation"].ToString();
}
}

private void button10_Click(object sender, EventArgs e)
{
i = MyDataset.Tables[0].Rows.Count - 1;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();

name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
father_name.Text = MyDataset.Tables[0].Rows[i]["Father_name"].ToString();

address.Text = MyDataset.Tables[0].Rows[i]["Paddress"].ToString();

department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
Designation.Text = MyDataset.Tables[0].Rows[i]["Designation"].ToString();

}

private void button6_Click(object sender, EventArgs e)
{

conc.DeleteRecord("delete from admin_newinfo_tb where File_no=" + File_no.Text +
"");

cnic.Text = null;
File_no.Text = null;
rec_no.Text = null;
name.Text = null;
father_name.Text = null;
address.Text = null;
department.Text = null;
Designation.Text = null;
}

private void File_no_TextChanged(object sender, EventArgs e)
{

Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 119

}
}
}

Delete Training Record
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data;
using System.Management;
using FDA_db;

namespace FDA_EHRM
{
public partial class deleterecordfile : FDA_EHRM.MainForm
{
Connection conc = new Connection();
public SqlConnection MyConnection = null;
public SqlCommand MyCommand = null;
public SqlDataAdapter MyAdapter = null;
public DataSet MyDataset = new DataSet();
private int i = 0;
public deleterecordfile()
{
InitializeComponent
private void button11_Click(object sender, EventArgs e)
{
MyConnection = new SqlConnection();
string ConString = "Data source=.; initial catalog=FDA_db; Integrated Security= SSPI";
MyConnection.ConnectionString = ConString;
MyConnection.Open();
MyAdapter = new SqlDataAdapter("select * from admin_newinfo_tb where CNIC='" +
cnic.Text + "' ", MyConnection);
SqlCommandBuilder builder = new SqlCommandBuilder(MyAdapter);
MyDataset = new DataSet();
MyAdapter.Fill(MyDataset, "admin_inqury_tb");
dataGridView1.DataSource = MyDataset.Tables["admin_inqury_tb"];
if (MyDataset.Tables[0].Rows.Count > 0)
{
i = 0;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();

Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 120

name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
father_name.Text = MyDataset.Tables[0].Rows[i]["Father_name"].ToString();
address.Text = MyDataset.Tables[0].Rows[i]["Paddress"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
Designation.Text = MyDataset.Tables[0].Rows[i]["Designation"].ToString();
}
else
{
MessageBox.Show("Date Not Found");
}
}

private void button7_Click(object sender, EventArgs e)
{
MyConnection = new SqlConnection();
string ConString = ".; initial catalog=FDA_db; Integrated Security= SSPI";
MyConnection.ConnectionString = ConString;
MyConnection.Open();
MyAdapter = new SqlDataAdapter("select * from admin_newinfo_tb where CNIC='" +
cnic.Text + "' ", MyConnection);
SqlCommandBuilder builder = new SqlCommandBuilder(MyAdapter);
MyDataset = new DataSet();
MyAdapter.Fill(MyDataset, "admin_inqury_tb");
dataGridView1.DataSource = MyDataset.Tables["admin_inqury_tb"];
if (MyDataset.Tables[0].Rows.Count > 0)
{
i = 0;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();

name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
father_name.Text = MyDataset.Tables[0].Rows[i]["Father_name"].ToString();

address.Text = MyDataset.Tables[0].Rows[i]["Paddress"].ToString();

department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
Designation.Text = MyDataset.Tables[0].Rows[i]["Designation"].ToString();

}
}

private void button8_Click(object sender, EventArgs e)
{
if (i < MyDataset.Tables[0].Rows.Count - 1)
{
i++;
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 121


File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
father_name.Text = MyDataset.Tables[0].Rows[i]["Father_name"].ToString();
address.Text = MyDataset.Tables[0].Rows[i]["Paddress"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
Designation.Text = MyDataset.Tables[0].Rows[i]["Designation"].ToString();
}
else
{
MessageBox.Show("u r best");
}
}

private void button9_Click(object sender, EventArgs e)
{
if (i == MyDataset.Tables[0].Rows.Count - 1 || i != 0)
{
i--;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
father_name.Text = MyDataset.Tables[0].Rows[i]["Father_name"].ToString();
address.Text = MyDataset.Tables[0].Rows[i]["Paddress"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
Designation.Text = MyDataset.Tables[0].Rows[i]["Designation"].ToString();
}
}

private void button10_Click(object sender, EventArgs e)
{
i = MyDataset.Tables[0].Rows.Count - 1;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();

name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
father_name.Text = MyDataset.Tables[0].Rows[i]["Father_name"].ToString();

address.Text = MyDataset.Tables[0].Rows[i]["Paddress"].ToString();

department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
Designation.Text = MyDataset.Tables[0].Rows[i]["Designation"].ToString();

}

Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 122

private void button6_Click(object sender, EventArgs e)
{

conc.DeleteRecord("delete from admin_newinfo_tb where File_no=" + File_no.Text +
"");

cnic.Text = null;
File_no.Text = null;
rec_no.Text = null;
name.Text = null;
father_name.Text = null;
address.Text = null;
department.Text = null;
Designation.Text = null;
}

private void File_no_TextChanged(object sender, EventArgs e)
{

}
}
}

Search
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data;
using System.Management;
using FDA_db;

namespace FDA_EHRM
{
public partial class searchpersonalinfo : FDA_EHRM.MainForm
{
Connection conc = new Connection();
public SqlConnection MyConnection = null;
public SqlCommand MyCommand = null;
public SqlDataAdapter MyAdapter = null;
public DataSet MyDataset = new DataSet();
private int i = 0;
public searchpersonalinfo()
{
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 123

InitializeComponent();
}

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedItem == "CNIC")
{
this.cniclb.Visible = true;
this.cning.Visible = true;
this.getbt.Visible = true;
this.file_nolb.Visible = false;
this.file_nog.Visible = false;

this.namelb.Visible = false;
this.nameg.Visible = false;
this.gett.Text = comboBox1.Text;
}
if (comboBox1.SelectedItem == "Name")
{
this.namelb.Visible = true;
this.nameg.Visible = true;
this.file_nolb.Visible = false;
this.file_nog.Visible = false;
this.gett.Text = comboBox1.Text;
this.cniclb.Visible = false;
this.cning.Visible = false;
this.getbt.Visible = true;
}
if (comboBox1.SelectedItem == "File_no")
{

this.file_nolb.Visible = true;
this.file_nog.Visible = true;
this.namelb.Visible = false;
this.nameg.Visible = false;
this.cniclb.Visible = false;
this.cning.Visible = false;
this.getbt.Visible = true;
this.gett.Text = comboBox1.Text;
}
}

private void getbt_Click(object sender, EventArgs e)
{
MyConnection = new SqlConnection();
string ConString = "Data source=.; initial catalog=FDA_db; Integrated Security= SSPI";
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 124

MyConnection.ConnectionString = ConString;
MyConnection.Open();
if (this.gett.Text == "CNIC")
{
MyAdapter = new SqlDataAdapter("select * from admin_newinfo_tb where CNIC='"
+ cning.Text + "' ", MyConnection);
}
if(this.gett.Text=="Name"){
MyAdapter = new SqlDataAdapter("select * from admin_newinfo_tb where Name='"
+ nameg.Text + "' ", MyConnection);

}
if (this.gett.Text == "File_no")
{
MyAdapter = new SqlDataAdapter("select * from admin_newinfo_tb where File_no='"
+ file_nog.Text + "' ", MyConnection);

}
SqlCommandBuilder builder = new SqlCommandBuilder(MyAdapter);
MyDataset = new DataSet();
MyAdapter.Fill(MyDataset, "admin_inqury_tb");
dataGridView1.DataSource = MyDataset.Tables["admin_inqury_tb"];
if (MyDataset.Tables[0].Rows.Count > 0)
{
i = 0;


File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
father_name.Text = MyDataset.Tables[0].Rows[i]["Father_name"].ToString();
address.Text = MyDataset.Tables[0].Rows[i]["Paddress"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
Designation.Text = MyDataset.Tables[0].Rows[i]["Designation"].ToString();
cnic.Text = MyDataset.Tables[0].Rows[i]["CNIC"].ToString();
payscale.Text = MyDataset.Tables[0].Rows[i]["Pay_scale"].ToString();
number.Text = MyDataset.Tables[0].Rows[i]["Mnumber"].ToString();
}
else
{
MessageBox.Show("Date Not Found");
}
}

private void button7_Click(object sender, EventArgs e)
{
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 125

MyConnection = new SqlConnection();
string ConString = "Data source=.; initial catalog=FDA_db; Integrated Security= SSPI";
MyConnection.ConnectionString = ConString;
MyConnection.Open();
MyAdapter = new SqlDataAdapter("select * from admin_newinfo_tb where CNIC='" +
cnic.Text + "' ", MyConnection);
SqlCommandBuilder builder = new SqlCommandBuilder(MyAdapter);
MyDataset = new DataSet();
MyAdapter.Fill(MyDataset, "admin_inqury_tb");
dataGridView1.DataSource = MyDataset.Tables["admin_inqury_tb"];
if (MyDataset.Tables[0].Rows.Count > 0)
{
i = 0;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
father_name.Text = MyDataset.Tables[0].Rows[i]["Father_name"].ToString();
address.Text = MyDataset.Tables[0].Rows[i]["Paddress"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
Designation.Text = MyDataset.Tables[0].Rows[i]["Designation"].ToString();
cnic.Text = MyDataset.Tables[0].Rows[i]["CNIC"].ToString();
payscale.Text = MyDataset.Tables[0].Rows[i]["Pay_scale"].ToString();
number.Text = MyDataset.Tables[0].Rows[i]["Mnumber"].ToString();
}
}

private void button8_Click(object sender, EventArgs e)
{
if (i < MyDataset.Tables[0].Rows.Count - 1)
{
i++;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
father_name.Text = MyDataset.Tables[0].Rows[i]["Father_name"].ToString();
address.Text = MyDataset.Tables[0].Rows[i]["Paddress"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
Designation.Text = MyDataset.Tables[0].Rows[i]["Designation"].ToString();
cnic.Text = MyDataset.Tables[0].Rows[i]["CNIC"].ToString();
payscale.Text = MyDataset.Tables[0].Rows[i]["Pay_scale"].ToString();
number.Text = MyDataset.Tables[0].Rows[i]["Mnumber"].ToString();
}
else
{
}
}
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 126


private void button9_Click(object sender, EventArgs e)
{
if (i == MyDataset.Tables[0].Rows.Count - 1 || i != 0)
{
i--;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
father_name.Text = MyDataset.Tables[0].Rows[i]["Father_name"].ToString();
address.Text = MyDataset.Tables[0].Rows[i]["Paddress"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
Designation.Text = MyDataset.Tables[0].Rows[i]["Designation"].ToString();
cnic.Text = MyDataset.Tables[0].Rows[i]["CNIC"].ToString();
payscale.Text = MyDataset.Tables[0].Rows[i]["Pay_scale"].ToString();
number.Text = MyDataset.Tables[0].Rows[i]["Mnumber"].ToString();
}
}

private void button10_Click(object sender, EventArgs e)
{
i = MyDataset.Tables[0].Rows.Count - 1;
File_no.Text = MyDataset.Tables[0].Rows[i]["File_no"].ToString();
rec_no.Text = MyDataset.Tables[0].Rows[i]["Record_no"].ToString();
name.Text = MyDataset.Tables[0].Rows[i]["Name"].ToString();
father_name.Text = MyDataset.Tables[0].Rows[i]["Father_name"].ToString();
address.Text = MyDataset.Tables[0].Rows[i]["Paddress"].ToString();
department.Text = MyDataset.Tables[0].Rows[i]["Department"].ToString();
Designation.Text = MyDataset.Tables[0].Rows[i]["Designation"].ToString();
cnic.Text = MyDataset.Tables[0].Rows[i]["CNIC"].ToString();
payscale.Text = MyDataset.Tables[0].Rows[i]["Pay_scale"].ToString();
number.Text = MyDataset.Tables[0].Rows[i]["Mnumber"].ToString();
}

private void cnic_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
}
private void button5_Click(object sender, EventArgs e)
{
file_nog.Text = null;
cning.Text = null;
nameg.Text = null;
File_no.Text = null;
cnic.Text = null;
rec_no.Text = null;
name.Text = null;
Human Resource Management System Of WASA

College Of Computer Science and Information Studies, GCUF 127

father_name.Text = null;
address.Text = null;
department.Text = null;
Designation.Text = null;
cnic.Text = null;
payscale.Text = null;
number.Text = null;
}
}
}

Вам также может понравиться