You are on page 1of 289

Industrial Man Power Resource Organization

A project Report on

Industrial Man power Resource Organization


(I.M.P.R.O)

Submitted By Angad Jayendra Kamat Enrollment no- 105321041


Study center AISECT (M194)

Bachelor Of Computer Application (B.C.A 2010-2013)

Indira Gandhi National Open University

Industrial Man Power Resource Organization

Synopsis

Industrial Man Power Resource Organization Project proposal Bachelor of Computer Application (B.C.A)

Of IGNOU UNVERSITY

Submitted By

Mr. Angad Jayendra kamat Enrollment No: 105321041 Course: CS-76

Semester: VI Semester Study center: AISECT


Regional center: 15

Industrial Man Power Resource Organization Table of Contents

Sr. No. 1 2 3 4 5 6 7 8 9 10 11 12 13

Topic Name INTRODUCTION OBJECTIVE IMPRO SYSTEM benefits IMPRO SYSTEM modules software and hardware reuquirments ABOUT LANGUAGE AND DATAABSE Data flow Diagram flow chart E-R Diagram Process Logic flow of Modules Data Dictionary Scope and Limatation Testing Type

Page No. 5 5 6 7 12 13 14 17 18 19 23 28 29

Project category - RDBMS


4

Industrial Man Power Resource Organization

1.Introduction

As years progressed, the approach of the management changed

towards the human capital. Now Hierarchical Organization is part of every organization, and has its own identity and importance. In this scenario, the bigger organizations need to put lot of effort in the management of human Resources, as they are underlying capital asset to the organization. In doing so, along with times, the Organization Information changed from its

basic operations to more strategic approach. With emerging a new term of corporates things are needed and getting more practical day by day and instant accesses is needed to all to avoid time consumption factor behind a single task. Industrial manpower resource organization (IMPRO) provides a centralized view of Employee module where by sitting at remote location of the one can see a total hierarchy with every single detail of employee working within the company from top to bottom. These help the management to have one centralized database so that they do not need many management software.to monitor the hierarchy of the company this software will surely automate and create a helping hand to various department of the company especially to the board of directors to of the company monitor and have quick look to the current working status of employees from various branch

2.Objectives
Organizer) is to maintain the hierarchy of the employees within an organization. It complete enterprise and helps them in managing employees. The objective behind developing IMPRO (Industrial Manpower Resource provides the manger and administrative Department an overall hierarchical view of the Every Organization has many managers, who are responsible for all the activities in the organization. These managers manage different aspects of the organizational essential management issue is human resource organization management issues, such as manufacturing, production, Marketing, etc.one such

Industrial Man Power Resource Organization

3. Benefits of the IMPRO


Finding ground level employee performance by the topmast manager. Maintenance of profile details of the employees, and retrievals as and when required. Overall & detailed view of the organization hierarchy, which is very much essential in making effective decisions. Judging the potentiality of the employees. Maintenance of the data when the organization has many branches spread over wide geographical area. Accessing one branch information from another branch. Future planning issues based on the current HR information. Employees success planning. Vacancy situations and their priority /effect on the organizations performance. Employee motivational & conflict resolving issues.

Industrial Man Power Resource Organization

Description of modules
From an end-user perspective, the industrial man power resource organization Project consists of three functional elements employee Module, department Modules and a display module

Administrator module -Administrator is treated as a super user in this system.


He can have all the privileges to do anything in this system. He is the person who adds the Profile of a HR Manager.

Add/Modify Branches

in this sub-module administrator as solo rights of adding

,editing the branches of each section ,of the organization

Add/Modify Employee portfolio In this sub-module of employee portfolio admin edit the employee information such as employee work progress, change in personal details and so on.

can add, delete employee information from the database and at the same time he can

Add/Modify Department The another administrative sub-module of adding


modifying the department information or according to its section ,employee hierarchy ,he as rights to delete data of department from IMPRO and vice versa to add them

Assign HR`-the sub-module of admin module is adding HR to particular Department Department.

and at the same time he can remove HR from particular section of the Sub-

Industrial Man Power Resource Organization

H-R Module -

In this module Human Resource Manager is solo Responsible for

managing the manpower of the company he can assign, Remove, and manipulate the department according to his Decision and the employee.

Add Employee In this sub-module Human Resource Manager can add employee
taken decisions. He can create employee registration

in the particular sub section of department or in the main department according to the

Add /update vacancy In this sub-module of Add/update vacancy Human


Resource Manager can create remove vacancy from particular section of Department .he can update vacancy in IMPRO for recruitment

Assign Department Human Resource Manager can assign Department and


also can assign HOD to particular Department. He can add remove HOD and assign section as a Department

Assign Designation

-Human Resource Manager can assign Designation to the

Employee from particular Section or from particular Department .He can also modify the Designation by an another Employee

Industrial Man Power Resource Organization Process details


This following process will be done to get the desired results. Employee hierarchy can be created using Employers and their superiors information. Department Hierarchy can be created using the departmental interdependencies. Vacancy list in various departments can be identified and prioritized by calculating the position weight ages. Employees can be transferred from one department to another based on different criteria provided by the HR manager. Employee retention can be processed depending their performance.

Employee Modulegiven rights by Admin

In this module employee as rights to change his profile view and

other basic information .He can see updated vacancy and he can do only associated work as

Manage update/Profile in this sub-module of employee here


he can manage by updating his profile information as basic information he as very limited rights assign by the HR manager

Apply Vacancy In this sub module of employee module here


the candidate can see the vacancy of available in the department and other section

Change of username & password-in this sub module of


password of hid profile tentatively

employee here the employee can change his Username and

Industrial Man Power Resource Organization Job Rotation-

Job rotation process will be invoked when the employee experiences

monotony in his work / duty. These will result in poor performance, sometimes leads to major errors in the field of operation. This can be overcome job rotation process. In this the employee will be moved to other department of interest, so that the employee will work with renovated vigor and vitality. In some cases, to fill up the emergency vacancies, job rotation process will be executed to avoid unforeseen delays. In any case along with the candidate / employee his credentials and other associates will be passed to the destination department.

Position Weightage section-

Position weightage will be calculated based on Departments

weightage, section weightage and even the designation weightage. Each position in the organization will have certain importance in the functionality of the overall organization. The and as well as the position in the authority flow. weightage of the each position will be calculated by using the actual position in the organization

Live status section- Live status gives accurate information about which Employee Will work in which section his superior employees or his subordinates can be identified along with their corresponding departments so that the employee info can be managed easily. department as and when required this can be effectively managed. Their performance can be monitored and if they need can be deputed to other

User Registration -The system has a process of registration. Every User need to submit his complete details in the form of registration. Whenever a User registration completed he/she can log into the system. automatically he/she can get a user id and password. By using that user id and password

10

Industrial Man Power Resource Organization

Reports -In this Module it allows to submit Various Reports from various
Departments, Section, employee and so on .Following are the various kinds of Reports. Vacancy Reports Employee Report Branch Report

Authentication -Authentication is nothing but providing security to the system. Here every must enter into the system throw login page. The login page will restrict the unauthorized users. A user must provide his credential like user Id and password for log

into the system. For that the system maintains data for all users. Whenever a user enters his user id and password, it checks in the database for user existence. If the user is exists he can be treated as a valid user .Otherwise the request will throw back.

11

Industrial Man Power Resource Organization

. Software requirement
Front end - vb.net Back end - SQL server 2005 Tools - Microsoft visual studio 2008 O.S xp/windows 98 /windows 7 IE 6.0+ / Firefox 3.5+ /chrome. Enabled intranet administration with other facility

Hardware requirement
Processor Intel Pentium 4 or above Minimum 512 MB Of RAM At least 16 GB Hard disk space Cache 512 KB NIC (network interface card ) Video CRT 1024 x786 Bit Code Mode

12

Industrial Man Power Resource Organization 6 .ABOUT LANGUAGE AND DATAABSE VB.net
Visual Basic 6 is built on the Windows Server System to take major advantage of the OS and which comes with a host of different servers which allows for building, deploying, managing and maintaining Windows Based solutions. The Windows Server System is designed with performance as priority and it provides scalability, reliability.
Rapid Application Development (RAD) Support. Powerful Windows-based Applications Simplified Deployment Improved Coding

Powerful, Flexible, Simplified Data Access Direct Access to the OS Platform Object-Oriented Constructs COM Interoperability

SQL Server 2005


When we choose a backend for an enterprise level application we have so many options, like Oracle, Sybase, MySql, however we choose Microsoft SQL Server 2000 as our database, and it has so many features which is ideal for our dot net based application. Includes Support for Multiple Platforms Integration with Windows 2000 Scalability Replication Reliability Centralized Management Integration with Microsoft .NET Enterprise Servers

13

Industrial Man Power Resource Organization

7. Data flow Diagram (up to 2nd level)

14

Industrial Man Power Resource Organization

15

Industrial Man Power Resource Organization

16

Industrial Man Power Resource Organization

8. PROCESS FLOW CHART OF MODULE

17

Industrial Man Power Resource Organization

9. ER-Diagrams of (IMPRO)

Job_Rotation Sections +Sect_ID +Sect_name +Section_Inch +Dept_number +Emp_ID +present_Designation +Deputed_to +Status +Remarks

Designation +Desgin_ID +Designation 1..*

Designation_weightage +Designation_Id +Dept_no +Weightage

Employees Department +Dept_No +Dept_name +Dept_head +Dept_location +Emp_ID +Emp_name +Dept_number +Designation _ID +Section_ID 1..* +Address +Phone +Email 1..* Vacancies +Vacancy_ID +Dept_No +Section_ID +Designation_ID +No_of_vacancies +Status +Vacancy_ID +Prirority Vacancy_Fill_Details +Vacancy_Id +Emp_ID 1..* +Fill_Date +In_Take_Details Designation_Layer +Designation_Id +Layer +Weightage

1..*

Department_Postion_Weightage +Dept_No +Layer +Weightage

Department Interdependency +Dept_No +Up_Dep_NO +DND_Dept_NO

18

Industrial Man Power Resource Organization

10.Process Module flow

19

Industrial Man Power Resource Organization

20

Industrial Man Power Resource Organization

21

Industrial Man Power Resource Organization

22

Industrial Man Power Resource Organization

11. Data structures of each module

23

Industrial Man Power Resource Organization

24

Industrial Man Power Resource Organization

25

Industrial Man Power Resource Organization

26

Industrial Man Power Resource Organization

27

Industrial Man Power Resource Organization

12.Scope & limitation of project


enterprise ..

scope and enhancement of the project

can enhance according to the needs of the company and changing competitive trend in upcoming future .the project have the ability of modification according to the need of the

In future if the enterprise turns nationalized or MNC company

IMPRO (industrial manpower resource organization) will help them to have one central database so the authority can access from any remote location branch

In the upcoming time to make the company more modernized in corporate fashion (employee can work rite from the home from associated system ) The system can be empowered with advance protocol for networks among the branches so that there could be more authentication and accesses could be secure and quick (for data security purpose )

Limitations Every software cannot be self-center red for any such its
case Industrial Manpower Resource Organization (IMPRO) as some of its limitation which are mention as follows Prepared according to customers requirement so in these

employees cannot be automated according to customer Requirement we have to add that module. Though the IMPRO is an online (intranet) project do not

IMPRO do not have Payroll System by which salary of

provide any module for employee to work from remote place

28

Industrial Man Power Resource Organization

13. Testing process used


Unit testing System Testing

Are you doing this project for any company /industry?


- NO

29

Industrial Man Power Resource Organization

Project Report

30

Industrial Man Power Resource Organization


A PROJECT REPORT ON

Industrial Man power Resource Organization

Submitted to Indira Gandhi National Open University in partial fulfillment & Requirement for the Degree B.C.A

(Bachelor of Computer Application)

Submitted by Mr. Angad. J. Kamat

Enrollment no- 105321041

Department of computer science

Sahyog College of Management & Computer Studies


(Affiliated to university of Mumbai & IGNOU-AISECT, Approved by AICTE) Market Road, opp Parekh Medical, Jambhali Naka, Thane (w)-400601

31

Industrial Man Power Resource Organization

CERTIFICATE

This is to certify that Mr. Angad.J.Kamat bearing Enrollment no. 105321041 has successfully submitted partially completed project titled Industrial Manpower Resource Organization under Mrs. Sneha Motilalji Gupta guidance towards the partial fulfillment of semester VI of Bachelor of Computer Applications as prescribed by the IGNOU University under academic year of 2010-2013

Internal Examiner Date:

External Examiner Date:

Principal (Sahyog College of management & computer studies)

32

Industrial Man Power Resource Organization

ACKNOWLEDGMENT

I express thanks and gratitude and thanks to Almighty God, my parents and other family members and friends without whose unstained support; I could not have made this career in Software Industry I wish to place on my record my deep sense of gratitude to my project guide, Mrs. Sneha Motilalji Gupta for her constant motivation and valuable help through the project work. Express my gratitude to Mrs. Neeta Patil, Principal of Sahyog College of Management & Computer Studies for her valuable suggestions and advices throughout the B.C.A course. I also extend my thanks to other Faculties for their Cooperation during my Course. Finally I would like to thank my friends for their cooperation to complete this project.

33

Industrial Man Power Resource Organization

Preface

Organization project (IT resources) done by Angad.J.Kamat for managing the manpower of the organization in synchronous and one directional way to obtain cent percent growth. the project. This report depicts the logic, coding, various diagrams, models used for preparing

This

project aims at introducing Industrial Manpower Resource

report.

The intricate details of the software have been published in the project

present in the project are subjected to further enhancements as per the needs of the company.

Although the software has been prepared with utmost care, the Ingredients

34

Industrial Man Power Resource Organization

Table of contents
Sr. No. 1 2 3 4 5 Topic Name Abstract Introduction Objective Project Profile Requirment Analysis
5.1 SRS (Software Requirment Specification) 5.2 Display Module 5.3 Benefits of Module 5.4 Functional Requirement 5.5 User-Interface 5.6 Technology Review

Page No. 37 39 41 43 45

6 7 8

Feasiblity Study Methodology Design Model 8.1 E-R Diagram 8.2 Data Flow Diagram (All Level) 8.3 Activity Diagram 8.4 Uml Diagram

65 69 75

35

Industrial Man Power Resource Organization


9 Design Document 9.1 Master Table 9.2 Data Dictionary (all tables) 9,3 Modularization Design 9.4 Database Design 10 Interface Diagrams (Screen shots) 10.1 Input Screen 10.2 Code 11 12 13 14 15 16 10.3 Output Screen Testing And Results System Implementation Implementation of security Limitations & future work Conclusion Bibliography 260 278 280 283 285 288 111 94

36

Industrial Man Power Resource Organization

Abstract

37

Industrial Man Power Resource Organization

The software industry is one of the fastest growing business sectors worldwide
with new Opportunities emerging continually in hundreds of different fields.

applicant and set up the interview between their applicants and the client firm. recruited as employees of that firm for the duration of the project (job)

Software firms match the requirement of the firm with the skills of their

Interviews are then conducted and the candidates selected in the interview are

Management and implements a web-based application for a fictitious firm.

This project examines the issue related to dynamics Human resource

The system is implemented using 3-tier approach, with backend database (SQL
server database) a middle tier of Microsoft internet
create and implement the application. information service (IIS) and VB.NET as a front end. This report also discusses each of the underlying technologies used to

This project is aimed at developing an online intranet based HR management


system which includes central Recruitment process system, Employee profile, Employee hierarchy, job rotation Among employee, Department hierarchy, potentiality of the
employee, Appraisal tracker system, Maintenance of the data when the organization

has many branches spread over wide geographical area . Future planning issues based on the current HR information

38

Industrial Man Power Resource Organization

Introduction

39

Industrial Man Power Resource Organization

As years progressed, the approach of the management changed towards


the human capital. Now Hierarchical Organization is part of every organization, and has its own identity and importance. Every organization as a vital factor know as manager who manages different aspect such as marketing, production, work.

manufacturing but managing human resource is an major factor for synchronize

In this scenario, the bigger organizations need to put lot of effort in the

management of human Resources, as they are underlying capital asset to the organization. In doing so, along with times, the Organization Information changed from its basic operations to more strategic approach. With emerging a and instant accesses is needed to all to avoid time consumption factor behind a single task.

new term of corporates things are needed and getting more practical day by day

Industrial manpower resource organization (IMPRO) provides a


centralized view of Employee module where by sitting at remote location of the the company from top to bottom. These help the management to have one one can see a total hierarchy with every single detail of employee working within centralized database so that they do not need many management software.to monitor the hierarchy of the company this software will surely automate and create a helping hand to various department of the company especially to the of employees from various branch of the company

board of directors to monitor and have quick look to the current working status

40

Industrial Man Power Resource Organization

Objectives

41

Industrial Man Power Resource Organization

Resource Organizer) is to maintain the hierarchy of the employees within an organization. It provides the manger and administrative department an overall hierarchical view of the complete enterprise and helps them in managing employees. By providing modules such as Job rotation, Recruitment Process System, Employee Portfolio, Employee potential and work progress, Hierarchical view of employee structure from ground level employee to board of director The combination of these modules into one application assures the perfect platform for re-engineering and aligning your HR processes along with the organizational goals
Development of a Vacancy situation and their priority /effect on the organizations performance for the HR group of a Company Development of an Employee motivational & conflict resolving issues / Overall & detailed view of the organization hierarchy, which is very much essential in making effective decisions.

The objective behind developing IMPRO (Industrial Manpower

42

Industrial Man Power Resource Organization

Project Profile

43

Industrial Man Power Resource Organization

Project Title Industrail Manpower Resource Organziation (IMPRO) Team size


-

1
- Angad Jayendra Kamat

Developed by

Enrollment NO - 105321041 Internal Guide - Snehal motilalji Gupta Front End Back End
- VB.NET -

SQL Server 2005

Study Center - AISECT (M 194)

44

Industrial Man Power Resource Organization

Requirement Analysis

45

Industrial Man Power Resource Organization

Software Requirement Specification (SRS)


Purpose

Main purpose of developing Industrial Manpower Resource Organization

(IMPRO) software is to improve and automate the Administration of human resource of an organization. IMPRO will assist to improve future planning Of an organization by checking the potentiality and progress of its employee .which in returns will take the graph of company to a high extend .IMPRO is a project or software to improve the quality and quantity of the employee of a particular organization. This yields the growth of organization.

Scope
Industrial Manpower Resource Organization as a wide range of scope in the company .With the assistance of IMPRO human resource administration of an organization can be managed synchronously. With the help of contrasted points of IMPRO such as Job rotation Recruitment management Vacancy formulation. Employee portfolio. Hierarchy of employee (top to bottom) conflict resolution Employees potential & work progress.

46

Industrial Man Power Resource Organization

Existing System
Existing Human resource management system is manual based The Man power Resource Organization falls short of controlling the used in synchronization system.

employees activates, by which manpower of the company is not

The decision for appraisal of assigning next project to the employee or to train him/her to enhance the skills. Employee potentiality is not recognized.

Manual Recruitment or creating vacancies in the company & job manager.

portability among employee is calculated manual by the associate

To view the company employees from top to bottom i.e. in

Hierarchical model at a glance is not possible in the existing system.

Draw Backs
There is no backup Facility.

The existing system requires more man power, as one or more Need of extra manual effort Not very much accurate

Employees are required for data maintenance and data entry work

Data threating is major constraint.

47

Industrial Man Power Resource Organization

Proposed system
The proposed system provides detail general information about the if associated.

employee along educational, certification, skills and project details

It enhances the HR Administrator in adding, viewing and updating employees detail and generates various reports regarding employees skills, experience, potential and work progress. Suggestions posted by the employees are upheld for taking care of the necessary steps in forwarding companys obligation.

It provides recruitment, training, vacancy management portal which becomes handy for HR manger.

It gives an hierarchical view of employees working ,which becomes easy for monitoring

Also provides Inter-network accessing of employee details form overseas branches.

Future planning of the company can be done on potential and work


progress of its employee

48

Industrial Man Power Resource Organization

Benefits of the IMPRO

Finding ground level employee performance by the topmast manager. Maintenance of profile details of the employees, and retrievals as and when required. Overall & detailed view of the organization hierarchy, which is very much essential in making effective decisions. Judging the potentiality of the employees. Maintenance of the data when the organization has many branches spread over wide geographical area. Accessing one branch information from another branch. Future planning issues based on the current HR information. Employees success planning. Vacancy situations and their priority /effect on the organizations performance. Employee motivational & conflict resolving issues.

49

Industrial Man Power Resource Organization

Description of modules
From an end-user perspective, the industrial man power resource organization Project consists of three functional elements employee Module, department Modules and a display module and job rotation

Employee module - In these module employee details such as name, addresses,


designation, contact number and other details are stored and shown with employee hierarchy and employee enumeration Employee Creation sectiondetails. Employee hierarchy section - In this system Administration department is the Root Department under which different departments exist. So the Employment hierarchy will start with root department head like chairman and subsequently the department employees with dept. head and section employees with their section employees and for sub departments in the departments can be identified .Employee

In the Hierarchical Organization Information System

each employee is created with their corresponding department, designation and section

list enumeration

section -The employee details already in the

database so the details can be retrieved as and when required by taking the selective criteria from the HR manager..

Employee

profile view The employee profile sub-module contains an employee

profile details where HR manager can view Basic details , Technical Education , Experience , skills and other potentiality

50

Industrial Man Power Resource Organization

Department module weightage are shown in detail.

In this module department information such department id,

department and sub department names, live status of employee, job rotation, and position

Department entry/department hierarchy section-In this module, Master Data for the departments can be created employees refer this data .Sub departments Can be identified .Some of The departments will have Different

Sections Each Department having Department heads ,so department employees should reported to the department head he may be subordinate to his superior Department he shall report to him. Some of department having sections so section employees shall be reported to the section in charge he shall report to the department head. From this Departments, sub-departments the Department hierarchy shall be created

Live status section- Live status gives accurate information about which Employee Will work in which section his superior employees or his subordinates can be identified along with their corresponding departments so that the

employee info can be managed easily. Their performance can be monitored and if they need can be deputed to other department as and when required this can be effectively managed.

Employee list enumeration section-The employee details already in the

database so the details can be retrieved as and when required by taking the overseas branches through inter-network schema.

selective criteria from the HR manager. This database can be also viewed from

51

Industrial Man Power Resource Organization Process details - Employee hierarchy can be created using Employers their
superiors information. Department Hierarchy can be created using the departmental interdependencies. Vacancy list in various departments can be identified and prioritized by calculating the position weight ages. Employees can be transferred from one department to another based on different criteria provided by the HR manager. Employee retention can be processed depending their performance. Ongoing process work of the employee and the department a general report can be viewed

Job Rotation-

Job rotation process will be invoked when the employee

experiences monotony in his work / duty. These will result in poor performance, sometimes leads to major errors in the field of operation. This can be overcome job rotation process. In this the employee will be moved to other department of interest, so that the employee will work with renovated vigor and vitality. In some cases, to fill up the emergency vacancies, job rotation process will be executed to avoid unforeseen delays. In any case along with the candidate / employee his credentials and other associates will be passed to the destination department.

Position Weightage section- Position weightage will be calculated based on


Departments weightage, section weightage and even the designation weightage. functionality of the overall organization. The weightage of the each position the position in the authority flow. Each position in the organization will have certain importance in the will be calculated by using the actual position in the organization and as well as

Vacancies details and process details section-Vacancies raised in various departments can maintained by filling the new employees or by shifting/additional charges to existing employees.

52

Industrial Man Power Resource Organization

Display module - In these module login, menus, contact us, instant search,
department tables, change of administrator, monitor section are shown

Login- whereby administrator


department details

or any associated high commission can login

through associated id and password to monitor the employees status and

Menu here graphical user interface of various menus in the

software is being shown such employee details. Department details ,employee work status ,vaccines in the company ,hierarchy of the company employee

Contact us module help the user to contact the software developer in case of any problems faced and online support is also provided through software development to solve their problems

Search section where administrator can search about the


module of employee

employee ,department details And anything related to organization

Change of administrator- these is an very helpful module which provide


high commission to instant monitor the details

change of administrator Change of user name and password of the assassinates

Instant accesses- these module provides instant accesses of hierarchical and detail information from other branch of the company siting at remote location

53

Industrial Man Power Resource Organization Functional Requirement


Input Design - Input design is a part of overall system design. Input design should be an acceptable format and valid data for entry .Input design should be according to the requirement asked in the form or the module

specified... The main objective during the input designs is as given below...
To produce a cost-effective method of input. To achieve the highest possible level of accuracy.

To ensure that the input is acceptable and


understood by the user. User should be trained for the giving desired input Input should be user friendly Valid input should be given.

Input Stages - input design should have a validation so that it as synchronize output. The main input stages can be listed as below
Data recording Data transcription Data conversion Data verification Data control Data transmission Data validation Data correction

54

Industrial Man Power Resource Organization Input Type According to input Design and Input Stage, input type is
Associated with the data input. Depend on the variable taken while designing the software input type may differ from numerical, alphabets, alphanumerical etc. It is necessary to determine the various types of inputs. Inputs can be categorized
External inputs, which are prime inputs for the system. Internal inputs, which are user communications with the system. Operational, which are computer departments communications to the system? Interactive, which are inputs entered during a dialogue. Mandatory Information ,which are essential to complete the process

Input Media- Input media should consider the following factors. Type of input Flexibility of format Speed Accuracy Verification methods Rejection rates Ease of correction Storage and handling requirements Security Easy to use Portability

55

Industrial Man Power Resource Organization Output Design Outputs from computer systems are required primarily to

communicate the results of processing to users. They are also used to provide a permanent copy of the results for later consultation Output Design is usual meant after the input design that varies from input variable taken while designing structure, the various types of outputs in general are: . External Outputs, whose destination is outside the organization,. . Internal Outputs whose destination is within organization and they are the Users main interface with the computer. . Operational outputs whose use is purely with in the computer department. . Interface outputs, which involve the user in communicating directly with interface.

Output Method - It is not always desirable to print or display data as it is held on a


computer. It should be decided as which form of the output is the most suitable. The outputs should

be defined in terms of the following points Content of the output Format of the output Location of the output Frequency of the output Volume of the output Sequence of the output The suitability for the device to the particular application...

.The response time required

56

Industrial Man Power Resource Organization

User Interface-

user interface can be a major source of interacting

between the software now it base on whether the user interface is command base system or graphical user interface. If the user interface is graphic based then the user may get friendly with the software and becomes handy to use. But if the user interface is command line base then user may have some problem with handiness For managing with the software. So based on the user interface it has been broadly categorized between -

a. User based command dependent interface - The user base command


dependent interface dependent partial on the user to proceed the further process example can be taken for installation of software which partial user based command dependent interface. Some of the features of user based command dependent interface are Command driven interfaces: In this type of interface the user inputs commands or queries which are interpreted by the computer.

Forms oriented interface: The user calls up an image of the form to his/her screen and fills in the form. The forms oriented interface is chosen because it is the best choice.

Process

cannot

be

completed

without

user

intermediation User based command dependent interface is slow process

57

Industrial Man Power Resource Organization

b.COMPUTER-INITIATED

INTERFACES-computer initiated interface

based on smart user interactive interface where by the process compilation is not totally dependent on user, it as a self-programmed setup .for example while completing query in oracle database self-correction program setup where it corrects the user query. Compared to user dependent interface computer-initiated interface is quite flexible in installation and friendly to non-programmer end user. Error detection, error stimulation, error correction, is some examples of smart computer initiated interface. Following computer initiated interfaces were used:

The menu system for the user is presented with a list of alternatives and the user chooses one of alternatives. Questions answer type dialog system where the computer asks question and takes action based on the basis of the users reply. It provides a MCQ type question format where user just want to tick the appropriate answer and the process is completed

58

Industrial Man Power Resource Organization

Technology Review
Technology Overview -A major element in building a system is
the selection of compatible software since the software in the market is experiencing a geometric progression. Selected software should be acceptable to the firm and the user as well as it should be feasible for the system. Selection of software should be according to the market trend and user requirement so that while using the software userfriendless must exist. The system is developed in VB.NET 2008 (Microsoft Visual Studio) and SQL server 2005 for use on Intranet Environment

Microsoft Visual Studio 2008- Is a whole package for web


development and marketed by Microsoft to allow programmers to build dynamic web site, web application and web services. It was first released in January 2008 with service pack 1.0 with .Net framework, and is the successor to Microsoft visual studio 2005 technology. Visual studio is built on the common Language runtime (CLR), allowing Programmers to write VB.net code using any supported .NET language. The VB.NET soap extension framework allows VB.NET components to process SOAP messages.

59

Industrial Man Power Resource Organization

Features of Visual studio 2008


Easy Programming Model Flexible Language Options Great Tool Support Rich Class Framework Complied Execution Rich Output Caching Web-Farm Session State Enhanced Reliability Easy Deployment Dynamic update of Running Application Easy Migration path Modularization Visual Studio Integration Flexibility

60

Industrial Man Power Resource Organization Visual Basic.Net (VB.Net) Is an object-oriented computer programming

language that can be viewed as an evolution of the classic

Visual (VB), implemented on

the .NET Framework. Microsoft currently supplies two main editions of IDEs for developing in Visual Basic: Microsoft Visual Studio 2012, which is commercial software and Visual Basic Express Edition 2012, which is free of charge. The command-line compiler, VBC.EXE, is installed as part of the freeware .NET Framework SDK. Mono also includes a commandline VB.NET compiler

Features of VB.Net
Hosted Common Language Runtime with SQL server 2005 developers can create
database objects using familiar language such as Microsoft visual C# .Net and Microsoft Visual Basic .Net. Developers can also create two new objects user defined types and aggregates.

database allowing developers to build new classes of connected around web service and across any platform or device..

Native XML Support native XML data be stored, Queried and indexed in a SQL server

(MARS), ADO.NET in SQL server 2005 evolves access and multiplication to achieve greater scalability and flexibility.

ADO.Net Version 2.0- from new support for SQL types to multiple Active result Sets

Security Enhancements- the security model in SQL Server 2005 separate users from
objects, provides fine-grain access and enables greater control of data access. Additionally all system tables are implemented as views providing more control over database system objects.

61

Industrial Man Power Resource Organization


Web Services with SQL Server 2005 developers can develop Web service in the

database tier making SQL Server a hypertext protocol (HTTP) listener and providing a new type of data access capability for web services- centric applications..

framework streamlines development and debugging of data-driven applications. Developers can build database objects, such as stored procedures using any .Net language and can seamlessly debug across .Net and transact (TSQL) languages...

Visual Studio Integration tight integration with Microsoft visual studio and the .Net

an application at design time.

Embedded Reports use client side reporting controls to embed real time reports into

for developing scalable database application .These enhancement include error handling, recursive query capabilities, relational operator PIVOT, APPLY, ROW_NUMBER and other row ranking functions and more.

Transact SQL Enhancements SQL server 2005 provides new language capabilities

Messaging infrastructure that provides reliable transactional delivery of critical messages between servers- with the scalable high performance that is expected with asynchronous Queuing

Reliable Messaging for Asynchronous Application Service Broker is a robust

62

Industrial Man Power Resource Organization

SQL 2005 (Structure Query Language) - Microsoft SQL server 2005 provides the
database developer the opportunity to locate programming code in native formats or create 2005, delivers the functionality of the powerful class library in combination with modern server driven complex systems. The .Net framework in combination with the SQL Server programming languages. Common Language Runtime (CLR) is used to code procedures, triggers and function within the chosen language in the .Net framework .Using object oriented constructs such as structured exception handling, name space, classes and array assist the programmer.

Feature My SQL 2005 Database Mirroring extend log shipping capabilities with the database mirroring
solution .you will be able to use database mirroring to enhance availability of your SQL server system by setting up automatic failover to a standby server.

Online restore - with SQL server 2005 database administration are able to perform
the availability of SQL server because only data being restored is unavailable.

a restore operation while an instance of SQL server is running .online restore Improves

Online Indexing operation- the online index option allows concurrent


data and nay associated indexes data definition language (DDL) execution .for example the underlying data.

modification (updates, deletes and inserts) to the underlying table or clustered index while a clustered index is being rebuilt you can use to make updates to make updates to

Fast recovery a new faster recovery option improves availability of SQL database.
Administration can reconnect to a recovering database transaction log has been rolled forward

63

Industrial Man Power Resource Organization


Standards Based Information Access Any object data source or business
intelligence component can be exposed using standards based protocols such as SOAP and HTTP eliminating the need for a middle tier listener such as IIS .

SQL Server Management Studio SQL Server 2005 includes SQL Server
Management Studio a new integrated suite of management tools with the functionality to develop .deploy and Troubleshoot SQL Server database as well as enhancement to previous functionality

Dedicated Administrator Creation SQL Server 2005 provides a dedicated


administrator connection that administrator can use to accesses a running server even if the server is locked or otherwise unavailable. This capability enables administrators to trouble shoot problems on a server by executing diagnostic functions

Data Partitioning data Partitioning is enhanced with native table and index
partitioning that enabled efficient manageability of large and indexes.

Replication Enhancements for distributed database, SQL Server -2005 provides


comprehensive schema Change (DDL) replication, next-generation monitor capabilities Manageability enhancements include: improvements to the user interface, including a new Replication Monitor; easier management of tables with identity columns; the ability for transactional subscriptions to be initialized from a backup; easy-to-manage snapshots for merge publications with parameterized filters. Availability enhancements
include: the ability to make schema changes to published tables; peer-to-peer transactional replication; the ability to group changes to related rows in merge replication.

Replication Mobility Enhancements- Merge replication provides the ability to


replicate data over HTTPS with the Web synchronization option

64

Industrial Man Power Resource Organization

Feasibility Study

65

Industrial Man Power Resource Organization


The main points to be discussed in system analysis are: Specification of what the new system is to accomplish based on the user requirement. Functional hierarchy showing the functions to be performed by the new system and their relationship with each other Functional network which are similar to function hierarchy but they highlight those functions which are common to more than one procedure List of attribute of the entities these are the data items which need to be held about each entity (record).

Analytical issues based on the user requirements and the detailed analysis of a new system, the new system must be designed .this is the phase of system designing .It is a most crucial phase in the development of a system. Normally the design proceeds in two stages.

Preliminary or general design. Structure or detailed design.

Preliminary or general design in the preliminary or general design,


these features and the benefits to be derived are estimated .If the project is still considered to be feasible, we move to the detailed design stage

the features of the new system are specified. The cost of implementing

66

Industrial Man Power Resource Organization Structure or Detailed design- in the detailed design stage, computer
oriented work begins in earnest. At this stage the design of the system becomes more structured. Structure design is a blue print of a computer

system solution to a given problem having the same components and interrelationship among the same components as the original problem. Input, output and processing specification are drawn up in details. In the design stage, the programming language and platform in which the new system will run are also decided

Preliminary Investigation- in preliminary investigation, we examine


the requirement of client, who require an ERP system to ease their manual activity .we has collected the basic information as in different types of reports required, different facilities available. We interacted with few studied the medical center existing scenario, which includes all manual determination that the proposed system is feasible.

doctors and facility team members on their manual work performed. We work to be done. An important outcome of preliminary investigation is the As more insight is gained during problem

definition team members should confirm than the project actually is

feasible. The objective in accessing feasibility is to determine whether the development project has a reasonable chance of success. There are six different categories of feasibility and they are-

Economic Feasibility Technical Feasibility Operational Feasibility

67

Industrial Man Power Resource Organization

Economic Feasibility No extra hardware and software cost because all the resources are available... are familiarized with required in introducing the system the

Users

functionality of the system and therefore no training cost

Maintaining the software as no such with system maintenance.

specified cost it can be maintain same

Technical Feasibility it is related with hardware and software


present at the organization premises. IIS windows component MS-SQL Server 2005 .Net framework 2.0 PC- P4 or above MS-Visual Studio 2008

RAM minimum 512 MB HDD minimum 16 GB VGA monitor , keyboard mouse

Printing device graphic enabled facility

Operational feasibility it involves the operation, evaluation,


organizational impact and development performance.. User friendless of the proposed system makes the user to use the system without any error. the user. The system is built with an aim to help a person having a basic knowledge of computers Manual of the proposed system gives complete idea of system designed to

68

Industrial Man Power Resource Organization

METHODOLOGY

69

Industrial Man Power Resource Organization

SDLC Methodology
This
document play a vital role in the development of life cycle (SDLC) as it

describes the complete requirement of the system. It means for use by developers and will be the basic during testing phase. Any changes made to the requirements in the future will have to engineering, information systems and software engineering, is a process of creating or altering information systems, and the models and that people use to develop these systems. In software engineering, the SDLC concept underpins many kinds of software development methodologies. These methodologies form the framework for planning and controlling the creation of an information system the software development process..... go through formal change approval process... In systems

Spiral model Defined by Barry Boehm in his 1988 article, A spiral Model
of Software Development and Enhancement. This model was not the first model to discuss iterative development, but it was the first model to explain why the iteration models. As originally envisioned, the iterations were typically 6 months to 2 years long. Each phase starts with a design goal and ends with a client reviewing the progress thus far.Analysis and engineering efforts are applied at each phase of the project, with an eye toward the end goal of the projectMain contrast points of spiral model are
Risk determines level of effort Risk determines degree of detail
Use anchor point milestones Focus on the system and its life cycle

70

Industrial Man Power Resource Organization

Spiral model Fig

71

Industrial Man Power Resource Organization The steps for Spiral Model can be generalized as follows:
The new system requirements are defined in as much details as external or internal users and other aspects of the existing system.

possible. This usually involves interviewing a number of users representing all the

A preliminary design is created for the new system.

A first prototype of the new system is constructed from the preliminary design. A second prototype is evolved by a fourfold procedure:
. At the customer option, the entire project can be aborted if the risk is deemed too great. Risk factors might involve development cost overruns, operating-cost miscalculation, or any other factor that could, in the customers judgment, result in ales -than-satisfactory final product. Evaluating the first prototype in terms of its strengths, weakness, and risks. Defining the requirements of the second prototype. Planning a designing the second prototype. Constructing and testing the second prototype.

was the previous prototype, and if necessary, another prototype is developed from it according to the fourfold procedure outlined above. The preceding steps are iterated until the customer is satisfied that the refined prototype represents the final product desired.

The existing prototype is evaluated in the same manner as

72

Industrial Man Power Resource Organization

Benefits of spiral model-

The software designer and implementer can

obtain feedback from the users early in the project. The client and the contractor can compare if the software made matches the software specification, according to which the software program is built.it also allows the software engineer some insight into accuracy of initial project estimates and weather the deadlines and milestones proposed can be successfully met. The degree of completeness and the techniques used in the spiral model have been in development Spiral model also avoid the great expense and difficulty of changing a finished software product. Following are some interactive benefits of spiral model
Spiral Life Cycle Model is one of the most flexible SDLC models in place. Development phases can be determined by the project manager, according to the complexity of the project. Project monitoring is very easy and effective. Each phase, as well as each loop, requires a review from concerned people. This makes the model more transparent. Risk management is one of the in-built features of the model, which makes it extra attractive compared to other models. Changes can be introduced later in the life cycle as well. And coping with these changes isnt a very big headache for the project manager. Project estimates in terms of schedule, cost etc. become more and more realistic as the project moves forward and loops in spiral get completed.

It is suitable for high risk projects, where business needs maybe unstable.

73

Industrial Man Power Resource Organization

Object oriented programming (OOPS) Methodology


as opposed to the conventional model, in which a program is seen as a list of tasks An object oriented program may be viewed as a collection of interacting objects,

(subroutines) to perform. In OOP, each object is capable of receiving messages, processing data, and sending messages to other objects. Each object can be viewed as an independent "machine" with a distinct role or responsibility. Actions (or "methods") on these objects are closely associated with the object. For example, OOP data structures tend to "carry their own operators around with them" (or at least "inherit" them from a similar object or class)except when they must be serialized. Simple, non-OOP programs may be one "long" list of commands. More complex programs often group smaller sections of these statements into functions or subroutineseach of which might perform a particular task. With designs of this sort, it is common for some of the program's data to be 'global', i.e., accessible from any part of the program. As programs grow in size, allowing any function to modify any piece of data means that bugs can have wide-reaching effects. In contrast, the object-oriented approach encourages the programmer to place data where it is not directly accessible by the rest of the program. Instead, the data is accessed by calling specially written functions, commonly called methods, which are bundled in with the data. These act as the intermediaries for retrieving or modifying the data they control. The programming construct that combines data with a set of methods for accessing and managing those data is called an object. The practice of using subroutines to examine or modify certain kinds of data was also used in non-OOP modular programming, well before the widespread use of object-oriented programming. An object-oriented program usually contains different types of objects, each corresponding to a particular kind of complex data to manage, or perhaps to a realworld object or concept such as a bank account, a hockey player, or a bulldozer. A program might contain multiple copies of each type of object, one for each of the realworld objects the program deals with. For instance, there could be one account.

74

Industrial Man Power Resource Organization

Design Model

75

Industrial Man Power Resource Organization

E-R Diagram

Job_Rotation Sections +Sect_ID +Sect_name +Section_Inch +Dept_number +Emp_ID +present_Designation +Deputed_to +Status +Remarks

Designation +Desgin_ID +Designation 1..*

Designation_weightage +Designation_Id +Dept_no +Weightage

Employees Department +Dept_No +Dept_name +Dept_head +Dept_location +Emp_ID +Emp_name +Dept_number +Designation _ID +Section_ID 1..* +Address +Phone +Email 1..* Vacancies +Vacancy_ID +Dept_No +Section_ID +Designation_ID +No_of_vacancies +Status +Vacancy_ID +Prirority Vacancy_Fill_Details +Vacancy_Id +Emp_ID 1..* +Fill_Date +In_Take_Details Designation_Layer +Designation_Id +Layer +Weightage

1..*

Department_Postion_Weightage +Dept_No +Layer +Weightage

Department Interdependency +Dept_No +Up_Dep_NO +DND_Dept_NO

76

Industrial Man Power Resource Organization

Data Flow Diagram

Context Diagram

77

Industrial Man Power Resource Organization

Login Data Flow Diagram

Login Flow

78

Industrial Man Power Resource Organization Administrator first level DFD

Admin Flow

79

Industrial Man Power Resource Organization Administrator Second - Level DFD

Admin Flow

80

Industrial Man Power Resource Organization Administrator Third - Level DFD

Admin Flow

81

Industrial Man Power Resource Organization

HR first- Level DFD

HR -Flow

82

Industrial Man Power Resource Organization

HR Second - Level DFD

HR - Flow

83

Industrial Man Power Resource Organization

HR Third - Level DFD

HR - Flow

84

Industrial Man Power Resource Organization Employee First Level DFD

Employee Flow

85

Industrial Man Power Resource Organization Employee Second Level DFD

Employee Flow

86

Industrial Man Power Resource Organization

Activity Diagram

Registration Activity Diagram

Registration Activity

87

Industrial Man Power Resource Organization

Login Activity Diagram

Login Activity

88

Industrial Man Power Resource Organization

Administrator Activity Diagram

Admin Activity

89

Industrial Man Power Resource Organization

H-R Manager Activity Diagram

H-R Activity

90

Industrial Man Power Resource Organization

Employee Activity Diagram

Employee Activity

91

Industrial Man Power Resource Organization

UML-Diagrams

SYSTEM.WINDOWS.FORMS

SYSTEM.WINDOWS.FORMS.CONTROLS

BUTTON Click Text Visible Name Causes validation Sender as system. Object E as system .even tags

TEXTBOX Click Text Name Visible Text changed Sender as system. Object E as system .event rags

DATAGRID Click Navigate Data member Data source Data bind Sender as system. Object E as system. Windows. Forms. Navigate

Control UML

92

Industrial Man Power Resource Organization

SYSTEM.DATA

SYSTEM.DATA.OLEDB Oracle connection Oracle adapter Dataset Oracle delete command Oracle update command Oracle insert command Oracle select command State change Row updated Disposed Fill Sender as object E as system. Data. State Change Event Arcs

SYSTEM.DATA..SQLC LIENT SQL connection SQL data adapter Dataset SQL delete command SQL update command SQL insert command SQL select command State change Row updated Disposed fill Sender as object E as system. data. State change event arcs

Data UML

93

Industrial Man Power Resource Organization

SYSTEM

SYSTEM.WINDOWS.FORMS.FORM

FORM1 Dispose (protected, overloads, overwrites) Initialize Component (private) New (public) Load (private)

Sender (system object) e(system. Event rags) Disposing (Boolean)

Form UML

94

Industrial Man Power Resource Organization

Design Document

95

Industrial Man Power Resource Organization

Master Table

96

Industrial Man Power Resource Organization

97

Industrial Man Power Resource Organization

Data Dictionary

Name Vacancy Description Stores details of vacancy information

98

Industrial Man Power Resource Organization Name Registration Description Stores Details of Registration information

99

Industrial Man Power Resource Organization

Name -Branches Description stores detail of branches information

100

Industrial Man Power Resource Organization

Name Section Description stores details of section information

101

Industrial Man Power Resource Organization

Name Designation Description Stores Details of employee Designation

102

Industrial Man Power Resource Organization

Name Department Description stores Details of Department

103

Industrial Man Power Resource Organization

Name application Description stores the details of application of vacancy

104

Industrial Man Power Resource Organization

Modularization Details
Architecture Design -To implement a web application client-server
architecture server architectures are the twotier and the three tier architecture the choice of architecture affects theDevelopmenttime and the fut ure flexibility and maintenance of theapplication. While selecting the architecture most suitable for an application, many factorsi n cl u d i n g t h e c om p l e x i t y of th e a p pl i ca ti o n , th e n u m b er of u s er s a n d th ei r g eog r a p h i c a l dispersion are considered. This system is designed based on a traditional three-tier architecture used by many web layer, and the data layer. The three-tier architecture is shown in Figure applications. Architecture includes a presentation layer, business rules/ logic is required. The most popularclient-

105

Industrial Man Power Resource Organization


The three-tier architecture is generally used when an effective distributed client/server design is needed that provides Increased performance Flexibility Maintainability Reusability
Model hides the complexity of distributed processing from the user. These features have made

Scalability

the three-tier architecture a popular choice over the two-tier architecture for Inter-applications.

The Data Layer -A data


a computer

access layer (DAL) in computer software, is a layer of provides simplified access to data stored in persistent

storage of

in Microsoft ASP.NET environments. For example; the DAL might return a reference to an object (in terms of object-oriented

some kind, such as an relational database. This acronym is prevalently used

program which

instead of a row of fields from a database table. This allows the client (or user) modules to be created with a higher level of abstraction. This kind of model could be implemented by creating a class of data access methods that directly reference a corresponding set of database stored procedures. Another implementation could potentially retrieve or write records to or world from a file system. The DAL hides this complexity of the underlying data store from the external

programming)

complete with its attributes

Logic/Business Layer -For my smaller applications, my BLL usually starts out as a


pass-through to the DAL. I'm okay with that. As I "discover" business rules, the BLL is where I put them. I also end up finding a lot things needed in the BLL as I write my tests. For my own personal apps, I make up the business rules, and the BLL is still where I put them. For me, the BLL is something that grows over time. The longer I've worked on a project, the larger its Would I consider combining the BLL and DAL for a small project? I might, except for the fact that I change DAL technologies about as often as I change hairstyles, and I like to have something to isolate my client code from that.

106

Industrial Man Power Resource Organization

Presentation Layer presentation layer is also called as client tier layer is responsible for the presentation of data, receiving user events and entirely through the layer... controlling the user interface. The user interaction with the system is

Database Design
Design is the first step in the development phase of any engineering product or system. It may define as the process of applying various techniques and

principles for the purpose of defining a device, a process, or system insufficient through which requirements are translated into a Blue Print for construction of directly translated to specific data, functional and behavioral requirements

detail to permit its physical realization. Software design is an interactive process software. The design is represented at high level of abstraction a level that can be

Design Principles
process

Basic design principles that enable the software engineer to navigate the design
The design process should not suffer from

tunnel vision. model.

The design should be traceable to the analysis The design should not reinvent the wheel integrity

The design should not exhibit uniformity and

107

Industrial Man Power Resource Organization

Normalization
is used to handle the problems that can arise due to data redundancy i.e. problems that can arise due to insertion, updating, deletion anomalies. It is a process of converting a relation to a standard form. The process

represent of data is the database, maintain data integrity as well as handling the Decomposing is the process of splitting relations into multiple relations to this we use normal forms for structuring relation.

eliminate anomalies and maintains anomalies and maintains data integrity. To do A basic objective of the first normal form defined by Cod in 1970 was to

permit data to be queried and manipulated using a "universal data sub-language" grounded in first-order logic. (SQL is an example of such a data sub-language, albeit one that Cod regarded as seriously flawed. Following are the anomalies used in normalization

Insertion anomaly: Inability to add data to the database due to absence of other data. Deletion anomaly: Unintended loss of data due to deletion of other data. Update anomaly: Data inconsistency resulting from data redundancy and partial update.

Normal Forms: These are rules for structuring


relations that eliminate anomalies To free the collection of relations from undesirable insertion, update and deletion dependencies.. To make the relational model more informative to users

108

Industrial Man Power Resource Organization

First normal form (1NF) - A relation is said to be in first normal form if the

values in the relation are atomic for every attribute in the relation. By this we mean simply that no attribute value can be set of values, or as it is

sometimes expressed, a repeating group. Having a unique key does not resolve
the requirements of 1NF. According to the rules, there can be no multiple entries into a single field. For example, in a data table of customer information, a single field could be allowed to store multiple entries, such as where a customer has multiple telephone numbers. This is a violation of the 1NF rules. This particular problem in our example can be resolved by creating a customer ID index in the main table and then adding a separate table that has a column for the telephone numbers and another column for the customer ID.

Second Normal Form (2NF) -Second normal form (2NF) is the second step in

normalizing a database. 2NF builds on the first normal form (1NF).Normalization is the process of organizing data in a database so that it meets two basic requirements: There is no redundancy of data (all data is stored in only one place).Data dependencies are logical (all related data items are stored together).A 1NF table is in 2NF form if and only if all of its non-prime attributes are functionally dependent on the whole of every candidate key. A relation is said to be
in second Normal form is it is in first normal form and it should satisfy any one of the following rules.

Primary key is not a composite primary key. No non-key attributes are present. Every non-key Attribute is fully primary key. functionally dependent on full set of

109

Industrial Man Power Resource Organization

Third Normal Form (3NF) third normal form (3NF) is the third step in
normalizing a database and it builds on the first and second normal forms, 1NF and 2NF.3NF states that all column reference in referenced data that are not dependent on the primary key should be removed. Another way of putting this is that only foreign key columns should be used to reference another table, and no other columns from the parent table should exist in the referenced tableTransitive Dependency: If two nonkeys depend on each other as well as on the primary key then they are said to be transitively dependent. The above normalization principles were applied to decompose the data in multiple tables hereby making the data to be maintained in a consistent state. Following are the advantages of transitive Dependency

Are mainly twofold. First, the amount of data duplication is reduced and therefore your database becomes smaller. When duplicated data changes, there's a big risk of updating only some of the data, especially if it's spread out in a number of different places in the database If address and zip code data were stored in three or four different tables, then any changes in zip codes would need to ripple out to every record in those three or four tables.

110

Industrial Man Power Resource Organization

Interface Diagrams (Screen shots)

111

Industrial Man Power Resource Organization

Form -Login

112

Industrial Man Power Resource Organization


Imports System.Data.OleDb Public Class FrmLogin Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents txtpwd As System.Windows.Forms.TextBox Friend WithEvents Txtuname As System.Windows.Forms.TextBox Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents TXTALVL As System.Windows.Forms.TextBox Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container Me.txtpwd = New System.Windows.Forms.TextBox Me.Txtuname = New System.Windows.Forms.TextBox Me.Label5 = New System.Windows.Forms.Label Me.Label3 = New System.Windows.Forms.Label Me.Label2 = New System.Windows.Forms.Label Me.Label1 = New System.Windows.Forms.Label Me.TXTALVL = New System.Windows.Forms.TextBox Me.Button1 = New System.Windows.Forms.Button Me.Button2 = New System.Windows.Forms.Button Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) Me.SuspendLayout() '

113

Industrial Man Power Resource Organization


'txtpwd ' Me.txtpwd.BackColor = System.Drawing.Color.White Me.txtpwd.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtpwd.ForeColor = System.Drawing.Color.Maroon Me.txtpwd.Location = New System.Drawing.Point(200, 144) Me.txtpwd.Name = "txtpwd" Me.txtpwd.PasswordChar = Microsoft.VisualBasic.ChrW(42) Me.txtpwd.Size = New System.Drawing.Size(136, 22) Me.txtpwd.TabIndex = 59 Me.txtpwd.Text = "" Me.ToolTip1.SetToolTip(Me.txtpwd, "ENTER UPPER CASE CHARACTERS") ' 'Txtuname ' Me.Txtuname.BackColor = System.Drawing.Color.White Me.Txtuname.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Txtuname.ForeColor = System.Drawing.Color.Maroon Me.Txtuname.Location = New System.Drawing.Point(200, 112) Me.Txtuname.Name = "Txtuname" Me.Txtuname.Size = New System.Drawing.Size(136, 22) Me.Txtuname.TabIndex = 58 Me.Txtuname.Text = "" Me.ToolTip1.SetToolTip(Me.Txtuname, "ENTER UPPER CASE CHARACTERS") ' 'Label5 ' Me.Label5.BackColor = System.Drawing.Color.Transparent Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.ForeColor = System.Drawing.Color.Yellow Me.Label5.Location = New System.Drawing.Point(64, 192) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(113, 16) Me.Label5.TabIndex = 57 Me.Label5.Text = "Acc-Level :" ' 'Label3 ' Me.Label3.BackColor = System.Drawing.Color.Transparent Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.Yellow Me.Label3.Location = New System.Drawing.Point(64, 152) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(104, 16) Me.Label3.TabIndex = 55 Me.Label3.Text = "Password :" ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.Transparent

114

Industrial Man Power Resource Organization


Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.Yellow Me.Label2.Location = New System.Drawing.Point(64, 112) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(112, 16) Me.Label2.TabIndex = 54 Me.Label2.Text = "UserId:" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.Transparent Me.Label1.Font = New System.Drawing.Font("Book Antiqua", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Yellow Me.Label1.Location = New System.Drawing.Point(24, 32) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(432, 40) Me.Label1.TabIndex = 53 Me.Label1.Text = "Industrial Man-Power Resource Organizer " ' 'TXTALVL ' Me.TXTALVL.BackColor = System.Drawing.Color.White Me.TXTALVL.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.TXTALVL.ForeColor = System.Drawing.Color.Maroon Me.TXTALVL.Location = New System.Drawing.Point(200, 184) Me.TXTALVL.Name = "TXTALVL" Me.TXTALVL.Size = New System.Drawing.Size(136, 22) Me.TXTALVL.TabIndex = 60 Me.TXTALVL.Text = "" Me.ToolTip1.SetToolTip(Me.TXTALVL, "ENTER UPPER CASE ""A"" OR ""U"" ONLY") ' 'Button1 ' Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.Yellow Me.Button1.Location = New System.Drawing.Point(112, 232) Me.Button1.Name = "Button1" Me.Button1.TabIndex = 61 Me.Button1.Text = "&Login" ' 'Button2 ' Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.Yellow Me.Button2.Location = New System.Drawing.Point(240, 232) Me.Button2.Name = "Button2" Me.Button2.TabIndex = 62 Me.Button2.Text = "&Cancel" ' 'FrmLogin

115

Industrial Man Power Resource Organization


' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Thistle Me.ClientSize = New System.Drawing.Size(480, 350) Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.TXTALVL) Me.Controls.Add(Me.txtpwd) Me.Controls.Add(Me.Txtuname) Me.Controls.Add(Me.Label5) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label1) Me.Name = "FrmLogin" Me.Text = "FrmLogin" Me.ResumeLayout(False) End Sub #End Region Dim cn As New connectdatabase() Dim cmd As OleDbCommand Dim dr As OleDbDataReader Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try conn.Open() cn.connect() ' cmd = New OleDbCommand("select USERNAME,PASSWORD from login", conn) cmd = New OleDbCommand() ' cmd.CommandText = "select * from login where( (username='" & Trim(Txtuname.Text) & "'and password= '" & Trim(txtpwd.Text) & "') and acclvl in(" & "a" & "," & "u" & " )&" & ")" cmd.CommandText = "select * from login where( (username='" & Trim(Txtuname.Text) & " ' and password= '" & Trim(txtpwd.Text) & "') and ( acclvl='A' OR ACCLVL='U')" & ")" cmd.Connection = conn dr = cmd.ExecuteReader Dim i As Integer i = dr.Read If i = -1 Then If dr.Item(2) = Trim(TXTALVL.Text) And dr.Item(2) = Trim("A") Then Dim obj As New Form1() obj.Show() Me.Hide() Exit Sub ElseIf dr.Item(2) = Trim(TXTALVL.Text) And dr.Item(2) = Trim("U") Then Dim obj As New Form1() obj.Show() OBJ.MainMenu1.MenuItems(0).Enabled = False OBJ.MainMenu1.MenuItems(2).Enabled = False OBJ.MainMenu1.MenuItems(3).Enabled = False Me.Hide() Exit Sub Else MsgBox("ENTER ACCLVL EITHERE A OR U ONLY") Exit Sub

116

Industrial Man Power Resource Organization


End If MsgBox("NOT FOUND") Exit Sub End If Catch E1 As Exception MsgBox(E1.Message) End Try 'While dr.Read ' If Trim(dr.Item(0)) = Trim(Txtuname.Text) And Trim(dr.Item(1)) = Trim(txtpwd.Text) And Trim(TXTALVL.Text) = "A" Then ' Dim obj As New Form1() ' obj.Show() ' Exit Sub ' Else ' Dim obj As New Form1() ' obj.Show() ' OBJ.MainMenu1.MenuItems(0).Enabled = False ' OBJ.MainMenu1.MenuItems(2).Enabled = False ' OBJ.MainMenu1.MenuItems(3).Enabled = False ' Exit Sub ' End If 'End While MsgBox(dr.IsClosed) If Not dr.IsClosed Then dr.Close() End If End Sub

Private Sub Txtuname_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Txtuname.KeyPress ' Dim s As String ' Dim res As String ' s = e.KeyChar ' res = cn.allownum(s) 'If res = False Then ' e.Handled = True ' Else ' e.Handled = False ' End If End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End End Sub

End Class

117

Industrial Man Power Resource Organization

Form1 Design

118

Industrial Man Power Resource Organization

Source code of Main form


Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem4 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem5 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem6 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem7 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem8 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem9 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem10 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem11 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem12 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem13 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem14 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem15 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem16 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem17 As System.Windows.Forms.MenuItem

119

Industrial Man Power Resource Organization


Friend WithEvents MenuItem18 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem19 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem20 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem21 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem22 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem23 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem24 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem25 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem26 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem27 As System.Windows.Forms.MenuItem <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.MainMenu1 = New System.Windows.Forms.MainMenu Me.MenuItem1 = New System.Windows.Forms.MenuItem Me.MenuItem6 = New System.Windows.Forms.MenuItem Me.MenuItem7 = New System.Windows.Forms.MenuItem Me.MenuItem8 = New System.Windows.Forms.MenuItem Me.MenuItem9 = New System.Windows.Forms.MenuItem Me.MenuItem14 = New System.Windows.Forms.MenuItem Me.MenuItem15 = New System.Windows.Forms.MenuItem Me.MenuItem18 = New System.Windows.Forms.MenuItem Me.MenuItem24 = New System.Windows.Forms.MenuItem Me.MenuItem2 = New System.Windows.Forms.MenuItem Me.MenuItem10 = New System.Windows.Forms.MenuItem Me.MenuItem11 = New System.Windows.Forms.MenuItem Me.MenuItem12 = New System.Windows.Forms.MenuItem Me.MenuItem3 = New System.Windows.Forms.MenuItem Me.MenuItem16 = New System.Windows.Forms.MenuItem Me.MenuItem17 = New System.Windows.Forms.MenuItem Me.MenuItem4 = New System.Windows.Forms.MenuItem Me.MenuItem13 = New System.Windows.Forms.MenuItem Me.MenuItem5 = New System.Windows.Forms.MenuItem Me.MenuItem19 = New System.Windows.Forms.MenuItem Me.MenuItem20 = New System.Windows.Forms.MenuItem Me.MenuItem21 = New System.Windows.Forms.MenuItem Me.MenuItem22 = New System.Windows.Forms.MenuItem Me.MenuItem23 = New System.Windows.Forms.MenuItem Me.MenuItem25 = New System.Windows.Forms.MenuItem Me.MenuItem26 = New System.Windows.Forms.MenuItem Me.MenuItem27 = New System.Windows.Forms.MenuItem ' 'MainMenu1 ' Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem2, Me.MenuItem3, Me.MenuItem4, Me.MenuItem5, Me.MenuItem25}) ' 'MenuItem1 ' Me.MenuItem1.Index = 0 Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem6, Me.MenuItem7, Me.MenuItem8, Me.MenuItem9, Me.MenuItem14, Me.MenuItem15, Me.MenuItem18, Me.MenuItem24}) Me.MenuItem1.Text = "&Master" ' 'MenuItem6 ' Me.MenuItem6.Index = 0 Me.MenuItem6.Text = "&Department" '

120

Industrial Man Power Resource Organization


'MenuItem7 ' Me.MenuItem7.Index = 1 Me.MenuItem7.Text = "&Employee" ' 'MenuItem8 ' Me.MenuItem8.Index = 2 Me.MenuItem8.Text = "&Section" ' 'MenuItem9 ' Me.MenuItem9.Index = 3 Me.MenuItem9.Text = "&Vacancy" ' 'MenuItem14 ' Me.MenuItem14.Index = 4 Me.MenuItem14.Text = "&Designation" ' 'MenuItem15 ' Me.MenuItem15.Index = 5 Me.MenuItem15.Text = "&Vacancy Fill Details" ' 'MenuItem18 ' Me.MenuItem18.Index = 6 Me.MenuItem18.Text = "&JobRotation" ' 'MenuItem24 ' Me.MenuItem24.Index = 7 Me.MenuItem24.Text = "&DeptInterDependencies" ' 'MenuItem2 ' Me.MenuItem2.Index = 1 Me.MenuItem2.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem10, Me.MenuItem11, Me.MenuItem12}) Me.MenuItem2.Text = "&Org.Detail" ' 'MenuItem10 ' Me.MenuItem10.Index = 0 Me.MenuItem10.Text = "&Org.Struct.Details" ' 'MenuItem11 ' Me.MenuItem11.Index = 1 Me.MenuItem11.Text = "&EmployeeStructure" ' 'MenuItem12 ' Me.MenuItem12.Index = 2 Me.MenuItem12.Text = "" ' 'MenuItem3

121

Industrial Man Power Resource Organization


' Me.MenuItem3.Index = 2 Me.MenuItem3.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem16, Me.MenuItem17}) Me.MenuItem3.Text = "&Weightage" ' 'MenuItem16 ' Me.MenuItem16.Index = 0 Me.MenuItem16.Text = "&DesignationLayers" ' 'MenuItem17 ' Me.MenuItem17.Index = 1 Me.MenuItem17.Text = "&DesignatiDeptWeightage" ' 'MenuItem4 ' Me.MenuItem4.Index = 3 Me.MenuItem4.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem13}) Me.MenuItem4.Text = "&Authentication" ' 'MenuItem13 ' Me.MenuItem13.Index = 0 Me.MenuItem13.Text = "&Users" ' 'MenuItem5 ' Me.MenuItem5.Index = 4 Me.MenuItem5.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem19, Me.MenuItem20, Me.MenuItem21, Me.MenuItem22, Me.MenuItem23}) Me.MenuItem5.Text = "&Reports" ' 'MenuItem19 ' Me.MenuItem19.Index = 0 Me.MenuItem19.Text = "&EmployeeInfo" ' 'MenuItem20 ' Me.MenuItem20.Index = 1 Me.MenuItem20.Text = "&UserInfo" ' 'MenuItem21 ' Me.MenuItem21.Index = 2 Me.MenuItem21.Text = "&DepartmentsInfo" ' 'MenuItem22 ' Me.MenuItem22.Index = 3 Me.MenuItem22.Text = "&SectionsInfo" ' 'MenuItem23 ' Me.MenuItem23.Index = 4

122

Industrial Man Power Resource Organization


Me.MenuItem23.Text = "&SectionEmployeeInfo" ' 'MenuItem25 ' Me.MenuItem25.Index = 5 Me.MenuItem25.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem26, Me.MenuItem27}) Me.MenuItem25.Text = "Window" ' 'MenuItem26 ' Me.MenuItem26.Index = 0 Me.MenuItem26.Text = "Close" ' 'MenuItem27 ' Me.MenuItem27.Index = 1 Me.MenuItem27.Text = "Exit" ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.ClientSize = New System.Drawing.Size(768, 273) Me.IsMdiContainer = True Me.Menu = Me.MainMenu1 Me.Name = "Form1" Me.Text = "Form1" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized End Sub #End Region Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub MenuItem6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem6.Click Dim dfrm As FrmDept dfrm = New FrmDept() dfrm.MdiParent = Me Try dfrm.Show() Catch ex As Exception MsgBox(ex.Message) End Try End Sub

123

Industrial Man Power Resource Organization


Private Sub MenuItem8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem8.Click Dim sfrm As New Frmsections() sfrm.MdiParent = Me sfrm.Show() End Sub Private Sub MenuItem7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem7.Click Dim efrm As New FrmEmployee() efrm.MdiParent = Me efrm.Show() End Sub Private Sub MenuItem9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem9.Click Dim vm As New FrmVacancyMast() vm.MdiParent = Me vm.Show() End Sub Private Sub MenuItem14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem14.Click Dim df As New FrmDesig() df.MdiParent = Me df.Show() End Sub Private Sub MenuItem15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem15.Click Dim vf As New FrmVacancyFill() vf.MdiParent = Me vf.Show() End Sub Private Sub MenuItem13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem13.Click Dim u As New FrmUserCreation() u.MdiParent = Me u.Show() End Sub Private Sub MenuItem16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem16.Click Dim dl As New FrmPosDesigw() dl.MdiParent = Me dl.Show() End Sub Private Sub MenuItem17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem17.Click Dim dd As New FrmdeptDesigw() dd.MdiParent = Me dd.Show() End Sub Private Sub MenuItem11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem11.Click Dim ed As New FrmDesigtructure() ed.MdiParent = Me

124

Industrial Man Power Resource Organization


ed.Show() End Sub Private Sub MenuItem18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem18.Click Dim j As New FrmJobRotation()

j.MdiParent = Me j.Show() End Sub Private Sub MenuItem10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem10.Click Dim fo As New FrmOrg() fo.MdiParent = Me fo.Show() End Sub Private Sub MenuItem19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem19.Click Dim re As New RptEmp() re.MdiParent = Me re.Show() End Sub Private Sub MenuItem20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem20.Click Dim u As New RptUser() u.MdiParent = Me u.Show() End Sub Private Sub MenuItem21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem21.Click Dim d As New RptDept() d.MdiParent = Me d.Show() End Sub Private Sub MenuItem22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem22.Click Dim s As New RptSect() s.MdiParent = Me s.Show() End Sub Private Sub MenuItem24_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem24.Click Dim dd As New FrmInterDep() dd.MdiParent = Me dd.Show() End Sub

125

Industrial Man Power Resource Organization

Private Sub MenuItem23_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem23.Click Dim r As New RptInvEmp() r.MdiParent = Me r.Show() End Sub Private Sub MenuItem26_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem26.Click c.Invoke() End Sub Private Sub MenuItem27_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem27.Click End End Sub End Class

126

Industrial Man Power Resource Organization

Department Registration Form

127

Industrial Man Power Resource Organization

Source code for Dept. Registration Form

Imports System.Data.OleDb Public Class FrmDept Inherits System.Windows.Forms.Form Dim selcmd As OleDbCommand Dim da As OleDbDataAdapter Dim ds As New DataSet() Dim inscmd As New OleDbCommand() Dim delcmd As New OleDbCommand() Dim dr As OleDbDataReader Dim s As String #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button4 As System.Windows.Forms.Button Friend WithEvents Button5 As System.Windows.Forms.Button Friend WithEvents Button6 As System.Windows.Forms.Button

128

Industrial Man Power Resource Organization


Friend WithEvents Button7 As System.Windows.Forms.Button Friend WithEvents Button8 As System.Windows.Forms.Button Friend WithEvents TxtDno As System.Windows.Forms.TextBox Friend WithEvents TxtDname As System.Windows.Forms.TextBox Friend WithEvents TxtDhead As System.Windows.Forms.TextBox Friend WithEvents TxtLoc As System.Windows.Forms.TextBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(FrmDept)) Me.Label1 = New System.Windows.Forms.Label Me.Label2 = New System.Windows.Forms.Label Me.Label3 = New System.Windows.Forms.Label Me.Label4 = New System.Windows.Forms.Label Me.Label5 = New System.Windows.Forms.Label Me.TxtDno = New System.Windows.Forms.TextBox Me.TxtDname = New System.Windows.Forms.TextBox Me.TxtDhead = New System.Windows.Forms.TextBox Me.TxtLoc = New System.Windows.Forms.TextBox Me.Button1 = New System.Windows.Forms.Button Me.Button2 = New System.Windows.Forms.Button Me.Button3 = New System.Windows.Forms.Button Me.Button4 = New System.Windows.Forms.Button Me.Button5 = New System.Windows.Forms.Button Me.Button6 = New System.Windows.Forms.Button Me.Button7 = New System.Windows.Forms.Button Me.Button8 = New System.Windows.Forms.Button Me.SuspendLayout() ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label1.Font = New System.Drawing.Font("Book Antiqua", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Maroon Me.Label1.Location = New System.Drawing.Point(248, 48) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(304, 32) Me.Label1.TabIndex = 0 Me.Label1.Text = "Department Registration" ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.Maroon Me.Label2.Location = New System.Drawing.Point(200, 128) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(112, 16) Me.Label2.TabIndex = 1 Me.Label2.Text = "DeptNo :" ' 'Label3 '

129

Industrial Man Power Resource Organization


Me.Label3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.Maroon Me.Label3.Location = New System.Drawing.Point(200, 168) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(104, 16) Me.Label3.TabIndex = 2 Me.Label3.Text = "DeptName :" ' 'Label4 ' Me.Label4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.Maroon Me.Label4.Location = New System.Drawing.Point(200, 208) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(104, 16) Me.Label4.TabIndex = 3 Me.Label4.Text = "DeptHead :" ' 'Label5 ' Me.Label5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.ForeColor = System.Drawing.Color.Maroon Me.Label5.Location = New System.Drawing.Point(200, 248) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(104, 16) Me.Label5.TabIndex = 4 Me.Label5.Text = "Location :" ' 'TxtDno ' Me.TxtDno.BackColor = System.Drawing.Color.White Me.TxtDno.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.TxtDno.ForeColor = System.Drawing.Color.Maroon Me.TxtDno.Location = New System.Drawing.Point(336, 128) Me.TxtDno.Name = "TxtDno" Me.TxtDno.Size = New System.Drawing.Size(136, 22) Me.TxtDno.TabIndex = 5 Me.TxtDno.Text = "" ' 'TxtDname ' Me.TxtDname.BackColor = System.Drawing.Color.White Me.TxtDname.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.TxtDname.ForeColor = System.Drawing.Color.Maroon

130

Industrial Man Power Resource Organization


Me.TxtDname.Location = New System.Drawing.Point(336, 160) Me.TxtDname.Name = "TxtDname" Me.TxtDname.Size = New System.Drawing.Size(136, 22) Me.TxtDname.TabIndex = 6 Me.TxtDname.Text = "" ' 'TxtDhead ' Me.TxtDhead.BackColor = System.Drawing.Color.White Me.TxtDhead.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.TxtDhead.ForeColor = System.Drawing.Color.Maroon Me.TxtDhead.Location = New System.Drawing.Point(336, 200) Me.TxtDhead.Name = "TxtDhead" Me.TxtDhead.Size = New System.Drawing.Size(136, 22) Me.TxtDhead.TabIndex = 8 Me.TxtDhead.Text = "" ' 'TxtLoc ' Me.TxtLoc.BackColor = System.Drawing.Color.White Me.TxtLoc.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.TxtLoc.ForeColor = System.Drawing.Color.Maroon Me.TxtLoc.Location = New System.Drawing.Point(336, 240) Me.TxtLoc.Name = "TxtLoc" Me.TxtLoc.Size = New System.Drawing.Size(136, 22) Me.TxtLoc.TabIndex = 7 Me.TxtLoc.Text = "" ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button1.BackgroundImage = CType(resources.GetObject("Button1.BackgroundImage"), System.Drawing.Image) Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.Maroon Me.Button1.Location = New System.Drawing.Point(512, 128) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(75, 32) Me.Button1.TabIndex = 9 Me.Button1.Text = "&Add" ' 'Button2 ' Me.Button2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button2.BackgroundImage = CType(resources.GetObject("Button2.BackgroundImage"), System.Drawing.Image) Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.Maroon Me.Button2.Location = New System.Drawing.Point(512, 160) Me.Button2.Name = "Button2"

131

Industrial Man Power Resource Organization


Me.Button2.Size = New System.Drawing.Size(75, 32) Me.Button2.TabIndex = 10 Me.Button2.Text = "&Save" ' 'Button3 ' Me.Button3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button3.BackgroundImage = CType(resources.GetObject("Button3.BackgroundImage"), System.Drawing.Image) Me.Button3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.Maroon Me.Button3.Location = New System.Drawing.Point(512, 192) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(75, 32) Me.Button3.TabIndex = 11 Me.Button3.Text = "&Edit" ' 'Button4 ' Me.Button4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button4.BackgroundImage = CType(resources.GetObject("Button4.BackgroundImage"), System.Drawing.Image) Me.Button4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button4.ForeColor = System.Drawing.Color.Maroon Me.Button4.Location = New System.Drawing.Point(512, 224) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(75, 32) Me.Button4.TabIndex = 12 Me.Button4.Text = "&Delete" ' 'Button5 ' Me.Button5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button5.BackgroundImage = CType(resources.GetObject("Button5.BackgroundImage"), System.Drawing.Image) Me.Button5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button5.ForeColor = System.Drawing.Color.Maroon Me.Button5.Location = New System.Drawing.Point(232, 304) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(72, 32) Me.Button5.TabIndex = 13 Me.Button5.Text = "&First" ' 'Button6 ' Me.Button6.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button6.BackgroundImage = CType(resources.GetObject("Button6.BackgroundImage"), System.Drawing.Image)

132

Industrial Man Power Resource Organization


Me.Button6.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button6.ForeColor = System.Drawing.Color.Maroon Me.Button6.Location = New System.Drawing.Point(304, 304) Me.Button6.Name = "Button6" Me.Button6.Size = New System.Drawing.Size(75, 32) Me.Button6.TabIndex = 14 Me.Button6.Text = "&Previous" ' 'Button7 ' Me.Button7.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button7.BackgroundImage = CType(resources.GetObject("Button7.BackgroundImage"), System.Drawing.Image) Me.Button7.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button7.ForeColor = System.Drawing.Color.Maroon Me.Button7.Location = New System.Drawing.Point(376, 304) Me.Button7.Name = "Button7" Me.Button7.Size = New System.Drawing.Size(75, 32) Me.Button7.TabIndex = 15 Me.Button7.Text = "&Next" ' 'Button8 ' Me.Button8.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button8.BackgroundImage = CType(resources.GetObject("Button8.BackgroundImage"), System.Drawing.Image) Me.Button8.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button8.ForeColor = System.Drawing.Color.Maroon Me.Button8.Location = New System.Drawing.Point(448, 304) Me.Button8.Name = "Button8" Me.Button8.Size = New System.Drawing.Size(75, 32) Me.Button8.TabIndex = 16 Me.Button8.Text = "&Last" ' 'FrmDept ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Blue Me.ClientSize = New System.Drawing.Size(768, 408) Me.Controls.Add(Me.Button8) Me.Controls.Add(Me.Button7) Me.Controls.Add(Me.Button6) Me.Controls.Add(Me.Button5) Me.Controls.Add(Me.Button4) Me.Controls.Add(Me.Button3) Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.TxtDhead) Me.Controls.Add(Me.TxtLoc) Me.Controls.Add(Me.TxtDname)

133

Industrial Man Power Resource Organization


Me.Controls.Add(Me.TxtDno) Me.Controls.Add(Me.Label5) Me.Controls.Add(Me.Label4) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label1) Me.Name = "FrmDept" Me.Opacity = 0.5 Me.Text = "FrmDept" Me.TransparencyKey = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.ResumeLayout(False) End Sub #End Region Dim cn As New connectdatabase Dim cm As CurrencyManager Dim rno As Integer Private Sub FrmDept_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load c = AddressOf clw 'cn.connect() selcmd = New OleDbCommand("select * from departments", conn) da = New OleDbDataAdapter() da.SelectCommand = selcmd da.Fill(ds) 'cm = Me.BindingContext(ds, "DEPARTMENTS") 'TxtDno.DataBindings.Add("text", ds.Tables("DEPARTMENTS"), "DEPTNO") 'TxtDname.DataBindings.Add("text", ds.Tables("DEPARTMENTS"), "DEPTNAME") 'TxtDhead.DataBindings.Add("text", ds.Tables("DEPARTMENTS"), "DEPTHEAD") 'TxtLoc.DataBindings.Add("text", ds.Tables("DEPARTMENTS"), "LOCATION") rno = 0 Call fillfields(rno) 'cm.Position = rno End Sub Sub fillfields(ByVal rnum As Integer) TxtDno.Text = ds.Tables(0).Rows(rnum)(0) TxtDname.Text = ds.Tables(0).Rows(rnum)(1) TxtDhead.Text = ds.Tables(0).Rows(rnum)(2) TxtLoc.Text = ds.Tables(0).Rows(rnum)(3) End Sub Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TxtDname.TextChanged End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'TxtDno.Text = "" 'TxtDname.Text = "" 'TxtDhead.Text = "" 'TxtLoc.Text = "" cn.ClearFields(Me) End Sub

134

Industrial Man Power Resource Organization


Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim str As String str = "insert into departments values(" & TxtDno.Text & ",'" & TxtDname.Text & "','" & TxtDhead.Text & "','" & TxtLoc.Text & "')" MsgBox(str) inscmd.Connection = conn inscmd = New OleDbCommand(str, conn) inscmd.ExecuteNonQuery() MsgBox("successfully saved") End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim r As Integer r = InputBox("Enter The Dept Number ToDelete") 'Call efill(r) Dim s As String s = "delete from departments where deptno=" & CInt(r) delcmd.Connection = conn delcmd = New OleDbCommand(s, conn) Dim res As Integer res = delcmd.ExecuteNonQuery() If res = 1 Then MsgBox("Record deleted.....") Else MsgBox("sorry") End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click If Button3.Text = "&Edit" Then Button3.Text = "&Update" Dim recno As Integer recno = InputBox("Enter the DeptNo to Modify...") Call efill(recno) Else Dim ucmd As OleDbCommand Dim ups As String ups = "update departments set deptname='" & TxtDname.Text & "',depthead='" & TxtDhead.Text & "',location='" & TxtLoc.Text & "' WHERE DEPTNO=" & Val(TxtDno.Text) ucmd = New OleDbCommand(ups, conn) ucmd.ExecuteNonQuery() Button3.Text = "&Edit" MsgBox("successfully updated") End If End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click rno = 0 Call fillfields(rno) End Sub

135

Industrial Man Power Resource Organization


Private Sub Button6_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button6.Click If rno > 0 Then rno -= 1 Call fillfields(rno) Else MsgBox("FIRST RECORD") End If End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If rno < ds.Tables(0).Rows.Count - 1 Then rno += 1 Call fillfields(rno) Else MsgBox("LAST RECORD") End If End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click rno = ds.Tables(0).Rows.Count - 1 Call fillfields(rno) End Sub Sub efill(ByVal rnumber As Integer) s = "select * from departments where deptno =" & rnumber Dim cmd As New OleDbCommand(s, conn) dr = cmd.ExecuteReader Dim n As Byte n = dr.Read() If n > 0 Then TxtDno.Text = dr.Item(0) TxtDname.Text = dr.Item(1) TxtDhead.Text = dr.Item(2) TxtLoc.Text = dr.Item(3) Else MsgBox("NotFound") End If If Not dr.IsClosed Then dr.Close() End Sub Public Sub clw() Me.Hide() End Sub End Class

136

Industrial Man Power Resource Organization


Employee Registration Form

137

Industrial Man Power Resource Organization

Source code for employee registration

Imports System.Data.OleDb Public Class FrmEmployee Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Button4 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents Label8 As System.Windows.Forms.Label Friend WithEvents Label9 As System.Windows.Forms.Label Friend WithEvents Button8 As System.Windows.Forms.Button Friend WithEvents Button7 As System.Windows.Forms.Button Friend WithEvents Button6 As System.Windows.Forms.Button Friend WithEvents Button5 As System.Windows.Forms.Button Friend WithEvents Label10 As System.Windows.Forms.Label Friend WithEvents txtDesig As System.Windows.Forms.TextBox

138

Industrial Man Power Resource Organization


Friend WithEvents txtEname As System.Windows.Forms.TextBox Friend WithEvents txtEno As System.Windows.Forms.TextBox Friend WithEvents cmbDno As System.Windows.Forms.ComboBox Friend WithEvents cmbSecid As System.Windows.Forms.ComboBox Friend WithEvents txtPhone As System.Windows.Forms.TextBox Friend WithEvents txtFax As System.Windows.Forms.TextBox Friend WithEvents txtAddress As System.Windows.Forms.TextBox Friend WithEvents txtEmail As System.Windows.Forms.TextBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(FrmEmployee)) Me.Button4 = New System.Windows.Forms.Button() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.txtDesig = New System.Windows.Forms.TextBox() Me.txtEname = New System.Windows.Forms.TextBox() Me.txtEno = New System.Windows.Forms.TextBox() Me.Label5 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.txtPhone = New System.Windows.Forms.TextBox() Me.txtFax = New System.Windows.Forms.TextBox() Me.txtAddress = New System.Windows.Forms.TextBox() Me.Label6 = New System.Windows.Forms.Label() Me.Label7 = New System.Windows.Forms.Label() Me.Label8 = New System.Windows.Forms.Label() Me.Label9 = New System.Windows.Forms.Label() Me.Button8 = New System.Windows.Forms.Button() Me.Button7 = New System.Windows.Forms.Button() Me.Button6 = New System.Windows.Forms.Button() Me.Button5 = New System.Windows.Forms.Button() Me.txtEmail = New System.Windows.Forms.TextBox() Me.Label10 = New System.Windows.Forms.Label() Me.cmbDno = New System.Windows.Forms.ComboBox() Me.cmbSecid = New System.Windows.Forms.ComboBox() Me.SuspendLayout() ' 'Button4 ' Me.Button4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button4.BackgroundImage = CType(resources.GetObject("Button4.BackgroundImage"), System.Drawing.Bitmap) Me.Button4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button4.ForeColor = System.Drawing.Color.Maroon Me.Button4.Location = New System.Drawing.Point(656, 248) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(48, 32) Me.Button4.TabIndex = 29 Me.Button4.Text = "&Delete" ' 'Button3 '

139

Industrial Man Power Resource Organization


Me.Button3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button3.BackgroundImage = CType(resources.GetObject("Button3.BackgroundImage"), System.Drawing.Bitmap) Me.Button3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.Maroon Me.Button3.Location = New System.Drawing.Point(608, 248) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(48, 32) Me.Button3.TabIndex = 28 Me.Button3.Text = "&Edit" ' 'Button2 ' Me.Button2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button2.BackgroundImage = CType(resources.GetObject("Button2.BackgroundImage"), System.Drawing.Bitmap) Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.Maroon Me.Button2.Location = New System.Drawing.Point(560, 248) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(48, 32) Me.Button2.TabIndex = 27 Me.Button2.Text = "&Save" ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button1.BackgroundImage = CType(resources.GetObject("Button1.BackgroundImage"), System.Drawing.Bitmap) Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.Maroon Me.Button1.Location = New System.Drawing.Point(512, 248) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(48, 32) Me.Button1.TabIndex = 26 Me.Button1.Text = "&Add" ' 'txtDesig ' Me.txtDesig.BackColor = System.Drawing.Color.White Me.txtDesig.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtDesig.ForeColor = System.Drawing.Color.Maroon Me.txtDesig.Location = New System.Drawing.Point(256, 208) Me.txtDesig.Name = "txtDesig" Me.txtDesig.Size = New System.Drawing.Size(136, 22) Me.txtDesig.TabIndex = 24 Me.txtDesig.Text = "" '

140

Industrial Man Power Resource Organization


'txtEname ' Me.txtEname.BackColor = System.Drawing.Color.White Me.txtEname.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtEname.ForeColor = System.Drawing.Color.Maroon Me.txtEname.Location = New System.Drawing.Point(256, 128) Me.txtEname.Name = "txtEname" Me.txtEname.Size = New System.Drawing.Size(136, 22) Me.txtEname.TabIndex = 23 Me.txtEname.Text = "" ' 'txtEno ' Me.txtEno.BackColor = System.Drawing.Color.White Me.txtEno.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtEno.ForeColor = System.Drawing.Color.Maroon Me.txtEno.Location = New System.Drawing.Point(256, 96) Me.txtEno.Name = "txtEno" Me.txtEno.Size = New System.Drawing.Size(136, 22) Me.txtEno.TabIndex = 22 Me.txtEno.Text = "" ' 'Label5 ' Me.Label5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.ForeColor = System.Drawing.Color.Maroon Me.Label5.Location = New System.Drawing.Point(120, 208) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(104, 16) Me.Label5.TabIndex = 21 Me.Label5.Text = "DesigId:" ' 'Label4 ' Me.Label4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.Maroon Me.Label4.Location = New System.Drawing.Point(120, 168) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(104, 16) Me.Label4.TabIndex = 20 Me.Label4.Text = "DeptNo:" ' 'Label3 ' Me.Label3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte))

141

Industrial Man Power Resource Organization


Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.Maroon Me.Label3.Location = New System.Drawing.Point(120, 128) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(104, 16) Me.Label3.TabIndex = 19 Me.Label3.Text = "Ename:" ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.Maroon Me.Label2.Location = New System.Drawing.Point(120, 96) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(112, 16) Me.Label2.TabIndex = 18 Me.Label2.Text = "EmpId:" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label1.Font = New System.Drawing.Font("Book Antiqua", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Maroon Me.Label1.Location = New System.Drawing.Point(248, 40) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(248, 32) Me.Label1.TabIndex = 17 Me.Label1.Text = "Employee Registration" ' 'txtPhone ' Me.txtPhone.BackColor = System.Drawing.Color.White Me.txtPhone.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtPhone.ForeColor = System.Drawing.Color.Maroon Me.txtPhone.Location = New System.Drawing.Point(560, 128) Me.txtPhone.Name = "txtPhone" Me.txtPhone.Size = New System.Drawing.Size(136, 22) Me.txtPhone.TabIndex = 41 Me.txtPhone.Text = "" ' 'txtFax ' Me.txtFax.BackColor = System.Drawing.Color.White Me.txtFax.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtFax.ForeColor = System.Drawing.Color.Maroon Me.txtFax.Location = New System.Drawing.Point(560, 168) Me.txtFax.Name = "txtFax" Me.txtFax.Size = New System.Drawing.Size(136, 22)

142

Industrial Man Power Resource Organization


Me.txtFax.TabIndex = 40 Me.txtFax.Text = "" ' 'txtAddress ' Me.txtAddress.BackColor = System.Drawing.Color.White Me.txtAddress.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtAddress.ForeColor = System.Drawing.Color.Maroon Me.txtAddress.Location = New System.Drawing.Point(560, 96) Me.txtAddress.Name = "txtAddress" Me.txtAddress.Size = New System.Drawing.Size(136, 22) Me.txtAddress.TabIndex = 39 Me.txtAddress.Text = "" ' 'Label6 ' Me.Label6.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label6.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label6.ForeColor = System.Drawing.Color.Maroon Me.Label6.Location = New System.Drawing.Point(424, 176) Me.Label6.Name = "Label6" Me.Label6.Size = New System.Drawing.Size(104, 16) Me.Label6.TabIndex = 37 Me.Label6.Text = "Fax:" ' 'Label7 ' Me.Label7.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label7.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label7.ForeColor = System.Drawing.Color.Maroon Me.Label7.Location = New System.Drawing.Point(424, 136) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(104, 16) Me.Label7.TabIndex = 36 Me.Label7.Text = "Phone:" ' 'Label8 ' Me.Label8.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label8.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label8.ForeColor = System.Drawing.Color.Maroon Me.Label8.Location = New System.Drawing.Point(424, 96) Me.Label8.Name = "Label8" Me.Label8.Size = New System.Drawing.Size(104, 16) Me.Label8.TabIndex = 35 Me.Label8.Text = "Address:" ' 'Label9

143

Industrial Man Power Resource Organization


' Me.Label9.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label9.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label9.ForeColor = System.Drawing.Color.Maroon Me.Label9.Location = New System.Drawing.Point(120, 248) Me.Label9.Name = "Label9" Me.Label9.Size = New System.Drawing.Size(112, 16) Me.Label9.TabIndex = 34 Me.Label9.Text = "Sec-Id" ' 'Button8 ' Me.Button8.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button8.BackgroundImage = CType(resources.GetObject("Button8.BackgroundImage"), System.Drawing.Bitmap) Me.Button8.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button8.ForeColor = System.Drawing.Color.Maroon Me.Button8.Location = New System.Drawing.Point(680, 40) Me.Button8.Name = "Button8" Me.Button8.Size = New System.Drawing.Size(32, 32) Me.Button8.TabIndex = 45 Me.Button8.Text = ">|" ' 'Button7 ' Me.Button7.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button7.BackgroundImage = CType(resources.GetObject("Button7.BackgroundImage"), System.Drawing.Bitmap) Me.Button7.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button7.ForeColor = System.Drawing.Color.Maroon Me.Button7.Location = New System.Drawing.Point(640, 40) Me.Button7.Name = "Button7" Me.Button7.Size = New System.Drawing.Size(40, 32) Me.Button7.TabIndex = 44 Me.Button7.Text = ">>" ' 'Button6 ' Me.Button6.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button6.BackgroundImage = CType(resources.GetObject("Button6.BackgroundImage"), System.Drawing.Bitmap) Me.Button6.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button6.ForeColor = System.Drawing.Color.Maroon Me.Button6.Location = New System.Drawing.Point(600, 40) Me.Button6.Name = "Button6" Me.Button6.Size = New System.Drawing.Size(40, 32)

144

Industrial Man Power Resource Organization


Me.Button6.TabIndex = 43 Me.Button6.Text = "<<" ' 'Button5 ' Me.Button5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button5.BackgroundImage = CType(resources.GetObject("Button5.BackgroundImage"), System.Drawing.Bitmap) Me.Button5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button5.ForeColor = System.Drawing.Color.Maroon Me.Button5.Location = New System.Drawing.Point(560, 40) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(40, 32) Me.Button5.TabIndex = 42 Me.Button5.Text = "|<" ' 'txtEmail ' Me.txtEmail.BackColor = System.Drawing.Color.White Me.txtEmail.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtEmail.ForeColor = System.Drawing.Color.Maroon Me.txtEmail.Location = New System.Drawing.Point(560, 200) Me.txtEmail.Name = "txtEmail" Me.txtEmail.Size = New System.Drawing.Size(136, 22) Me.txtEmail.TabIndex = 47 Me.txtEmail.Text = "" ' 'Label10 ' Me.Label10.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label10.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label10.ForeColor = System.Drawing.Color.Maroon Me.Label10.Location = New System.Drawing.Point(424, 208) Me.Label10.Name = "Label10" Me.Label10.Size = New System.Drawing.Size(104, 16) Me.Label10.TabIndex = 46 Me.Label10.Text = "Email:" ' 'cmbDno ' Me.cmbDno.Location = New System.Drawing.Point(256, 168) Me.cmbDno.Name = "cmbDno" Me.cmbDno.Size = New System.Drawing.Size(136, 21) Me.cmbDno.TabIndex = 48 ' 'cmbSecid ' Me.cmbSecid.Location = New System.Drawing.Point(256, 240) Me.cmbSecid.Name = "cmbSecid" Me.cmbSecid.Size = New System.Drawing.Size(136, 21) Me.cmbSecid.TabIndex = 49

145

Industrial Man Power Resource Organization


' 'FrmEmployee ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.ClientSize = New System.Drawing.Size(768, 400) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.cmbSecid, Me.cmbDno, Me.txtEmail, Me.Label10, Me.Button8, Me.Button7, Me.Button6, Me.Button5, Me.txtPhone, Me.txtFax, Me.txtAddress, Me.Label6, Me.Label7, Me.Label8, Me.Label9, Me.Button4, Me.Button3, Me.Button2, Me.Button1, Me.txtDesig, Me.txtEname, Me.txtEno, Me.Label5, Me.Label4, Me.Label3, Me.Label2, Me.Label1}) Me.Name = "FrmEmployee" Me.Opacity = 0.5 Me.Text = "FrmEmployee" Me.TransparencyKey = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.ResumeLayout(False) End Sub #End Region Dim selcmd As OleDbCommand Dim da As OleDbDataAdapter Dim ds As New DataSet() Dim inscmd As New OleDbCommand() Dim delcmd As New OleDbCommand() Dim dr As OleDbDataReader Dim s As String Dim rno As Integer Dim cn As New connectdatabase Dim con As OleDbConnection Dim d As OleDbDataReader Dim deptcmd As OleDbCommand Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.ClearFields(Me) End Sub Private Sub FrmEmployee_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load c = AddressOf clw con = cn.connect() cn.connect() selcmd = New OleDbCommand("select * from employees", conn) da = New OleDbDataAdapter da.SelectCommand = selcmd da.Fill(ds) deptcmd = New OleDbCommand("select deptno from departments", conn) Dim d As New OleDbDataAdapter(deptcmd) d.Fill(ds, "departments") Dim i As Integer For i = 0 To ds.Tables("departments").Rows.Count - 1 cmbDno.Items.Add(ds.Tables("departments").Rows(i)(0)) Next rno = 0 Call fillfields(rno)

146

Industrial Man Power Resource Organization


End Sub Sub fillfields(ByVal rnum As Integer) txtEno.Text = ds.Tables(0).Rows(rnum)(0) txtEname.Text = ds.Tables(0).Rows(rnum)(1) cmbDno.Text = ds.Tables(0).Rows(rnum)(2) txtDesig.Text = ds.Tables(0).Rows(rnum)(3) cmbSecid.Text = ds.Tables(0).Rows(rnum)(4) txtAddress.Text = ds.Tables(0).Rows(rnum)(5) & "" txtPhone.Text = ds.Tables(0).Rows(rnum)(6) & "" txtFax.Text = ds.Tables(0).Rows(rnum)(7) & "" txtEmail.Text = ds.Tables(0).Rows(rnum)(8) & "" End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim str As String str = "insert into employees values('" & txtEno.Text & "','" & txtEname.Text & "'," & cmbDno.Text & ",'" & txtDesig.Text & "'," & cmbSecid.Text & ",'" & txtAddress.Text & "','" & txtPhone.Text & "','" & txtFax.Text & "','" & txtEmail.Text & "')" MsgBox(str) inscmd.Connection = conn inscmd = New OleDbCommand(str, conn) inscmd.ExecuteNonQuery() MsgBox("Successfully Saved") End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Try Dim r As String r = InputBox("Enter The eMPLOYEE Number ToDelete") 'Call efill(r) Dim s As String s = "delete from EMPLOYEES where EMPID='" & r & "'" delcmd.Connection = conn delcmd = New OleDbCommand(s, conn) Dim res As Integer res = delcmd.ExecuteNonQuery() MsgBox(res) If res = 1 Then MsgBox("Record deleted.....") Else MsgBox("sorry") End If Catch E1 As Exception MsgBox(E1.Message) End Try End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Try If Button3.Text = "&Edit" Then Button3.Text = "&Update" Dim recno As String recno = InputBox("Enter the eMPID No to Modify...") Call efill(recno) Else

147

Industrial Man Power Resource Organization


Dim ucmd As OleDbCommand Dim ups As String ups = "update employees set ename='" & txtEname.Text & "',DEPTNO='" & cmbDno.Text & "',DESIGNATIONID='" & txtDesig.Text & "',SECTIONID='" & cmbSecid.Text & "',ADDRESS='" & txtAddress.Text & "',phone='" & txtPhone.Text & "',fax='" & txtFax.Text & "',email='" & txtEmail.Text & "' WHERE EMPID='" & Trim(txtEno.Text) & "'" MsgBox(ups) ucmd = New OleDbCommand(ups, conn) ucmd.ExecuteNonQuery() Button3.Text = "&Edit" MsgBox("successfull Updated") End If Catch E1 As Exception MsgBox(E1.Message) End Try End Sub Sub efill(ByVal rnumber As String) s = "select * from Employees where empid ='" & rnumber & "'" Dim cmd As New OleDbCommand(s, conn) dr = cmd.ExecuteReader Dim n As Byte n = dr.Read() If n > 0 Then txtEno.Text = dr.Item(0) txtEname.Text = dr.Item(1) cmbDno.Text = dr.Item(2) txtDesig.Text = dr.Item(3) cmbSecid.Text = dr.Item(4) txtAddress.Text = dr.Item(5) txtPhone.Text = dr.Item(6) txtFax.Text = dr.Item(7) txtEmail.Text = dr.Item(8) Else MsgBox("NotFound") End If If Not dr.IsClosed Then dr.Close() End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click rno = ds.Tables(0).Rows.Count - 1 Call fillfields(rno) End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click rno = 0 Call fillfields(rno) End Sub

148

Industrial Man Power Resource Organization

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If rno > 0 Then rno -= 1 Call fillfields(rno) Else MsgBox("First Record") End If End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If rno < ds.Tables(0).Rows.Count - 1 Then rno += 1 Call fillfields(rno) Else MsgBox("Last Record") End If End Sub Public Sub clw() Me.Hide() End Sub End Class

149

Industrial Man Power Resource Organization


Section Registration Form

150

Industrial Man Power Resource Organization


Source code for Section Registration

Imports System.Data.OleDb Public Class Frmsections Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Button8 As System.Windows.Forms.Button Friend WithEvents Button7 As System.Windows.Forms.Button Friend WithEvents Button6 As System.Windows.Forms.Button Friend WithEvents Button5 As System.Windows.Forms.Button Friend WithEvents Button4 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents TxtSinc As System.Windows.Forms.TextBox Friend WithEvents TxtSname As System.Windows.Forms.TextBox Friend WithEvents TxtSno As System.Windows.Forms.TextBox Friend WithEvents CmbDno As System.Windows.Forms.ComboBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

151

Industrial Man Power Resource Organization


Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Frmsections)) Me.Button8 = New System.Windows.Forms.Button() Me.Button7 = New System.Windows.Forms.Button() Me.Button6 = New System.Windows.Forms.Button() Me.Button5 = New System.Windows.Forms.Button() Me.Button4 = New System.Windows.Forms.Button() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.TxtSinc = New System.Windows.Forms.TextBox() Me.TxtSname = New System.Windows.Forms.TextBox() Me.TxtSno = New System.Windows.Forms.TextBox() Me.Label5 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.CmbDno = New System.Windows.Forms.ComboBox() Me.SuspendLayout() ' 'Button8 ' Me.Button8.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button8.BackgroundImage = CType(resources.GetObject("Button8.BackgroundImage"), System.Drawing.Bitmap) Me.Button8.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button8.ForeColor = System.Drawing.Color.Maroon Me.Button8.Location = New System.Drawing.Point(440, 288) Me.Button8.Name = "Button8" Me.Button8.Size = New System.Drawing.Size(75, 32) Me.Button8.TabIndex = 33 Me.Button8.Text = "&Last" ' 'Button7 ' Me.Button7.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button7.BackgroundImage = CType(resources.GetObject("Button7.BackgroundImage"), System.Drawing.Bitmap) Me.Button7.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button7.ForeColor = System.Drawing.Color.Maroon Me.Button7.Location = New System.Drawing.Point(368, 288) Me.Button7.Name = "Button7" Me.Button7.Size = New System.Drawing.Size(75, 32) Me.Button7.TabIndex = 32 Me.Button7.Text = "&Next" ' 'Button6 ' Me.Button6.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte))

152

Industrial Man Power Resource Organization


Me.Button6.BackgroundImage = CType(resources.GetObject("Button6.BackgroundImage"), System.Drawing.Bitmap) Me.Button6.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button6.ForeColor = System.Drawing.Color.Maroon Me.Button6.Location = New System.Drawing.Point(296, 288) Me.Button6.Name = "Button6" Me.Button6.Size = New System.Drawing.Size(75, 32) Me.Button6.TabIndex = 31 Me.Button6.Text = "&Previous" ' 'Button5 ' Me.Button5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button5.BackgroundImage = CType(resources.GetObject("Button5.BackgroundImage"), System.Drawing.Bitmap) Me.Button5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button5.ForeColor = System.Drawing.Color.Maroon Me.Button5.Location = New System.Drawing.Point(224, 288) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(72, 32) Me.Button5.TabIndex = 30 Me.Button5.Text = "&First" ' 'Button4 ' Me.Button4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button4.BackgroundImage = CType(resources.GetObject("Button4.BackgroundImage"), System.Drawing.Bitmap) Me.Button4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button4.ForeColor = System.Drawing.Color.Maroon Me.Button4.Location = New System.Drawing.Point(504, 208) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(75, 32) Me.Button4.TabIndex = 29 Me.Button4.Text = "&Delete" ' 'Button3 ' Me.Button3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button3.BackgroundImage = CType(resources.GetObject("Button3.BackgroundImage"), System.Drawing.Bitmap) Me.Button3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.Maroon Me.Button3.Location = New System.Drawing.Point(504, 176) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(75, 32) Me.Button3.TabIndex = 28

153

Industrial Man Power Resource Organization


Me.Button3.Text = "&Edit" ' 'Button2 ' Me.Button2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button2.BackgroundImage = CType(resources.GetObject("Button2.BackgroundImage"), System.Drawing.Bitmap) Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.Maroon Me.Button2.Location = New System.Drawing.Point(504, 144) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(75, 32) Me.Button2.TabIndex = 27 Me.Button2.Text = "&Save" ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button1.BackgroundImage = CType(resources.GetObject("Button1.BackgroundImage"), System.Drawing.Bitmap) Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.Maroon Me.Button1.Location = New System.Drawing.Point(504, 112) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(75, 32) Me.Button1.TabIndex = 26 Me.Button1.Text = "&Add" ' 'TxtSinc ' Me.TxtSinc.BackColor = System.Drawing.Color.White Me.TxtSinc.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.TxtSinc.ForeColor = System.Drawing.Color.Maroon Me.TxtSinc.Location = New System.Drawing.Point(328, 184) Me.TxtSinc.Name = "TxtSinc" Me.TxtSinc.Size = New System.Drawing.Size(136, 22) Me.TxtSinc.TabIndex = 25 Me.TxtSinc.Text = "" ' 'TxtSname ' Me.TxtSname.BackColor = System.Drawing.Color.White Me.TxtSname.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.TxtSname.ForeColor = System.Drawing.Color.Maroon Me.TxtSname.Location = New System.Drawing.Point(328, 144) Me.TxtSname.Name = "TxtSname" Me.TxtSname.Size = New System.Drawing.Size(136, 22) Me.TxtSname.TabIndex = 23 Me.TxtSname.Text = "" '

154

Industrial Man Power Resource Organization


'TxtSno ' Me.TxtSno.BackColor = System.Drawing.Color.White Me.TxtSno.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.TxtSno.ForeColor = System.Drawing.Color.Maroon Me.TxtSno.Location = New System.Drawing.Point(328, 112) Me.TxtSno.Name = "TxtSno" Me.TxtSno.Size = New System.Drawing.Size(136, 22) Me.TxtSno.TabIndex = 22 Me.TxtSno.Text = "" ' 'Label5 ' Me.Label5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.ForeColor = System.Drawing.Color.Maroon Me.Label5.Location = New System.Drawing.Point(192, 232) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(104, 16) Me.Label5.TabIndex = 21 Me.Label5.Text = "DeptNo" ' 'Label4 ' Me.Label4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.Maroon Me.Label4.Location = New System.Drawing.Point(192, 192) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(104, 16) Me.Label4.TabIndex = 20 Me.Label4.Text = "Sec-Incharge" ' 'Label3 ' Me.Label3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.Maroon Me.Label3.Location = New System.Drawing.Point(192, 152) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(104, 16) Me.Label3.TabIndex = 19 Me.Label3.Text = "SectionName" ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte))

155

Industrial Man Power Resource Organization


Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.Maroon Me.Label2.Location = New System.Drawing.Point(192, 112) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(112, 16) Me.Label2.TabIndex = 18 Me.Label2.Text = "Section Id:" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label1.Font = New System.Drawing.Font("Book Antiqua", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Maroon Me.Label1.Location = New System.Drawing.Point(240, 40) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(304, 32) Me.Label1.TabIndex = 17 Me.Label1.Text = "Section Registration" ' 'CmbDno ' Me.CmbDno.Location = New System.Drawing.Point(328, 224) Me.CmbDno.Name = "CmbDno" Me.CmbDno.Size = New System.Drawing.Size(136, 21) Me.CmbDno.TabIndex = 34 ' 'Frmsections ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.ClientSize = New System.Drawing.Size(776, 416) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.CmbDno, Me.Button8, Me.Button7, Me.Button6, Me.Button5, Me.Button4, Me.Button3, Me.Button2, Me.Button1, Me.TxtSinc, Me.TxtSname, Me.TxtSno, Me.Label5, Me.Label4, Me.Label3, Me.Label2, Me.Label1}) Me.Name = "Frmsections" Me.Opacity = 0.5 Me.Text = "FrmSections" Me.TransparencyKey = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.ResumeLayout(False) End Sub #End Region Dim selcmd As OleDbCommand Dim da As OleDbDataAdapter Dim ds As New DataSet() Dim inscmd As New OleDbCommand() Dim delcmd As New OleDbCommand() Dim dr As OleDbDataReader Dim s As String

156

Industrial Man Power Resource Organization


Dim rno As Integer Dim cn As New connectdatabase() Dim d As OleDbDataReader Dim deptcmd As OleDbCommand Private Sub Frmsections_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load c = AddressOf clw cn.connect() selcmd = New OleDbCommand("select * from sections", conn) da = New OleDbDataAdapter() da.SelectCommand = selcmd da.Fill(ds) deptcmd = New OleDbCommand("select deptno from departments", conn) Dim d As New OleDbDataAdapter(deptcmd) d.Fill(ds, "departments") Dim i As Integer For i = 0 To ds.Tables("departments").Rows.Count - 1 CmbDno.Items.Add(ds.Tables("departments").Rows(i)(0)) Next rno = 0 Call fillfields(rno) End Sub Sub fillfields(ByVal rnum As Integer) TxtSno.Text = ds.Tables(0).Rows(rnum)(0) TxtSname.Text = ds.Tables(0).Rows(rnum)(1) TxtSinc.Text = ds.Tables(0).Rows(rnum)(2) CmbDno.Text = ds.Tables(0).Rows(rnum)(3) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.ClearFields(Me) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim str As String str = "insert into sections values('" & TxtSno.Text & "','" & TxtSname.Text & "','" & TxtSinc.Text & "','" & CmbDno.Text & "')" MsgBox(str) inscmd.Connection = conn inscmd = New OleDbCommand(str, conn) inscmd.ExecuteNonQuery() MsgBox("Successfully Saved") End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim r As String r = InputBox("Enter The Section Number ToDelete") 'Call efill(r) Dim s As String s = "delete from sections where secTid='" & r & "'" delcmd.Connection = conn delcmd = New OleDbCommand(s, conn) Dim res As Integer

157

Industrial Man Power Resource Organization


res = delcmd.ExecuteNonQuery() If res = 1 Then MsgBox("Record deleted.....") Else MsgBox("sorry") End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Try If Button3.Text = "&Edit" Then Button3.Text = "&Update" Dim recno As String recno = InputBox("Enter the Section No to Modify...") Call efill(recno) Else Dim ucmd As OleDbCommand Dim ups As String ups = "update sections set SECTNAME='" & TxtSname.Text & "',SECTIONINCH='" & TxtSinc.Text & "',DEPTNO='" & CmbDno.Text & "'WHERE SECTID='" & Trim(TxtSno.Text) & "'" MsgBox(ups) ucmd = New OleDbCommand(ups, conn) ucmd.ExecuteNonQuery() Button3.Text = "&Edit" MsgBox("Successfully Updated") End If Catch E1 As Exception MsgBox(E1.Message) End Try End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click rno = 0 Call fillfields(rno) End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If rno > 0 Then rno -= 1 Call fillfields(rno) Else MsgBox("First record") End If End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If rno < ds.Tables(0).Rows.Count - 1 Then rno += 1 Call fillfields(rno) Else MsgBox("Last Record") End If End Sub

158

Industrial Man Power Resource Organization


Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click rno = ds.Tables(0).Rows.Count - 1 Call fillfields(rno) End Sub Sub efill(ByVal rnumber As String) s = "select * from SECTIONS where SECTID ='" & rnumber & "'" Dim cmd As New OleDbCommand(s, conn) dr = cmd.ExecuteReader Dim n As Byte n = dr.Read() If n > 0 Then TxtSno.Text = dr.Item(0) TxtSname.Text = dr.Item(1) TxtSinc.Text = dr.Item(2) CmbDno.Text = dr.Item(3) Else MsgBox("NotFound") End If If Not dr.IsClosed Then dr.Close() End Sub Public Sub clw() Me.Hide() End Sub End Class

159

Industrial Man Power Resource Organization Vaccancies Registration

160

Industrial Man Power Resource Organization Source code for Vaccancy Registration

Imports System.Data.OleDb Public Class FrmVacancyMast Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Label10 As System.Windows.Forms.Label Friend WithEvents Button8 As System.Windows.Forms.Button Friend WithEvents Button7 As System.Windows.Forms.Button Friend WithEvents Button6 As System.Windows.Forms.Button Friend WithEvents Button5 As System.Windows.Forms.Button Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents Label8 As System.Windows.Forms.Label Friend WithEvents Button4 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label

161

Industrial Man Power Resource Organization


Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents cmbSecno As System.Windows.Forms.ComboBox Friend WithEvents txtpriority As System.Windows.Forms.TextBox Friend WithEvents txtsttus As System.Windows.Forms.TextBox Friend WithEvents txtvdate As System.Windows.Forms.TextBox Friend WithEvents txtnov As System.Windows.Forms.TextBox Friend WithEvents txtvid As System.Windows.Forms.TextBox Friend WithEvents cmbdeptno As System.Windows.Forms.ComboBox Friend WithEvents cmbdesig As System.Windows.Forms.ComboBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(FrmVacancyMast)) Me.cmbSecno = New System.Windows.Forms.ComboBox() Me.txtpriority = New System.Windows.Forms.TextBox() Me.Label10 = New System.Windows.Forms.Label() Me.Button8 = New System.Windows.Forms.Button() Me.Button7 = New System.Windows.Forms.Button() Me.Button6 = New System.Windows.Forms.Button() Me.Button5 = New System.Windows.Forms.Button() Me.txtsttus = New System.Windows.Forms.TextBox() Me.txtvdate = New System.Windows.Forms.TextBox() Me.txtnov = New System.Windows.Forms.TextBox() Me.Label6 = New System.Windows.Forms.Label() Me.Label7 = New System.Windows.Forms.Label() Me.Label8 = New System.Windows.Forms.Label() Me.Button4 = New System.Windows.Forms.Button() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.txtvid = New System.Windows.Forms.TextBox() Me.Label5 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.cmbdeptno = New System.Windows.Forms.ComboBox() Me.cmbdesig = New System.Windows.Forms.ComboBox() Me.SuspendLayout() ' 'cmbSecno ' Me.cmbSecno.Location = New System.Drawing.Point(224, 204) Me.cmbSecno.Name = "cmbSecno" Me.cmbSecno.Size = New System.Drawing.Size(136, 21) Me.cmbSecno.TabIndex = 75 ' 'txtpriority ' Me.txtpriority.BackColor = System.Drawing.Color.White Me.txtpriority.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtpriority.ForeColor = System.Drawing.Color.Maroon Me.txtpriority.Location = New System.Drawing.Point(528, 236) Me.txtpriority.Name = "txtpriority" Me.txtpriority.Size = New System.Drawing.Size(136, 22) Me.txtpriority.TabIndex = 74 Me.txtpriority.Text = ""

162

Industrial Man Power Resource Organization


' 'Label10 ' Me.Label10.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label10.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label10.ForeColor = System.Drawing.Color.Maroon Me.Label10.Location = New System.Drawing.Point(392, 244) Me.Label10.Name = "Label10" Me.Label10.Size = New System.Drawing.Size(104, 16) Me.Label10.TabIndex = 73 Me.Label10.Text = "Priority:" ' 'Button8 ' Me.Button8.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button8.BackgroundImage = CType(resources.GetObject("Button8.BackgroundImage"), System.Drawing.Bitmap) Me.Button8.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button8.ForeColor = System.Drawing.Color.Maroon Me.Button8.Location = New System.Drawing.Point(640, 48) Me.Button8.Name = "Button8" Me.Button8.Size = New System.Drawing.Size(32, 32) Me.Button8.TabIndex = 72 Me.Button8.Text = ">|" ' 'Button7 ' Me.Button7.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button7.BackgroundImage = CType(resources.GetObject("Button7.BackgroundImage"), System.Drawing.Bitmap) Me.Button7.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button7.ForeColor = System.Drawing.Color.Maroon Me.Button7.Location = New System.Drawing.Point(600, 48) Me.Button7.Name = "Button7" Me.Button7.Size = New System.Drawing.Size(40, 32) Me.Button7.TabIndex = 71 Me.Button7.Text = ">>" ' 'Button6 ' Me.Button6.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button6.BackgroundImage = CType(resources.GetObject("Button6.BackgroundImage"), System.Drawing.Bitmap) Me.Button6.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button6.ForeColor = System.Drawing.Color.Maroon Me.Button6.Location = New System.Drawing.Point(560, 48)

163

Industrial Man Power Resource Organization


Me.Button6.Name = "Button6" Me.Button6.Size = New System.Drawing.Size(40, 32) Me.Button6.TabIndex = 70 Me.Button6.Text = "<<" ' 'Button5 ' Me.Button5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button5.BackgroundImage = CType(resources.GetObject("Button5.BackgroundImage"), System.Drawing.Bitmap) Me.Button5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button5.ForeColor = System.Drawing.Color.Maroon Me.Button5.Location = New System.Drawing.Point(520, 48) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(40, 32) Me.Button5.TabIndex = 69 Me.Button5.Text = "|<" ' 'txtsttus ' Me.txtsttus.BackColor = System.Drawing.Color.White Me.txtsttus.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtsttus.ForeColor = System.Drawing.Color.Maroon Me.txtsttus.Location = New System.Drawing.Point(528, 164) Me.txtsttus.Name = "txtsttus" Me.txtsttus.Size = New System.Drawing.Size(136, 22) Me.txtsttus.TabIndex = 68 Me.txtsttus.Text = "" ' 'txtvdate ' Me.txtvdate.BackColor = System.Drawing.Color.White Me.txtvdate.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtvdate.ForeColor = System.Drawing.Color.Maroon Me.txtvdate.Location = New System.Drawing.Point(528, 204) Me.txtvdate.Name = "txtvdate" Me.txtvdate.Size = New System.Drawing.Size(136, 22) Me.txtvdate.TabIndex = 67 Me.txtvdate.Text = "" ' 'txtnov ' Me.txtnov.BackColor = System.Drawing.Color.White Me.txtnov.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtnov.ForeColor = System.Drawing.Color.Maroon Me.txtnov.Location = New System.Drawing.Point(528, 132) Me.txtnov.Name = "txtnov" Me.txtnov.Size = New System.Drawing.Size(136, 22) Me.txtnov.TabIndex = 66 Me.txtnov.Text = "" ' 'Label6

164

Industrial Man Power Resource Organization


' Me.Label6.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label6.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label6.ForeColor = System.Drawing.Color.Maroon Me.Label6.Location = New System.Drawing.Point(392, 212) Me.Label6.Name = "Label6" Me.Label6.Size = New System.Drawing.Size(104, 16) Me.Label6.TabIndex = 65 Me.Label6.Text = "VacamcyDate:" ' 'Label7 ' Me.Label7.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label7.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label7.ForeColor = System.Drawing.Color.Maroon Me.Label7.Location = New System.Drawing.Point(392, 172) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(104, 16) Me.Label7.TabIndex = 64 Me.Label7.Text = "Status:" ' 'Label8 ' Me.Label8.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label8.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label8.ForeColor = System.Drawing.Color.Maroon Me.Label8.Location = New System.Drawing.Point(392, 132) Me.Label8.Name = "Label8" Me.Label8.Size = New System.Drawing.Size(104, 16) Me.Label8.TabIndex = 63 Me.Label8.Text = "No.Of.Vacancies:" ' 'Button4 ' Me.Button4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button4.BackgroundImage = CType(resources.GetObject("Button4.BackgroundImage"), System.Drawing.Bitmap) Me.Button4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button4.ForeColor = System.Drawing.Color.Maroon Me.Button4.Location = New System.Drawing.Point(408, 312) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(48, 32) Me.Button4.TabIndex = 61 Me.Button4.Text = "&Delete" ' 'Button3

165

Industrial Man Power Resource Organization


' Me.Button3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button3.BackgroundImage = CType(resources.GetObject("Button3.BackgroundImage"), System.Drawing.Bitmap) Me.Button3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.Maroon Me.Button3.Location = New System.Drawing.Point(360, 312) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(48, 32) Me.Button3.TabIndex = 60 Me.Button3.Text = "&Edit" ' 'Button2 ' Me.Button2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button2.BackgroundImage = CType(resources.GetObject("Button2.BackgroundImage"), System.Drawing.Bitmap) Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.Maroon Me.Button2.Location = New System.Drawing.Point(312, 312) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(48, 32) Me.Button2.TabIndex = 59 Me.Button2.Text = "&Save" ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button1.BackgroundImage = CType(resources.GetObject("Button1.BackgroundImage"), System.Drawing.Bitmap) Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.Maroon Me.Button1.Location = New System.Drawing.Point(264, 312) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(48, 32) Me.Button1.TabIndex = 58 Me.Button1.Text = "&Add" ' 'txtvid ' Me.txtvid.BackColor = System.Drawing.Color.White Me.txtvid.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtvid.ForeColor = System.Drawing.Color.Maroon Me.txtvid.Location = New System.Drawing.Point(224, 132) Me.txtvid.Name = "txtvid" Me.txtvid.Size = New System.Drawing.Size(136, 22) Me.txtvid.TabIndex = 55 Me.txtvid.Text = ""

166

Industrial Man Power Resource Organization


' 'Label5 ' Me.Label5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.ForeColor = System.Drawing.Color.Maroon Me.Label5.Location = New System.Drawing.Point(88, 244) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(104, 16) Me.Label5.TabIndex = 54 Me.Label5.Text = "DesigId:" ' 'Label4 ' Me.Label4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.Maroon Me.Label4.Location = New System.Drawing.Point(88, 204) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(104, 16) Me.Label4.TabIndex = 53 Me.Label4.Text = "SectionId:" ' 'Label3 ' Me.Label3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.Maroon Me.Label3.Location = New System.Drawing.Point(88, 164) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(104, 16) Me.Label3.TabIndex = 52 Me.Label3.Text = "DeptNo:" ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.Maroon Me.Label2.Location = New System.Drawing.Point(88, 132) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(112, 16) Me.Label2.TabIndex = 51 Me.Label2.Text = "VacncyId:" ' 'Label1

167

Industrial Man Power Resource Organization


' Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label1.Font = New System.Drawing.Font("Book Antiqua", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Maroon Me.Label1.Location = New System.Drawing.Point(216, 24) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(248, 32) Me.Label1.TabIndex = 50 Me.Label1.Text = "Vacancies Registration" ' 'cmbdeptno ' Me.cmbdeptno.Location = New System.Drawing.Point(224, 168) Me.cmbdeptno.Name = "cmbdeptno" Me.cmbdeptno.Size = New System.Drawing.Size(136, 21) Me.cmbdeptno.TabIndex = 76 ' 'cmbdesig ' Me.cmbdesig.Location = New System.Drawing.Point(224, 248) Me.cmbdesig.Name = "cmbdesig" Me.cmbdesig.Size = New System.Drawing.Size(136, 21) Me.cmbdesig.TabIndex = 77 ' 'FrmVacancyMast ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.ClientSize = New System.Drawing.Size(768, 408) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.cmbdesig, Me.cmbdeptno, Me.cmbSecno, Me.txtpriority, Me.Label10, Me.Button8, Me.Button7, Me.Button6, Me.Button5, Me.txtsttus, Me.txtvdate, Me.txtnov, Me.Label6, Me.Label7, Me.Label8, Me.Button4, Me.Button3, Me.Button2, Me.Button1, Me.txtvid, Me.Label5, Me.Label4, Me.Label3, Me.Label2, Me.Label1}) Me.Name = "FrmVacancyMast" Me.Opacity = 0.5 Me.Text = "FrmVacancyMast" Me.TransparencyKey = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.ResumeLayout(False) End Sub #End Region Dim selcmd As OleDbCommand Dim da As OleDbDataAdapter Dim ds As New DataSet() Dim inscmd As New OleDbCommand() Dim delcmd As New OleDbCommand() Dim dr As OleDbDataReader Dim s As String Dim rno As Integer Dim cn As New connectdatabase() Dim d As OleDbDataReader

168

Industrial Man Power Resource Organization


Dim deptcmd As OleDbCommand Dim desigcmd As OleDbCommand Dim seccmd As OleDbCommand Private Sub FrmVacancyMast_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load c = AddressOf clw cn.connect() selcmd = New OleDbCommand("select * from vacancies", conn) da = New OleDbDataAdapter() da.SelectCommand = selcmd da.Fill(ds) Dim i As Integer deptcmd = New OleDbCommand("select deptno from departments", conn) Dim da1 As New OleDbDataAdapter(deptcmd) da1.Fill(ds, "departments") For i = 0 To ds.Tables("departments").Rows.Count - 1 cmbdeptno.Items.Add(ds.Tables("departments").Rows(i)(0)) Next Try desigcmd = New OleDbCommand("select designid from designation", conn) Dim da2 As New OleDbDataAdapter() 'desigcmd) da2.SelectCommand = desigcmd da2.Fill(ds, "designation") Catch E1 As Exception MsgBox(E1.Message) End Try For i = 0 To ds.Tables("designation").Rows.Count - 1 cmbdesig.Items.Add(ds.Tables("designation").Rows(i)(0)) Next seccmd = New OleDbCommand("select sectid from sections", conn) Dim da3 As New OleDbDataAdapter(seccmd) da3.Fill(ds, "sections") For i = 0 To ds.Tables("sections").Rows.Count - 1 cmbSecno.Items.Add(ds.Tables("sections").Rows(i)(0)) Next rno = 0 Call fillfields(rno) End Sub Sub fillfields(ByVal rnum As Integer) txtvid.Text = ds.Tables(0).Rows(rnum)(0) cmbdeptno.Text = ds.Tables(0).Rows(rnum)(1) cmbSecno.Text = ds.Tables(0).Rows(rnum)(2) cmbdesig.Text = ds.Tables(0).Rows(rnum)(3) txtnov.Text = ds.Tables(0).Rows(rnum)(4) txtsttus.Text = ds.Tables(0).Rows(rnum)(5) txtvdate.Text = ds.Tables(0).Rows(rnum)(6) txtpriority.Text = ds.Tables(0).Rows(rnum)(7) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Try Dim str As String str = "insert into VACANCIES values('" & txtvid.Text & "'," & cmbdeptno.Text & ",'" & cmbSecno.Text & "','" & cmbdesig.Text & "'," & txtnov.Text & ",'" & txtsttus.Text & "','" & CDate(txtvdate.Text) & "','" & txtpriority.Text & "')" MsgBox(str) inscmd.Connection = conn

169

Industrial Man Power Resource Organization


inscmd = New OleDbCommand(str, conn) inscmd.ExecuteNonQuery() MsgBox("Successfully Saved") Catch E1 As Exception MsgBox(E1.Message) End Try End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim r As String r = InputBox("Enter The VacancyId ToDelete") 'Call efill(r) Dim s As String s = "delete from vacancies where VACANCYID='" & r & "'" delcmd.Connection = conn delcmd = New OleDbCommand(s, conn) Dim res As Integer res = delcmd.ExecuteNonQuery() If res = 1 Then MsgBox("Record deleted.....") Else MsgBox("sorry") End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Try If Button3.Text = "&Edit" Then Button3.Text = "&Update" Dim recno As String recno = InputBox("Enter the VacancyId to Modify...") Call efill(recno) Else Dim ucmd As OleDbCommand Dim ups As String ups = "update vacancies set DEPTNO=" & cmbdeptno.Text & ",sectionid=" & cmbSecno.Text & ",DESIGNATIONID='" & cmbdesig.Text & "',NOOFVACANCIES=" & txtnov.Text & ",status='" & txtsttus.Text & "',vacancydate='" & txtvdate.Text & "',priority='" & txtpriority.Text & "'VACANCYID='" & Trim(txtvid.Text) & "'" MsgBox(ups) ucmd = New OleDbCommand(ups, conn) ucmd.ExecuteNonQuery() Button3.Text = "&Edit" MsgBox("Successfully Updated") End If Catch E1 As Exception MsgBox(E1.Message) End Try End Sub Sub efill(ByVal rnumber As String) s = "select * from vacancies where vacancyid ='" & rnumber & "'" Dim cmd As New OleDbCommand(s, conn) dr = cmd.ExecuteReader Dim n As Byte n = dr.Read()

170

Industrial Man Power Resource Organization


If n > 0 Then txtvid.Text = dr.Item(0) cmbdeptno.Text = dr.Item(1) cmbSecno.Text = dr.Item(2) cmbdesig.Text = dr.Item(3) txtnov.Text = dr.Item(4) txtsttus.Text = dr.Item(5) txtvdate.Text = dr.Item(6) txtpriority.Text = dr.Item(7) Else MsgBox("NotFound") End If If Not dr.IsClosed Then dr.Close() End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click rno = 0 Call fillfields(rno) End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click rno = ds.Tables(0).Rows.Count - 1 Call fillfields(rno) End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If rno < ds.Tables(0).Rows.Count - 1 Then rno += 1 Call fillfields(rno) MsgBox("Last Record") End If End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If rno > 0 Then rno -= 1 Call fillfields(rno) Else MsgBox("First Record") End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.ClearFields(Me) End Sub Public Sub clw() Me.Hide() End Sub End Class

171

Industrial Man Power Resource Organization Designation Registration

172

Industrial Man Power Resource Organization Source code for Designation Registration

Imports System.Data.OleDb Public Class FrmDesig Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Button8 As System.Windows.Forms.Button Friend WithEvents Button7 As System.Windows.Forms.Button Friend WithEvents Button6 As System.Windows.Forms.Button Friend WithEvents Button5 As System.Windows.Forms.Button Friend WithEvents Button4 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents txtDesigname As System.Windows.Forms.TextBox Friend WithEvents txtDesigid As System.Windows.Forms.TextBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(FrmDesig)) Me.Button8 = New System.Windows.Forms.Button()

173

Industrial Man Power Resource Organization


Me.Button7 = New System.Windows.Forms.Button() Me.Button6 = New System.Windows.Forms.Button() Me.Button5 = New System.Windows.Forms.Button() Me.Button4 = New System.Windows.Forms.Button() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.txtDesigname = New System.Windows.Forms.TextBox() Me.txtDesigid = New System.Windows.Forms.TextBox() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'Button8 ' Me.Button8.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button8.BackgroundImage = CType(resources.GetObject("Button8.BackgroundImage"), System.Drawing.Bitmap) Me.Button8.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button8.ForeColor = System.Drawing.Color.Maroon Me.Button8.Location = New System.Drawing.Point(416, 224) Me.Button8.Name = "Button8" Me.Button8.Size = New System.Drawing.Size(75, 32) Me.Button8.TabIndex = 50 Me.Button8.Text = "&Last" ' 'Button7 ' Me.Button7.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button7.BackgroundImage = CType(resources.GetObject("Button7.BackgroundImage"), System.Drawing.Bitmap) Me.Button7.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button7.ForeColor = System.Drawing.Color.Maroon Me.Button7.Location = New System.Drawing.Point(344, 224) Me.Button7.Name = "Button7" Me.Button7.Size = New System.Drawing.Size(75, 32) Me.Button7.TabIndex = 49 Me.Button7.Text = "&Next" ' 'Button6 ' Me.Button6.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button6.BackgroundImage = CType(resources.GetObject("Button6.BackgroundImage"), System.Drawing.Bitmap) Me.Button6.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button6.ForeColor = System.Drawing.Color.Maroon Me.Button6.Location = New System.Drawing.Point(272, 224) Me.Button6.Name = "Button6"

174

Industrial Man Power Resource Organization


Me.Button6.Size = New System.Drawing.Size(75, 32) Me.Button6.TabIndex = 48 Me.Button6.Text = "&Previous" ' 'Button5 ' Me.Button5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button5.BackgroundImage = CType(resources.GetObject("Button5.BackgroundImage"), System.Drawing.Bitmap) Me.Button5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button5.ForeColor = System.Drawing.Color.Maroon Me.Button5.Location = New System.Drawing.Point(200, 224) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(72, 32) Me.Button5.TabIndex = 47 Me.Button5.Text = "&First" ' 'Button4 ' Me.Button4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button4.BackgroundImage = CType(resources.GetObject("Button4.BackgroundImage"), System.Drawing.Bitmap) Me.Button4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button4.ForeColor = System.Drawing.Color.Maroon Me.Button4.Location = New System.Drawing.Point(584, 152) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(75, 32) Me.Button4.TabIndex = 46 Me.Button4.Text = "&Delete" ' 'Button3 ' Me.Button3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button3.BackgroundImage = CType(resources.GetObject("Button3.BackgroundImage"), System.Drawing.Bitmap) Me.Button3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.Maroon Me.Button3.Location = New System.Drawing.Point(584, 120) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(75, 32) Me.Button3.TabIndex = 45 Me.Button3.Text = "&Edit" ' 'Button2 ' Me.Button2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button2.BackgroundImage = CType(resources.GetObject("Button2.BackgroundImage"), System.Drawing.Bitmap)

175

Industrial Man Power Resource Organization


Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.Maroon Me.Button2.Location = New System.Drawing.Point(512, 152) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(75, 32) Me.Button2.TabIndex = 44 Me.Button2.Text = "&Save" ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button1.BackgroundImage = CType(resources.GetObject("Button1.BackgroundImage"), System.Drawing.Bitmap) Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.Maroon Me.Button1.Location = New System.Drawing.Point(512, 120) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(75, 32) Me.Button1.TabIndex = 43 Me.Button1.Text = "&Add" ' 'txtDesigname ' Me.txtDesigname.BackColor = System.Drawing.Color.White Me.txtDesigname.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtDesigname.ForeColor = System.Drawing.Color.Maroon Me.txtDesigname.Location = New System.Drawing.Point(360, 152) Me.txtDesigname.Name = "txtDesigname" Me.txtDesigname.Size = New System.Drawing.Size(112, 22) Me.txtDesigname.TabIndex = 41 Me.txtDesigname.Text = "" ' 'txtDesigid ' Me.txtDesigid.BackColor = System.Drawing.Color.White Me.txtDesigid.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtDesigid.ForeColor = System.Drawing.Color.Maroon Me.txtDesigid.Location = New System.Drawing.Point(360, 120) Me.txtDesigid.Name = "txtDesigid" Me.txtDesigid.Size = New System.Drawing.Size(112, 22) Me.txtDesigid.TabIndex = 40 Me.txtDesigid.Text = "" ' 'Label3 ' Me.Label3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.Maroon

176

Industrial Man Power Resource Organization


Me.Label3.Location = New System.Drawing.Point(200, 160) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(120, 16) Me.Label3.TabIndex = 37 Me.Label3.Text = "Designation Name" ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.Maroon Me.Label2.Location = New System.Drawing.Point(200, 120) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(112, 16) Me.Label2.TabIndex = 36 Me.Label2.Text = "Designation Id:" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label1.Font = New System.Drawing.Font("Book Antiqua", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Maroon Me.Label1.Location = New System.Drawing.Point(248, 48) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(304, 32) Me.Label1.TabIndex = 35 Me.Label1.Text = "Designation Registration" ' 'FrmDesig ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.ClientSize = New System.Drawing.Size(768, 376) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button8, Me.Button7, Me.Button6, Me.Button5, Me.Button4, Me.Button3, Me.Button2, Me.Button1, Me.txtDesigname, Me.txtDesigid, Me.Label3, Me.Label2, Me.Label1}) Me.Name = "FrmDesig" Me.Opacity = 0.5 Me.Text = "FrmDesig" Me.TransparencyKey = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.ResumeLayout(False) End Sub #End Region Dim selcmd As OleDbCommand Dim da As OleDbDataAdapter Dim ds As New DataSet() Dim inscmd As New OleDbCommand() Dim delcmd As New OleDbCommand()

177

Industrial Man Power Resource Organization


Dim dr As OleDbDataReader Dim s As String Dim rno As Integer Dim cn As New connectdatabase() Dim d As OleDbDataReader Dim deptcmd As OleDbCommand Private Sub FrmDesig_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load c = AddressOf clw cn.connect() selcmd = New OleDbCommand("select * from designation", conn) da = New OleDbDataAdapter() da.SelectCommand = selcmd da.Fill(ds) rno = 0 Call fillfields(rno) End Sub Sub fillfields(ByVal rnum As Integer) txtDesigid.Text = ds.Tables(0).Rows(rnum)(0) txtDesigname.Text = ds.Tables(0).Rows(rnum)(1) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim str As String str = "insert into designation values('" & txtDesigid.Text & "','" & txtDesigname.Text & "')" MsgBox(str) inscmd.Connection = conn inscmd = New OleDbCommand(str, conn) inscmd.ExecuteNonQuery() MsgBox("successfully Saved") End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim r As String r = InputBox("Enter The DesigId ToDelete") Dim s As String s = "delete from sections where DESIGNID='" & r & "'" delcmd.Connection = conn delcmd = New OleDbCommand(s, conn) Dim res As Integer res = delcmd.ExecuteNonQuery() If res = 1 Then MsgBox("Record deleted.....") Else MsgBox("sorry") End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click If Button3.Text = "&Edit" Then Button3.Text = "&Update" Dim recno As String recno = InputBox("Enter the DESIGID to Modify...")

178

Industrial Man Power Resource Organization


Call efill(recno) Else Dim ucmd As OleDbCommand Dim ups As String ups = "update designation set DESIGNATION='" & txtDesigname.Text & "' where desigNid='" & txtDesigid.Text & "'" MsgBox(ups) ucmd = New OleDbCommand(ups, conn) ucmd.ExecuteNonQuery() Button3.Text = "&Edit" MsgBox("Successfully Updated") End If End Sub Sub efill(ByVal rnumber As String) s = "select * from designation where desigNid ='" & rnumber & "'" Dim cmd As New OleDbCommand(s, conn) dr = cmd.ExecuteReader Dim n As Byte n = dr.Read() If n > 0 Then txtDesigid.Text = dr.Item(0) txtDesigname.Text = dr.Item(1) Else MsgBox("NotFound") End If If Not dr.IsClosed Then dr.Close() End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click rno = ds.Tables(0).Rows.Count - 1 Call fillfields(rno) End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If rno < ds.Tables(0).Rows.Count - 1 Then rno += 1 Call fillfields(rno) Else MsgBox("Last Record") End If End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If rno > 0 Then rno -= 1 Call fillfields(rno) Else MsgBox("First Record") End If End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click rno = 0 Call fillfields(rno)

179

Industrial Man Power Resource Organization


End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.ClearFields(Me) End Sub Public Sub clw() Me.Hide() End Sub End Class

180

Industrial Man Power Resource Organization

Vaccancy Filling Form

181

Industrial Man Power Resource Organization Source Code Vaccancy Filling From

Imports System.Data.OleDb Public Class FrmVacancyFill Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Button8 As System.Windows.Forms.Button Friend WithEvents Button7 As System.Windows.Forms.Button Friend WithEvents Button6 As System.Windows.Forms.Button Friend WithEvents Button5 As System.Windows.Forms.Button Friend WithEvents Button4 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents txtfdate As System.Windows.Forms.TextBox Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents cmbvid As System.Windows.Forms.ComboBox Friend WithEvents cmbempno As System.Windows.Forms.ComboBox

182

Industrial Man Power Resource Organization


Friend WithEvents txtdet As System.Windows.Forms.TextBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(FrmVacancyFill)) Me.Button8 = New System.Windows.Forms.Button() Me.Button7 = New System.Windows.Forms.Button() Me.Button6 = New System.Windows.Forms.Button() Me.Button5 = New System.Windows.Forms.Button() Me.Button4 = New System.Windows.Forms.Button() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.txtfdate = New System.Windows.Forms.TextBox() Me.Label5 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.cmbvid = New System.Windows.Forms.ComboBox() Me.cmbempno = New System.Windows.Forms.ComboBox() Me.txtdet = New System.Windows.Forms.TextBox() Me.SuspendLayout() ' 'Button8 ' Me.Button8.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button8.BackgroundImage = CType(resources.GetObject("Button8.BackgroundImage"), System.Drawing.Bitmap) Me.Button8.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button8.ForeColor = System.Drawing.Color.Maroon Me.Button8.Location = New System.Drawing.Point(448, 312) Me.Button8.Name = "Button8" Me.Button8.Size = New System.Drawing.Size(75, 32) Me.Button8.TabIndex = 50 Me.Button8.Text = "&Last" ' 'Button7 ' Me.Button7.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button7.BackgroundImage = CType(resources.GetObject("Button7.BackgroundImage"), System.Drawing.Bitmap) Me.Button7.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button7.ForeColor = System.Drawing.Color.Maroon Me.Button7.Location = New System.Drawing.Point(376, 312) Me.Button7.Name = "Button7" Me.Button7.Size = New System.Drawing.Size(75, 32) Me.Button7.TabIndex = 49 Me.Button7.Text = "&Next" ' 'Button6 '

183

Industrial Man Power Resource Organization


Me.Button6.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button6.BackgroundImage = CType(resources.GetObject("Button6.BackgroundImage"), System.Drawing.Bitmap) Me.Button6.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button6.ForeColor = System.Drawing.Color.Maroon Me.Button6.Location = New System.Drawing.Point(304, 312) Me.Button6.Name = "Button6" Me.Button6.Size = New System.Drawing.Size(75, 32) Me.Button6.TabIndex = 48 Me.Button6.Text = "&Previous" ' 'Button5 ' Me.Button5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button5.BackgroundImage = CType(resources.GetObject("Button5.BackgroundImage"), System.Drawing.Bitmap) Me.Button5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button5.ForeColor = System.Drawing.Color.Maroon Me.Button5.Location = New System.Drawing.Point(232, 312) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(72, 32) Me.Button5.TabIndex = 47 Me.Button5.Text = "&First" ' 'Button4 ' Me.Button4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button4.BackgroundImage = CType(resources.GetObject("Button4.BackgroundImage"), System.Drawing.Bitmap) Me.Button4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button4.ForeColor = System.Drawing.Color.Maroon Me.Button4.Location = New System.Drawing.Point(512, 200) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(75, 32) Me.Button4.TabIndex = 46 Me.Button4.Text = "&Delete" ' 'Button3 ' Me.Button3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button3.BackgroundImage = CType(resources.GetObject("Button3.BackgroundImage"), System.Drawing.Bitmap) Me.Button3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.Maroon Me.Button3.Location = New System.Drawing.Point(512, 168) Me.Button3.Name = "Button3"

184

Industrial Man Power Resource Organization


Me.Button3.Size = New System.Drawing.Size(75, 32) Me.Button3.TabIndex = 45 Me.Button3.Text = "&Edit" ' 'Button2 ' Me.Button2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button2.BackgroundImage = CType(resources.GetObject("Button2.BackgroundImage"), System.Drawing.Bitmap) Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.Maroon Me.Button2.Location = New System.Drawing.Point(512, 136) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(75, 32) Me.Button2.TabIndex = 44 Me.Button2.Text = "&Save" ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button1.BackgroundImage = CType(resources.GetObject("Button1.BackgroundImage"), System.Drawing.Bitmap) Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.Maroon Me.Button1.Location = New System.Drawing.Point(512, 104) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(75, 32) Me.Button1.TabIndex = 43 Me.Button1.Text = "&Add" ' 'txtfdate ' Me.txtfdate.BackColor = System.Drawing.Color.White Me.txtfdate.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtfdate.ForeColor = System.Drawing.Color.Maroon Me.txtfdate.Location = New System.Drawing.Point(336, 176) Me.txtfdate.Name = "txtfdate" Me.txtfdate.Size = New System.Drawing.Size(136, 22) Me.txtfdate.TabIndex = 42 Me.txtfdate.Text = "" ' 'Label5 ' Me.Label5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.ForeColor = System.Drawing.Color.Maroon Me.Label5.Location = New System.Drawing.Point(200, 224) Me.Label5.Name = "Label5"

185

Industrial Man Power Resource Organization


Me.Label5.Size = New System.Drawing.Size(104, 16) Me.Label5.TabIndex = 39 Me.Label5.Text = "IntakeDetails:" ' 'Label4 ' Me.Label4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.Maroon Me.Label4.Location = New System.Drawing.Point(200, 184) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(104, 16) Me.Label4.TabIndex = 38 Me.Label4.Text = "FillDate:" ' 'Label3 ' Me.Label3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.Maroon Me.Label3.Location = New System.Drawing.Point(200, 144) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(104, 16) Me.Label3.TabIndex = 37 Me.Label3.Text = "EmployeeId:" ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.Maroon Me.Label2.Location = New System.Drawing.Point(200, 104) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(112, 16) Me.Label2.TabIndex = 36 Me.Label2.Text = "VacancyId:" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label1.Font = New System.Drawing.Font("Book Antiqua", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Maroon Me.Label1.Location = New System.Drawing.Point(240, 16) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(360, 32) Me.Label1.TabIndex = 35 Me.Label1.Text = "Vacancies Filling Information"

186

Industrial Man Power Resource Organization


' 'cmbvid ' Me.cmbvid.Location = New System.Drawing.Point(336, 96) Me.cmbvid.Name = "cmbvid" Me.cmbvid.Size = New System.Drawing.Size(136, 21) Me.cmbvid.TabIndex = 52 ' 'cmbempno ' Me.cmbempno.Location = New System.Drawing.Point(336, 136) Me.cmbempno.Name = "cmbempno" Me.cmbempno.Size = New System.Drawing.Size(136, 21) Me.cmbempno.TabIndex = 53 ' 'txtdet ' Me.txtdet.BackColor = System.Drawing.Color.White Me.txtdet.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtdet.ForeColor = System.Drawing.Color.Maroon Me.txtdet.Location = New System.Drawing.Point(336, 216) Me.txtdet.Multiline = True Me.txtdet.Name = "txtdet" Me.txtdet.ScrollBars = System.Windows.Forms.ScrollBars.Both Me.txtdet.Size = New System.Drawing.Size(136, 64) Me.txtdet.TabIndex = 54 Me.txtdet.Text = "" ' 'FrmVacancyFill ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.ClientSize = New System.Drawing.Size(768, 408) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.txtdet, Me.cmbempno, Me.cmbvid, Me.Button8, Me.Button7, Me.Button6, Me.Button5, Me.Button4, Me.Button3, Me.Button2, Me.Button1, Me.txtfdate, Me.Label5, Me.Label4, Me.Label3, Me.Label2, Me.Label1}) Me.Name = "FrmVacancyFill" Me.Opacity = 0.5 Me.Text = "FrmVacancyFill" Me.TransparencyKey = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.ResumeLayout(False) End Sub #End Region Dim selcmd As OleDbCommand Dim da As OleDbDataAdapter Dim ds As New DataSet() Dim inscmd As New OleDbCommand() Dim delcmd As New OleDbCommand() Dim dr As OleDbDataReader Dim s As String Dim rno As Integer

187

Industrial Man Power Resource Organization


Dim cn As New connectdatabase() Dim d As OleDbDataReader Dim deptcmd As OleDbCommand Dim vaccmd As OleDbCommand Private Sub FrmVacancyFill_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load c = AddressOf clw cn.connect() selcmd = New OleDbCommand("select * from vacancyfilldetails", conn) da = New OleDbDataAdapter() da.SelectCommand = selcmd da.Fill(ds) deptcmd = New OleDbCommand("select empid from employees", conn) Dim d As New OleDbDataAdapter(deptcmd) d.Fill(ds, "employees") Dim i As Integer For i = 0 To ds.Tables("employees").Rows.Count - 1 cmbempno.Items.Add(ds.Tables("employees").Rows(i)(0)) Next vaccmd = New OleDbCommand("select vacancyid from vacancies", conn) Dim d1 As New OleDbDataAdapter(vaccmd) d1.Fill(ds, "vacancies") For i = 0 To ds.Tables("vacancies").Rows.Count - 1 cmbvid.Items.Add(ds.Tables("vacancies").Rows(i)(0)) Next rno = 0 Call fillfields(rno) End Sub Sub fillfields(ByVal rnum As Integer) cmbvid.Text = ds.Tables(0).Rows(rnum)(0) cmbempno.Text = ds.Tables(0).Rows(rnum)(1) txtfdate.Text = ds.Tables(0).Rows(rnum)(2) txtdet.Text = ds.Tables(0).Rows(rnum)(3) End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim str As String str = "insert into vacancyfilldetails values('" & cmbvid.Text & "','" & cmbempno.Text & "','" & CDate(txtfdate.Text) & "','" & txtdet.Text & "')" MsgBox(str) inscmd.Connection = conn inscmd = New OleDbCommand(str, conn) inscmd.ExecuteNonQuery() MsgBox("Successfully Saved") End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim r As String r = InputBox("Enter The Vid Number ToDelete") 'Call efill(r) Dim s As String s = "delete from vacancyfilldetails where vacancyid='" & r & "'" delcmd.Connection = conn delcmd = New OleDbCommand(s, conn) Dim res As Integer

188

Industrial Man Power Resource Organization


res = delcmd.ExecuteNonQuery() If res = 1 Then MsgBox("Record deleted.....") Else MsgBox("sorry") End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click If Button3.Text = "&Edit" Then Button3.Text = "&Update" Dim recno As String recno = InputBox("Enter the vid No to Modify...") Call efill(recno) Else Dim ucmd As OleDbCommand Dim ups As String ups = "update sections set empid='" & cmbempno.Text & "',filldate='" & txtfdate.Text & "',INTAKEDETAILS='" & txtdet.Text & "'WHERE VACANCYID='" & Trim(cmbvid.Text) & "'" MsgBox(ups) ucmd = New OleDbCommand(ups, conn) ucmd.ExecuteNonQuery() Button3.Text = "&Edit" MsgBox("Successfully Updated") End If End Sub Sub efill(ByVal rnumber As String) s = "select * from vacancyfilldetails where vacancyid ='" & rnumber & "'" Dim cmd As New OleDbCommand(s, conn) dr = cmd.ExecuteReader Dim n As Byte n = dr.Read() If n > 0 Then cmbvid.Text = dr.Item(0) cmbempno.Text = dr.Item(1) txtfdate.Text = dr.Item(2) txtdet.Text = dr.Item(3) Else MsgBox("NotFound") End If If Not dr.IsClosed Then dr.Close() End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click rno = ds.Tables(0).Rows.Count - 1 Call fillfields(rno) End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If rno < ds.Tables(0).Rows.Count - 1 Then rno += 1 Call fillfields(rno) Else

189

Industrial Man Power Resource Organization


MsgBox("Last Record") End If End Sub Private Sub Button6_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button6.Click If rno > 0 Then rno -= 1 Call fillfields(rno) Else MsgBox("FIRST RECORD") End If End Sub Private Sub Button5_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button5.Click rno = 0 Call fillfields(rno) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.ClearFields(Me) End Sub Public Sub clw() Me.Hide() End Sub End Class

190

Industrial Man Power Resource Organization Job Rotation Form

191

Industrial Man Power Resource Organization


Source Code Job Rotation
Imports System.Data.OleDb Public Class FrmJobRotation Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Button8 As System.Windows.Forms.Button Friend WithEvents Button7 As System.Windows.Forms.Button Friend WithEvents Button6 As System.Windows.Forms.Button Friend WithEvents Button5 As System.Windows.Forms.Button Friend WithEvents Label8 As System.Windows.Forms.Label Friend WithEvents Label9 As System.Windows.Forms.Label Friend WithEvents Button4 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents cmbddesig As System.Windows.Forms.ComboBox Friend WithEvents txtRem As System.Windows.Forms.TextBox Friend WithEvents txtstatus As System.Windows.Forms.TextBox Friend WithEvents txtpdesig As System.Windows.Forms.TextBox Friend WithEvents cmbename As System.Windows.Forms.ComboBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(FrmJobRotation))

192

Industrial Man Power Resource Organization


Me.cmbddesig = New System.Windows.Forms.ComboBox() Me.Button8 = New System.Windows.Forms.Button() Me.Button7 = New System.Windows.Forms.Button() Me.Button6 = New System.Windows.Forms.Button() Me.Button5 = New System.Windows.Forms.Button() Me.txtRem = New System.Windows.Forms.TextBox() Me.Label8 = New System.Windows.Forms.Label() Me.Label9 = New System.Windows.Forms.Label() Me.Button4 = New System.Windows.Forms.Button() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.txtstatus = New System.Windows.Forms.TextBox() Me.txtpdesig = New System.Windows.Forms.TextBox() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.cmbename = New System.Windows.Forms.ComboBox() Me.SuspendLayout() ' 'cmbddesig ' Me.cmbddesig.Location = New System.Drawing.Point(320, 176) Me.cmbddesig.Name = "cmbddesig" Me.cmbddesig.Size = New System.Drawing.Size(136, 21) Me.cmbddesig.TabIndex = 75 ' 'Button8 ' Me.Button8.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button8.BackgroundImage = CType(resources.GetObject("Button8.BackgroundImage"), System.Drawing.Bitmap) Me.Button8.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button8.ForeColor = System.Drawing.Color.Maroon Me.Button8.Location = New System.Drawing.Point(408, 304) Me.Button8.Name = "Button8" Me.Button8.Size = New System.Drawing.Size(32, 32) Me.Button8.TabIndex = 72 Me.Button8.Text = ">|" ' 'Button7 ' Me.Button7.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button7.BackgroundImage = CType(resources.GetObject("Button7.BackgroundImage"), System.Drawing.Bitmap) Me.Button7.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button7.ForeColor = System.Drawing.Color.Maroon Me.Button7.Location = New System.Drawing.Point(368, 304) Me.Button7.Name = "Button7" Me.Button7.Size = New System.Drawing.Size(40, 32) Me.Button7.TabIndex = 71

193

Industrial Man Power Resource Organization


Me.Button7.Text = ">>" ' 'Button6 ' Me.Button6.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button6.BackgroundImage = CType(resources.GetObject("Button6.BackgroundImage"), System.Drawing.Bitmap) Me.Button6.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button6.ForeColor = System.Drawing.Color.Maroon Me.Button6.Location = New System.Drawing.Point(328, 304) Me.Button6.Name = "Button6" Me.Button6.Size = New System.Drawing.Size(40, 32) Me.Button6.TabIndex = 70 Me.Button6.Text = "<<" ' 'Button5 ' Me.Button5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button5.BackgroundImage = CType(resources.GetObject("Button5.BackgroundImage"), System.Drawing.Bitmap) Me.Button5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button5.ForeColor = System.Drawing.Color.Maroon Me.Button5.Location = New System.Drawing.Point(288, 304) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(40, 32) Me.Button5.TabIndex = 69 Me.Button5.Text = "|<" ' 'txtRem ' Me.txtRem.BackColor = System.Drawing.Color.White Me.txtRem.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtRem.ForeColor = System.Drawing.Color.Maroon Me.txtRem.Location = New System.Drawing.Point(320, 248) Me.txtRem.Name = "txtRem" Me.txtRem.Size = New System.Drawing.Size(136, 22) Me.txtRem.TabIndex = 66 Me.txtRem.Text = "" ' 'Label8 ' Me.Label8.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label8.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label8.ForeColor = System.Drawing.Color.Maroon Me.Label8.Location = New System.Drawing.Point(184, 248) Me.Label8.Name = "Label8" Me.Label8.Size = New System.Drawing.Size(104, 16) Me.Label8.TabIndex = 63

194

Industrial Man Power Resource Organization


Me.Label8.Text = "Remarks:" ' 'Label9 ' Me.Label9.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label9.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label9.ForeColor = System.Drawing.Color.Maroon Me.Label9.Location = New System.Drawing.Point(184, 216) Me.Label9.Name = "Label9" Me.Label9.Size = New System.Drawing.Size(112, 16) Me.Label9.TabIndex = 62 Me.Label9.Text = "Status:" ' 'Button4 ' Me.Button4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button4.BackgroundImage = CType(resources.GetObject("Button4.BackgroundImage"), System.Drawing.Bitmap) Me.Button4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button4.ForeColor = System.Drawing.Color.Maroon Me.Button4.Location = New System.Drawing.Point(560, 160) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(48, 32) Me.Button4.TabIndex = 61 Me.Button4.Text = "&Delete" ' 'Button3 ' Me.Button3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button3.BackgroundImage = CType(resources.GetObject("Button3.BackgroundImage"), System.Drawing.Bitmap) Me.Button3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.Maroon Me.Button3.Location = New System.Drawing.Point(560, 128) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(48, 32) Me.Button3.TabIndex = 60 Me.Button3.Text = "&Edit" ' 'Button2 ' Me.Button2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button2.BackgroundImage = CType(resources.GetObject("Button2.BackgroundImage"), System.Drawing.Bitmap) Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.Maroon

195

Industrial Man Power Resource Organization


Me.Button2.Location = New System.Drawing.Point(512, 160) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(48, 32) Me.Button2.TabIndex = 59 Me.Button2.Text = "&Save" ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button1.BackgroundImage = CType(resources.GetObject("Button1.BackgroundImage"), System.Drawing.Bitmap) Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.Maroon Me.Button1.Location = New System.Drawing.Point(512, 128) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(48, 32) Me.Button1.TabIndex = 58 Me.Button1.Text = "&Add" ' 'txtstatus ' Me.txtstatus.BackColor = System.Drawing.Color.White Me.txtstatus.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtstatus.ForeColor = System.Drawing.Color.Maroon Me.txtstatus.Location = New System.Drawing.Point(320, 208) Me.txtstatus.Name = "txtstatus" Me.txtstatus.Size = New System.Drawing.Size(136, 22) Me.txtstatus.TabIndex = 57 Me.txtstatus.Text = "" ' 'txtpdesig ' Me.txtpdesig.BackColor = System.Drawing.Color.White Me.txtpdesig.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtpdesig.ForeColor = System.Drawing.Color.Maroon Me.txtpdesig.Location = New System.Drawing.Point(320, 136) Me.txtpdesig.Name = "txtpdesig" Me.txtpdesig.Size = New System.Drawing.Size(136, 22) Me.txtpdesig.TabIndex = 56 Me.txtpdesig.Text = "" ' 'Label4 ' Me.Label4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.Maroon Me.Label4.Location = New System.Drawing.Point(184, 176) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(104, 16) Me.Label4.TabIndex = 53

196

Industrial Man Power Resource Organization


Me.Label4.Text = "DeputedTo:" ' 'Label3 ' Me.Label3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.Maroon Me.Label3.Location = New System.Drawing.Point(184, 136) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(104, 16) Me.Label3.TabIndex = 52 Me.Label3.Text = "PresentDesignation" ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.Maroon Me.Label2.Location = New System.Drawing.Point(184, 104) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(112, 16) Me.Label2.TabIndex = 51 Me.Label2.Text = "EmpName" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label1.Font = New System.Drawing.Font("Book Antiqua", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Maroon Me.Label1.Location = New System.Drawing.Point(216, 40) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(344, 32) Me.Label1.TabIndex = 50 Me.Label1.Text = "Employee Job Rotation" ' 'cmbename ' Me.cmbename.Location = New System.Drawing.Point(320, 96) Me.cmbename.Name = "cmbename" Me.cmbename.Size = New System.Drawing.Size(136, 21) Me.cmbename.TabIndex = 76 ' 'FrmJobRotation ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.ClientSize = New System.Drawing.Size(768, 392) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.cmbename, Me.cmbddesig, Me.Button8, Me.Button7, Me.Button6, Me.Button5, Me.txtRem, Me.Label8,

197

Industrial Man Power Resource Organization


Me.Label9, Me.Button4, Me.Button3, Me.Button2, Me.Button1, Me.txtstatus, Me.txtpdesig, Me.Label4, Me.Label3, Me.Label2, Me.Label1}) Me.Name = "FrmJobRotation" Me.Opacity = 0.5 Me.Text = "FrmJobRotation" Me.TransparencyKey = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.ResumeLayout(False) End Sub #End Region Dim selcmd As OleDbCommand Dim da As OleDbDataAdapter Dim ds As New DataSet() Dim inscmd As New OleDbCommand() Dim delcmd As New OleDbCommand() Dim dr As OleDbDataReader Dim s As String Dim rno As Integer Dim cn As New connectdatabase() Dim d As OleDbDataReader Dim deptcmd As OleDbCommand Dim dcmd As OleDbCommand Private Sub FrmJobRotation_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load c = AddressOf clw Dim i As Integer cn.connect() selcmd = New OleDbCommand("select * from jobrotation", conn) da = New OleDbDataAdapter() da.SelectCommand = selcmd da.Fill(ds) dcmd = New OleDbCommand("select designation from designation", conn) Dim d1 As New OleDbDataAdapter(dcmd) d1.Fill(ds, "designation") For i = 0 To ds.Tables("designation").Rows.Count - 1 cmbddesig.Items.Add(ds.Tables("designation").Rows(i)(0)) Next deptcmd = New OleDbCommand("select ename from employees", conn) Dim d As New OleDbDataAdapter(deptcmd) d.Fill(ds, "employees") For i = 0 To ds.Tables("employees").Rows.Count - 1 cmbename.Items.Add(ds.Tables("employees").Rows(i)(0)) Next rno = 0 Call fillfields(rno) End Sub Sub fillfields(ByVal rnum As Integer) cmbename.Text = cn.getid("ename", "empid", "employees", ds.Tables(0).Rows(rnum)(0)) txtpdesig.Text = ds.Tables(0).Rows(rnum)(1) cmbddesig.Text = ds.Tables(0).Rows(rnum)(2) txtstatus.Text = ds.Tables(0).Rows(rnum)(3) txtRem.Text = ds.Tables(0).Rows(rnum)(4) End Sub

198

Industrial Man Power Resource Organization


Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim str As String Dim s As String s = cn.getid("empid", "ename", "employees", cmbename.Text) MsgBox(s) str = "insert into jobrotation values('" & cn.getid("empid", "ename", "employees", cmbename.Text) & "','" & txtpdesig.Text & "','" & cmbddesig.Text & "','" & txtstatus.Text & "','" & txtRem.Text & "')" MsgBox(str) inscmd.Connection = conn inscmd = New OleDbCommand(str, conn) inscmd.ExecuteNonQuery() MsgBox("Successfully Saved") End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim r As String r = InputBox("Enter The eMPLOYEE Number ToDelete") 'Call efill(r) Dim s As String s = "delete from jobrotation where EMPID='" & r & "'" delcmd.Connection = conn delcmd = New OleDbCommand(s, conn) Dim res As Integer res = delcmd.ExecuteNonQuery() If res = 1 Then MsgBox("Record deleted.....") Else MsgBox("sorry") End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim recno As String If Button3.Text = "&Edit" Then Button3.Text = "&Update" recno = InputBox("Enter the eMPID No to Modify...") Call efill(recno) Else Dim ucmd As OleDbCommand Dim ups As String ups = "update jobrotation set PRESENRDESIGNATION='" & txtpdesig.Text & "',DEPUTEDTO='" & cmbddesig.Text & "',STATUS='" & txtstatus.Text & "',remarks='" & txtRem.Text & "'WHERE EMPID='" & Trim(recno) & "'" MsgBox(ups) ucmd = New OleDbCommand(ups, conn) ucmd.ExecuteNonQuery() Button3.Text = "&Edit" MsgBox("Successfully Updated") End If End Sub Sub efill(ByVal rnumber As String) s = "select * from jobrotation where empid ='" & rnumber & "'" Dim cmd As New OleDbCommand(s, conn)

199

Industrial Man Power Resource Organization


dr = cmd.ExecuteReader Dim n As Byte n = dr.Read() If n > 0 Then cmbename.Text = dr.Item(0) txtpdesig.Text = dr.Item(1) cmbddesig.Text = dr.Item(2) txtstatus.Text = dr.Item(3) txtRem.Text = dr.Item(4) Else MsgBox("NotFound") End If If Not dr.IsClosed Then dr.Close() End Sub

Private Sub cmbename_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbename.SelectedIndexChanged 'Dim cm As OleDbCommand 'Dim s As String 's = "select designationid from employees where ename='" & Trim(cmbename.Text) & "'" 'cm = New OleDbCommand(s, conn) 'Dim d As OleDbDataReader 'd = cm.ExecuteReader 'd.Read() 'txtpdesig = d.Item(0) 'd.Close() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.ClearFields(Me) End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click rno = 0 fillfields(rno) End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If rno > 0 Then rno -= 1 fillfields(rno) Else MsgBox("First Record") End If End Sub

200

Industrial Man Power Resource Organization


Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If rno = ds.Tables("jobrotation").Rows.Count - 1 Then rno += 1 fillfields(rno) Else MsgBox("Last Record") End If End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click rno = ds.Tables("jobrotation").Rows.Count - 1 fillfields(rno) End Sub Public Sub clw() Me.Hide() End Sub End Class

201

Industrial Man Power Resource Organization Department Inter-Dependencie

202

Industrial Man Power Resource Organization Source Code Department Inter-Dependencie

Imports System.Data.OleDb Public Class FrmInterDep Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Button8 As System.Windows.Forms.Button Friend WithEvents Button7 As System.Windows.Forms.Button Friend WithEvents Button6 As System.Windows.Forms.Button Friend WithEvents Button5 As System.Windows.Forms.Button Friend WithEvents Button4 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents cmbdno As System.Windows.Forms.ComboBox Friend WithEvents txtldpt As System.Windows.Forms.TextBox Friend WithEvents txtudpt As System.Windows.Forms.TextBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(FrmInterDep)) Me.Button8 = New System.Windows.Forms.Button()

203

Industrial Man Power Resource Organization


Me.Button7 = New System.Windows.Forms.Button() Me.Button6 = New System.Windows.Forms.Button() Me.Button5 = New System.Windows.Forms.Button() Me.Button4 = New System.Windows.Forms.Button() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.txtldpt = New System.Windows.Forms.TextBox() Me.txtudpt = New System.Windows.Forms.TextBox() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.cmbdno = New System.Windows.Forms.ComboBox() Me.SuspendLayout() ' 'Button8 ' Me.Button8.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button8.BackgroundImage = CType(resources.GetObject("Button8.BackgroundImage"), System.Drawing.Bitmap) Me.Button8.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button8.ForeColor = System.Drawing.Color.Maroon Me.Button8.Location = New System.Drawing.Point(439, 316) Me.Button8.Name = "Button8" Me.Button8.Size = New System.Drawing.Size(75, 32) Me.Button8.TabIndex = 33 Me.Button8.Text = "&Last" ' 'Button7 ' Me.Button7.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button7.BackgroundImage = CType(resources.GetObject("Button7.BackgroundImage"), System.Drawing.Bitmap) Me.Button7.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button7.ForeColor = System.Drawing.Color.Maroon Me.Button7.Location = New System.Drawing.Point(367, 316) Me.Button7.Name = "Button7" Me.Button7.Size = New System.Drawing.Size(75, 32) Me.Button7.TabIndex = 32 Me.Button7.Text = "&Next" ' 'Button6 ' Me.Button6.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button6.BackgroundImage = CType(resources.GetObject("Button6.BackgroundImage"), System.Drawing.Bitmap) Me.Button6.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button6.ForeColor = System.Drawing.Color.Maroon

204

Industrial Man Power Resource Organization


Me.Button6.Location = New System.Drawing.Point(295, 316) Me.Button6.Name = "Button6" Me.Button6.Size = New System.Drawing.Size(75, 32) Me.Button6.TabIndex = 31 Me.Button6.Text = "&Previous" ' 'Button5 ' Me.Button5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button5.BackgroundImage = CType(resources.GetObject("Button5.BackgroundImage"), System.Drawing.Bitmap) Me.Button5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button5.ForeColor = System.Drawing.Color.Maroon Me.Button5.Location = New System.Drawing.Point(223, 316) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(72, 32) Me.Button5.TabIndex = 30 Me.Button5.Text = "&First" ' 'Button4 ' Me.Button4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button4.BackgroundImage = CType(resources.GetObject("Button4.BackgroundImage"), System.Drawing.Bitmap) Me.Button4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button4.ForeColor = System.Drawing.Color.Maroon Me.Button4.Location = New System.Drawing.Point(503, 236) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(75, 32) Me.Button4.TabIndex = 29 Me.Button4.Text = "&Delete" ' 'Button3 ' Me.Button3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button3.BackgroundImage = CType(resources.GetObject("Button3.BackgroundImage"), System.Drawing.Bitmap) Me.Button3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.Maroon Me.Button3.Location = New System.Drawing.Point(503, 204) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(75, 32) Me.Button3.TabIndex = 28 Me.Button3.Text = "&Edit" ' 'Button2 ' Me.Button2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte))

205

Industrial Man Power Resource Organization


Me.Button2.BackgroundImage = CType(resources.GetObject("Button2.BackgroundImage"), System.Drawing.Bitmap) Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.Maroon Me.Button2.Location = New System.Drawing.Point(503, 172) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(75, 32) Me.Button2.TabIndex = 27 Me.Button2.Text = "&Save" ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button1.BackgroundImage = CType(resources.GetObject("Button1.BackgroundImage"), System.Drawing.Bitmap) Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.Maroon Me.Button1.Location = New System.Drawing.Point(503, 140) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(75, 32) Me.Button1.TabIndex = 26 Me.Button1.Text = "&Add" ' 'txtldpt ' Me.txtldpt.BackColor = System.Drawing.Color.White Me.txtldpt.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtldpt.ForeColor = System.Drawing.Color.Maroon Me.txtldpt.Location = New System.Drawing.Point(327, 212) Me.txtldpt.Name = "txtldpt" Me.txtldpt.Size = New System.Drawing.Size(136, 22) Me.txtldpt.TabIndex = 25 Me.txtldpt.Text = "" ' 'txtudpt ' Me.txtudpt.BackColor = System.Drawing.Color.White Me.txtudpt.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtudpt.ForeColor = System.Drawing.Color.Maroon Me.txtudpt.Location = New System.Drawing.Point(327, 172) Me.txtudpt.Name = "txtudpt" Me.txtudpt.Size = New System.Drawing.Size(136, 22) Me.txtudpt.TabIndex = 23 Me.txtudpt.Text = "" ' 'Label4 ' Me.Label4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte))

206

Industrial Man Power Resource Organization


Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.Maroon Me.Label4.Location = New System.Drawing.Point(191, 220) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(104, 16) Me.Label4.TabIndex = 20 Me.Label4.Text = "LowerDept" ' 'Label3 ' Me.Label3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.Maroon Me.Label3.Location = New System.Drawing.Point(191, 180) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(104, 16) Me.Label3.TabIndex = 19 Me.Label3.Text = "UpperDept" ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.Maroon Me.Label2.Location = New System.Drawing.Point(191, 140) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(112, 16) Me.Label2.TabIndex = 18 Me.Label2.Text = "DeptNo :" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label1.Font = New System.Drawing.Font("Book Antiqua", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Maroon Me.Label1.Location = New System.Drawing.Point(239, 60) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(304, 32) Me.Label1.TabIndex = 17 Me.Label1.Text = "Department Dependencies" ' 'cmbdno ' Me.cmbdno.Location = New System.Drawing.Point(328, 136) Me.cmbdno.Name = "cmbdno" Me.cmbdno.Size = New System.Drawing.Size(136, 21) Me.cmbdno.TabIndex = 34 '

207

Industrial Man Power Resource Organization


'FrmInterDep ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.ClientSize = New System.Drawing.Size(768, 408) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.cmbdno, Me.Button8, Me.Button7, Me.Button6, Me.Button5, Me.Button4, Me.Button3, Me.Button2, Me.Button1, Me.txtldpt, Me.txtudpt, Me.Label4, Me.Label3, Me.Label2, Me.Label1}) Me.Name = "FrmInterDep" Me.Opacity = 0.5 Me.Text = "FrmInterDep" Me.TransparencyKey = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.ResumeLayout(False) End Sub #End Region Dim cn As New connectdatabase() Dim cmd As OleDbCommand Dim dr As OleDbDataReader Dim da As OleDbDataAdapter Dim ds As New DataSet() Dim scmd As OleDbCommand Dim delcmd As OleDbCommand Dim s As String Dim rno As Integer Private Sub FrmInterDep_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load c = AddressOf clw cn.connect() scmd = New OleDbCommand("select * from deptinterdependency", conn) da = New OleDbDataAdapter(scmd) da.Fill(ds, "deptinterdependency") rno = 0 Call fillfields(rno) delcmd = New OleDbCommand("select deptno from departments", conn) Dim d1 As New OleDbDataAdapter(delcmd) d1.Fill(ds, "departments") Dim i As Integer For i = 0 To ds.Tables("departments").Rows.Count - 1 cmbdno.Items.Add(ds.Tables("departments").Rows(i)(0)) Next End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.ClearFields(Me) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim s As String s = "insert into deptinterdependency values(" & Val(cmbdno.Text) & "," & Val(txtudpt.Text) & "," & Val(txtldpt.Text) & ")"

208

Industrial Man Power Resource Organization


cmd = New OleDbCommand(s, conn) cmd.ExecuteNonQuery() MsgBox("Successfully Saved") cmd.Dispose() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click If Button3.Text = "&Edit" Then Button3.Text = "&Update" Dim recno As Integer recno = InputBox("Enter the DeptNo No to Modify...") Call efill(recno) Else Dim ucmd As OleDbCommand Dim ups As String ups = "update deptinterdependency set UPDEPTNO=" & Val(txtudpt.Text) & ",DNDEPTNO=" & Val(txtldpt.Text) & "where DEPTNO=" & Val(cmbdno.Text) MsgBox(ups) ucmd = New OleDbCommand(ups, conn) ucmd.ExecuteNonQuery() MsgBox("Successfully Updated") Button3.Text = "&Edit" End If End Sub Sub efill(ByVal rnumber As Integer) Dim s As String s = "select * from deptinterdependency where deptno =" & rnumber Dim cmd As New OleDbCommand(s, conn) dr = cmd.ExecuteReader Dim n As Byte n = dr.Read() If n > 0 Then cmbdno.Text = dr.Item(0) txtudpt.Text = dr.Item(1) txtldpt.Text = dr.Item(2) Else MsgBox("NotFound") End If If Not dr.IsClosed Then dr.Close() End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click rno = 0 Call fillfields(rno) End Sub Sub fillfields(ByVal rnum As Integer) cmbdno.Text = ds.Tables(0).Rows(rnum)(0) txtudpt.Text = ds.Tables(0).Rows(rnum)(1) txtldpt.Text = ds.Tables(0).Rows(rnum)(2) End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click rno = ds.Tables(0).Rows.Count - 1

209

Industrial Man Power Resource Organization


Call fillfields(rno) End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click rno += 1 Call fillfields(rno) End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click rno -= 1 Call fillfields(rno) End Sub Public Sub clw() Me.Hide() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim r As String r = InputBox("Enter The DEPTId ToDelete") 'Call efill(r) Dim s As String s = "delete from deptinterdependency where deptno =" & r delcmd.Connection = conn delcmd = New OleDbCommand(s, conn) Dim res As Integer res = delcmd.ExecuteNonQuery() If res = 1 Then MsgBox("Record deleted.....") Else MsgBox("sorry") End If End Sub End Class

210

Industrial Man Power Resource Organization Organizational View

211

Industrial Man Power Resource Organization Source Code Organization

Imports System.Data.OleDb Public Class FrmOrg Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents ListBox1 As System.Windows.Forms.ListBox Friend WithEvents ListBox2 As System.Windows.Forms.ListBox Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents ListView1 As System.Windows.Forms.ListView <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Label1 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.ListBox1 = New System.Windows.Forms.ListBox() Me.ListBox2 = New System.Windows.Forms.ListBox() Me.Label3 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.ListView1 = New System.Windows.Forms.ListView() Me.SuspendLayout() ' 'Label1 '

212

Industrial Man Power Resource Organization


Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Blue Me.Label1.Location = New System.Drawing.Point(264, 24) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(160, 23) Me.Label1.TabIndex = 0 Me.Label1.Text = "ORGANIZATION" ' 'Label2 ' Me.Label2.Cursor = System.Windows.Forms.Cursors.Hand Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.Blue Me.Label2.Location = New System.Drawing.Point(32, 80) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(160, 23) Me.Label2.TabIndex = 1 Me.Label2.Text = "Departments" Me.Label2.Visible = False ' 'ListBox1 ' Me.ListBox1.Location = New System.Drawing.Point(32, 144) Me.ListBox1.Name = "ListBox1" Me.ListBox1.Size = New System.Drawing.Size(128, 95) Me.ListBox1.TabIndex = 2 Me.ListBox1.Visible = False ' 'ListBox2 ' Me.ListBox2.Location = New System.Drawing.Point(256, 208) Me.ListBox2.Name = "ListBox2" Me.ListBox2.Size = New System.Drawing.Size(128, 95) Me.ListBox2.TabIndex = 3 Me.ListBox2.Visible = False ' 'Label3 ' Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.Blue Me.Label3.Location = New System.Drawing.Point(248, 152) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(160, 23) Me.Label3.TabIndex = 5 Me.Label3.Text = "Employees" Me.Label3.Visible = False ' 'Label4 ' Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 12.0!,

9.75!,

9.75!,

9.75!,

213

Industrial Man Power Resource Organization


Me.Label4.ForeColor = System.Drawing.Color.Blue Me.Label4.Location = New System.Drawing.Point(496, 232) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(160, 23) Me.Label4.TabIndex = 6 Me.Label4.Text = "designation" Me.Label4.Visible = False ' 'ListView1 ' Me.ListView1.Location = New System.Drawing.Point(488, 272) Me.ListView1.Name = "ListView1" Me.ListView1.Size = New System.Drawing.Size(296, 97) Me.ListView1.TabIndex = 7 Me.ListView1.Visible = False ' 'FrmOrg ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.ClientSize = New System.Drawing.Size(776, 437) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.ListView1, Me.Label4, Me.Label3, Me.ListBox2, Me.ListBox1, Me.Label2, Me.Label1}) Me.Name = "FrmOrg" Me.Text = "FrmOrg" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.ResumeLayout(False) End Sub #End Region Dim Dcmd As OleDbCommand Dim dr As OleDbDataReader Dim cn As New connectdatabase() Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click Label2.Visible = True End Sub Private Sub FrmOrg_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load c = AddressOf clw cn.connect() Label2.Visible = True ListView1.View = View.Details ListView1.Columns.Add("Eid", 100, HorizontalAlignment.Center) ListView1.Columns.Add("Ename", 100, HorizontalAlignment.Center) ListView1.Columns.Add("desig", 100, HorizontalAlignment.Center) End Sub Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged ListBox2.Items.Clear() Label3.Visible = True ListBox2.Visible = True Call cagraphics(162, 206, 211, 206) Call cagraphics(211, 206, 211, 262) Call cagraphics(211, 262, 254, 262)

214

Industrial Man Power Resource Organization


Dim ecmd As OleDbCommand Dim str As String str = "select ename from employees where deptno=" & getdno(ListBox1.SelectedItem) ecmd = New OleDbCommand(str, conn) Dim r As OleDbDataReader r = ecmd.ExecuteReader While r.Read ListBox2.Items.Add(r.Item("ename")) End While If Not r.IsClosed Then r.Close() End Sub Public Function getdno(ByVal fname As String) Dim c As OleDbCommand Dim s As String Dim n As Integer s = "select deptno from departments where deptname='" & fname & "'" c = New OleDbCommand(s, conn) n = c.ExecuteScalar getdno = n End Function Private Sub FrmOrg_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown End Sub Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click ListBox1.Items.Clear() ListBox1.Visible = True 'cagraphics(84, 103, 84, 143) Dcmd = New OleDbCommand("select deptname from departments", conn) dr = Dcmd.ExecuteReader While dr.Read ListBox1.Items.Add(dr.Item(0)) End While If Not dr.IsClosed Then dr.Close() End Sub Public Sub cagraphics(ByVal a1 As Integer, ByVal b1 As Integer, ByVal a2 As Integer, ByVal b2 As Integer) Dim g As Graphics Dim myPen As New Pen(Color.Red) myPen.Width = 5 g = Me.CreateGraphics g.DrawLine(myPen, a1, b1, a2, b2) End Sub Private Sub ListBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox2.SelectedIndexChanged ListView1.Visible = True Dim item As New ListViewItem() Label4.Visible = True 'ListBox3.Visible = True 'ListBox3.Items.Clear() Call cagraphics(387, 262, 436, 262) Call cagraphics(436, 262, 436, 318) Call cagraphics(436, 318, 479, 318) Dim ecmd As OleDbCommand

215

Industrial Man Power Resource Organization


Dim str As String Dim r As OleDbDataReader str = "select empid,ename,designationid from employees where ename='" & ListBox2.SelectedItem & "'" ecmd = New OleDbCommand(str, conn) r = ecmd.ExecuteReader While r.Read item = ListView1.Items.Add(r.Item(0)) item.SubItems.Add(r.Item(1)) item.SubItems.Add(r.Item(2)) End While r.Close() 'ListBox3.Items.Add(ecmd.ExecuteScalar) End Sub Public Sub clw() Me.Hide() End Sub End Class

216

Industrial Man Power Resource Organization

Form Design Structure

217

Industrial Man Power Resource Organization Source code for Design Structure

Imports System.Data.OleDb Public Class FrmDesigtructure Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents TreeView1 As System.Windows.Forms.TreeView <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.TreeView1 = New System.Windows.Forms.TreeView() Me.SuspendLayout() ' 'TreeView1 ' Me.TreeView1.Dock = System.Windows.Forms.DockStyle.Fill Me.TreeView1.Location = New System.Drawing.Point(0, 0) Me.TreeView1.Name = "TreeView1" Me.TreeView1.Size = New System.Drawing.Size(1008, 499) Me.TreeView1.TabIndex = 0 ' 'FrmDesigtructure ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.ClientSize = New System.Drawing.Size(1008, 499) Me.Controls.Add(Me.TreeView1) Me.Name = "FrmDesigtructure"

218

Industrial Man Power Resource Organization


Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "FrmDesigtructure" Me.ResumeLayout(False) End Sub #End Region Dim CON As OleDbConnection Dim CMD As OleDbCommand Dim CMD1 As OleDbCommand Dim DR As OleDbDataReader Dim nds(4) As TreeNode Dim nd As TreeNode Private Sub FrmDesigtructure_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load c = AddressOf clw CON = New OleDbConnection("Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=EnterpriseOrganiser;Data Source=peers") CON.Open() CMD = New OleDbCommand("select ename,designationid from employees") CMD1 = New OleDbCommand("SELECT COUNT(*) FROM employees") CMD.Connection = CON CMD1.Connection = CON Dim CNT As Integer CNT = CMD1.ExecuteScalar CMD1.Dispose() DR = CMD.ExecuteReader ReDim nds(CNT - 1) Dim I As Integer While DR.Read() nds(I) = New TreeNode(DR.Item(0) & "(" & DR.Item(1) & ")") I = I + 1 End While nd = New TreeNode("Employees Hierarchy", nds) TreeView1.Nodes.Add(nd) End Sub Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterSelect End Sub Public Sub clw() Me.Hide() End Sub End Class

219

Industrial Man Power Resource Organization Designation Layer Registration

220

Industrial Man Power Resource Organization Source code for Designation Registration

Imports System.Data.OleDb Public Class FrmPosDesigw Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Button8 As System.Windows.Forms.Button Friend WithEvents Button7 As System.Windows.Forms.Button Friend WithEvents Button6 As System.Windows.Forms.Button Friend WithEvents Button5 As System.Windows.Forms.Button Friend WithEvents Button4 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents txtLayer As System.Windows.Forms.TextBox Friend WithEvents txtwei As System.Windows.Forms.TextBox Friend WithEvents cmbdesig As System.Windows.Forms.ComboBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

221

Industrial Man Power Resource Organization


Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(FrmPosDesigw)) Me.cmbdesig = New System.Windows.Forms.ComboBox() Me.Button8 = New System.Windows.Forms.Button() Me.Button7 = New System.Windows.Forms.Button() Me.Button6 = New System.Windows.Forms.Button() Me.Button5 = New System.Windows.Forms.Button() Me.Button4 = New System.Windows.Forms.Button() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.txtLayer = New System.Windows.Forms.TextBox() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.txtwei = New System.Windows.Forms.TextBox() Me.SuspendLayout() ' 'cmbdesig ' Me.cmbdesig.Location = New System.Drawing.Point(344, 120) Me.cmbdesig.Name = "cmbdesig" Me.cmbdesig.Size = New System.Drawing.Size(136, 21) Me.cmbdesig.TabIndex = 69 ' 'Button8 ' Me.Button8.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button8.BackgroundImage = CType(resources.GetObject("Button8.BackgroundImage"), System.Drawing.Bitmap) Me.Button8.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button8.ForeColor = System.Drawing.Color.Maroon Me.Button8.Location = New System.Drawing.Point(424, 288) Me.Button8.Name = "Button8" Me.Button8.Size = New System.Drawing.Size(75, 32) Me.Button8.TabIndex = 67 Me.Button8.Text = "&Last" ' 'Button7 ' Me.Button7.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button7.BackgroundImage = CType(resources.GetObject("Button7.BackgroundImage"), System.Drawing.Bitmap) Me.Button7.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button7.ForeColor = System.Drawing.Color.Maroon Me.Button7.Location = New System.Drawing.Point(352, 288) Me.Button7.Name = "Button7" Me.Button7.Size = New System.Drawing.Size(75, 32) Me.Button7.TabIndex = 66 Me.Button7.Text = "&Next" '

222

Industrial Man Power Resource Organization


'Button6 ' Me.Button6.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button6.BackgroundImage = CType(resources.GetObject("Button6.BackgroundImage"), System.Drawing.Bitmap) Me.Button6.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button6.ForeColor = System.Drawing.Color.Maroon Me.Button6.Location = New System.Drawing.Point(280, 288) Me.Button6.Name = "Button6" Me.Button6.Size = New System.Drawing.Size(75, 32) Me.Button6.TabIndex = 65 Me.Button6.Text = "&Previous" ' 'Button5 ' Me.Button5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button5.BackgroundImage = CType(resources.GetObject("Button5.BackgroundImage"), System.Drawing.Bitmap) Me.Button5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button5.ForeColor = System.Drawing.Color.Maroon Me.Button5.Location = New System.Drawing.Point(208, 288) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(72, 32) Me.Button5.TabIndex = 64 Me.Button5.Text = "&First" ' 'Button4 ' Me.Button4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button4.BackgroundImage = CType(resources.GetObject("Button4.BackgroundImage"), System.Drawing.Bitmap) Me.Button4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button4.ForeColor = System.Drawing.Color.Maroon Me.Button4.Location = New System.Drawing.Point(520, 224) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(75, 32) Me.Button4.TabIndex = 63 Me.Button4.Text = "&Delete" ' 'Button3 ' Me.Button3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button3.BackgroundImage = CType(resources.GetObject("Button3.BackgroundImage"), System.Drawing.Bitmap) Me.Button3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.Maroon

223

Industrial Man Power Resource Organization


Me.Button3.Location = New System.Drawing.Point(520, 192) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(75, 32) Me.Button3.TabIndex = 62 Me.Button3.Text = "&Edit" ' 'Button2 ' Me.Button2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button2.BackgroundImage = CType(resources.GetObject("Button2.BackgroundImage"), System.Drawing.Bitmap) Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.Maroon Me.Button2.Location = New System.Drawing.Point(520, 160) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(75, 32) Me.Button2.TabIndex = 61 Me.Button2.Text = "&Save" ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button1.BackgroundImage = CType(resources.GetObject("Button1.BackgroundImage"), System.Drawing.Bitmap) Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.Maroon Me.Button1.Location = New System.Drawing.Point(520, 128) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(75, 32) Me.Button1.TabIndex = 60 Me.Button1.Text = "&Add" ' 'txtLayer ' Me.txtLayer.BackColor = System.Drawing.Color.White Me.txtLayer.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtLayer.ForeColor = System.Drawing.Color.Maroon Me.txtLayer.Location = New System.Drawing.Point(344, 160) Me.txtLayer.Name = "txtLayer" Me.txtLayer.Size = New System.Drawing.Size(136, 22) Me.txtLayer.TabIndex = 59 Me.txtLayer.Text = "" ' 'Label4 ' Me.Label4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.Maroon

224

Industrial Man Power Resource Organization


Me.Label4.Location = New System.Drawing.Point(208, 208) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(104, 16) Me.Label4.TabIndex = 56 Me.Label4.Text = "Weightage:" ' 'Label3 ' Me.Label3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.Maroon Me.Label3.Location = New System.Drawing.Point(208, 168) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(104, 16) Me.Label3.TabIndex = 55 Me.Label3.Text = "Layer:" ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.Maroon Me.Label2.Location = New System.Drawing.Point(208, 128) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(112, 16) Me.Label2.TabIndex = 54 Me.Label2.Text = "DesignationId:" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label1.Font = New System.Drawing.Font("Book Antiqua", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Maroon Me.Label1.Location = New System.Drawing.Point(192, 40) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(380, 32) Me.Label1.TabIndex = 53 Me.Label1.Text = "Designation Layer Registration" ' 'txtwei ' Me.txtwei.BackColor = System.Drawing.Color.White Me.txtwei.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtwei.ForeColor = System.Drawing.Color.Maroon Me.txtwei.Location = New System.Drawing.Point(344, 200) Me.txtwei.Name = "txtwei" Me.txtwei.Size = New System.Drawing.Size(136, 22) Me.txtwei.TabIndex = 70 Me.txtwei.Text = ""

225

Industrial Man Power Resource Organization


' 'FrmPosDesigw ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.ClientSize = New System.Drawing.Size(768, 400) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.txtwei, Me.cmbdesig, Me.Button8, Me.Button7, Me.Button6, Me.Button5, Me.Button4, Me.Button3, Me.Button2, Me.Button1, Me.txtLayer, Me.Label4, Me.Label3, Me.Label2, Me.Label1}) Me.Name = "FrmPosDesigw" Me.Opacity = 0.5 Me.Text = "FrmPosDesigw" Me.TransparencyKey = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.ResumeLayout(False) End Sub #End Region Dim selcmd As OleDbCommand Dim da As OleDbDataAdapter Dim ds As New DataSet() Dim inscmd As New OleDbCommand() Dim delcmd As New OleDbCommand() Dim dr As OleDbDataReader Dim s As String Dim rno As Integer Dim cn As New connectdatabase() Dim d As OleDbDataReader Dim deptcmd As OleDbCommand Dim recno As String Private Sub FrmPosDesigw_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load c = AddressOf clw cn.connect() selcmd = New OleDbCommand("select * from desiglayer", conn) da = New OleDbDataAdapter() da.SelectCommand = selcmd da.Fill(ds) deptcmd = New OleDbCommand("select DESIGNID from designation", conn) Dim d As New OleDbDataAdapter(deptcmd) d.Fill(ds, "designation") Dim i As Integer For i = 0 To ds.Tables("designation").Rows.Count - 1 cmbdesig.Items.Add(ds.Tables("designation").Rows(i)(0)) Next rno = 0 Call fillfields(rno) End Sub

Sub fillfields(ByVal rnum As Integer) cmbdesig.Text = ds.Tables(0).Rows(rnum)(0) txtLayer.Text = ds.Tables(0).Rows(rnum)(1) txtwei.Text = ds.Tables(0).Rows(rnum)(2)

226

Industrial Man Power Resource Organization


End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim str As String str = "insert into desiglayer values('" & cmbdesig.Text & "'," & txtLayer.Text & "," & txtwei.Text & ")" MsgBox(str) inscmd.Connection = conn inscmd = New OleDbCommand(str, conn) inscmd.ExecuteNonQuery() MsgBox("Successfully Saved") End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim r As Integer r = InputBox("Enter The Layer ToDelete") 'Call efill(r) Dim s As String s = "delete from desiglayer where LAYER=" & r delcmd.Connection = conn delcmd = New OleDbCommand(s, conn) Dim res As Integer res = delcmd.ExecuteNonQuery() If res = 1 Then MsgBox("Record deleted.....") Else MsgBox("sorry") End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click If Button3.Text = "&Edit" Then Button3.Text = "&Update" recno = InputBox("Enter theLayer No to Modify...") Call efill(recno) Else Dim ucmd As OleDbCommand Dim ups As String ups = "update sections set layer='" & txtLayer.Text & "',WEIGHTAGE='" & txtwei.Text & "' where DESIGNATIONID='" & recno & "'" MsgBox(ups) ucmd = New OleDbCommand(ups, conn) ucmd.ExecuteNonQuery() Button3.Text = "&Edit" MsgBox("Successfully Updated") End If End Sub Sub efill(ByVal rnumber As String) s = "select * from desiglayer where designationid ='" & rnumber & "'" Dim cmd As New OleDbCommand(s, conn) dr = cmd.ExecuteReader Dim n As Byte n = dr.Read() If n > 0 Then

227

Industrial Man Power Resource Organization


cmbdesig.Text = dr.Item(0) txtLayer.Text = dr.Item(1) txtwei.Text = dr.Item(2) Else MsgBox("NotFound") End If If Not dr.IsClosed Then dr.Close() End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click rno = 0 Call fillfields(rno) End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If rno < ds.Tables(0).Rows.Count - 1 Then 'ds.Tables("designation").Rows.Count - 1 Then rno += 1 Call fillfields(rno) Else MsgBox("Last Record") End If End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If rno > 0 Then rno -= 1 Call fillfields(rno) Else MsgBox("First Record") End If End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click rno = ds.Tables(0).Rows.Count - 1 Call fillfields(rno) End Sub Public Sub clw() Me.Hide() End Sub End Class

228

Industrial Man Power Resource Organization Designation Weightage Form

229

Industrial Man Power Resource Organization Source code of Designation Weightage

Imports System.Data.OleDb Public Class FrmdeptDesigw Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents txtwei As System.Windows.Forms.TextBox Friend WithEvents cmbdesig As System.Windows.Forms.ComboBox Friend WithEvents Button8 As System.Windows.Forms.Button Friend WithEvents Button7 As System.Windows.Forms.Button Friend WithEvents Button6 As System.Windows.Forms.Button Friend WithEvents Button5 As System.Windows.Forms.Button Friend WithEvents Button4 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents CmbDeptno As System.Windows.Forms.ComboBox

230

Industrial Man Power Resource Organization


<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(FrmdeptDesigw)) Me.txtwei = New System.Windows.Forms.TextBox() Me.cmbdesig = New System.Windows.Forms.ComboBox() Me.Button8 = New System.Windows.Forms.Button() Me.Button7 = New System.Windows.Forms.Button() Me.Button6 = New System.Windows.Forms.Button() Me.Button5 = New System.Windows.Forms.Button() Me.Button4 = New System.Windows.Forms.Button() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.CmbDeptno = New System.Windows.Forms.ComboBox() Me.SuspendLayout() ' 'txtwei ' Me.txtwei.BackColor = System.Drawing.Color.White Me.txtwei.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtwei.ForeColor = System.Drawing.Color.Maroon Me.txtwei.Location = New System.Drawing.Point(296, 197) Me.txtwei.Name = "txtwei" Me.txtwei.Size = New System.Drawing.Size(136, 22) Me.txtwei.TabIndex = 85 Me.txtwei.Text = "" ' 'cmbdesig ' Me.cmbdesig.Location = New System.Drawing.Point(296, 117) Me.cmbdesig.Name = "cmbdesig" Me.cmbdesig.Size = New System.Drawing.Size(136, 21) Me.cmbdesig.TabIndex = 84 ' 'Button8 ' Me.Button8.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button8.BackgroundImage = CType(resources.GetObject("Button8.BackgroundImage"), System.Drawing.Bitmap) Me.Button8.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button8.ForeColor = System.Drawing.Color.Maroon Me.Button8.Location = New System.Drawing.Point(376, 285) Me.Button8.Name = "Button8" Me.Button8.Size = New System.Drawing.Size(75, 32) Me.Button8.TabIndex = 83 Me.Button8.Text = "&Last" ' 'Button7 '

231

Industrial Man Power Resource Organization


Me.Button7.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button7.BackgroundImage = CType(resources.GetObject("Button7.BackgroundImage"), System.Drawing.Bitmap) Me.Button7.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button7.ForeColor = System.Drawing.Color.Maroon Me.Button7.Location = New System.Drawing.Point(304, 285) Me.Button7.Name = "Button7" Me.Button7.Size = New System.Drawing.Size(75, 32) Me.Button7.TabIndex = 82 Me.Button7.Text = "&Next" ' 'Button6 ' Me.Button6.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button6.BackgroundImage = CType(resources.GetObject("Button6.BackgroundImage"), System.Drawing.Bitmap) Me.Button6.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button6.ForeColor = System.Drawing.Color.Maroon Me.Button6.Location = New System.Drawing.Point(232, 285) Me.Button6.Name = "Button6" Me.Button6.Size = New System.Drawing.Size(75, 32) Me.Button6.TabIndex = 81 Me.Button6.Text = "&Previous" ' 'Button5 ' Me.Button5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button5.BackgroundImage = CType(resources.GetObject("Button5.BackgroundImage"), System.Drawing.Bitmap) Me.Button5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button5.ForeColor = System.Drawing.Color.Maroon Me.Button5.Location = New System.Drawing.Point(160, 285) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(72, 32) Me.Button5.TabIndex = 80 Me.Button5.Text = "&First" ' 'Button4 ' Me.Button4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button4.BackgroundImage = CType(resources.GetObject("Button4.BackgroundImage"), System.Drawing.Bitmap) Me.Button4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button4.ForeColor = System.Drawing.Color.Maroon Me.Button4.Location = New System.Drawing.Point(475, 219) Me.Button4.Name = "Button4"

232

Industrial Man Power Resource Organization


Me.Button4.Size = New System.Drawing.Size(75, 32) Me.Button4.TabIndex = 79 Me.Button4.Text = "&Delete" ' 'Button3 ' Me.Button3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button3.BackgroundImage = CType(resources.GetObject("Button3.BackgroundImage"), System.Drawing.Bitmap) Me.Button3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.Maroon Me.Button3.Location = New System.Drawing.Point(475, 187) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(75, 32) Me.Button3.TabIndex = 78 Me.Button3.Text = "&Edit" ' 'Button2 ' Me.Button2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button2.BackgroundImage = CType(resources.GetObject("Button2.BackgroundImage"), System.Drawing.Bitmap) Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.Maroon Me.Button2.Location = New System.Drawing.Point(475, 155) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(75, 32) Me.Button2.TabIndex = 77 Me.Button2.Text = "&Save" ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button1.BackgroundImage = CType(resources.GetObject("Button1.BackgroundImage"), System.Drawing.Bitmap) Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.Maroon Me.Button1.Location = New System.Drawing.Point(475, 123) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(75, 32) Me.Button1.TabIndex = 76 Me.Button1.Text = "&Add" ' 'Label4 ' Me.Label4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte))

233

Industrial Man Power Resource Organization


Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.Maroon Me.Label4.Location = New System.Drawing.Point(163, 203) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(104, 16) Me.Label4.TabIndex = 74 Me.Label4.Text = "Weightage:" ' 'Label3 ' Me.Label3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.Maroon Me.Label3.Location = New System.Drawing.Point(163, 163) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(104, 16) Me.Label3.TabIndex = 73 Me.Label3.Text = "DeptNo:" ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.Maroon Me.Label2.Location = New System.Drawing.Point(163, 123) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(112, 16) Me.Label2.TabIndex = 72 Me.Label2.Text = "DesignationId:" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label1.Font = New System.Drawing.Font("Book Antiqua", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Maroon Me.Label1.Location = New System.Drawing.Point(228, 35) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(380, 32) Me.Label1.TabIndex = 71 Me.Label1.Text = "Designation Weightage" ' 'CmbDeptno ' Me.CmbDeptno.Location = New System.Drawing.Point(296, 160) Me.CmbDeptno.Name = "CmbDeptno" Me.CmbDeptno.Size = New System.Drawing.Size(136, 21) Me.CmbDeptno.TabIndex = 86 '

234

Industrial Man Power Resource Organization


'FrmdeptDesigw ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.ClientSize = New System.Drawing.Size(768, 352) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.CmbDeptno, Me.txtwei, Me.cmbdesig, Me.Button8, Me.Button7, Me.Button6, Me.Button5, Me.Button4, Me.Button3, Me.Button2, Me.Button1, Me.Label4, Me.Label3, Me.Label2, Me.Label1}) Me.Name = "FrmdeptDesigw" Me.Opacity = 0.5 Me.Text = "FrmdeptDesigw" Me.TransparencyKey = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.ResumeLayout(False) End Sub #End Region Dim selcmd As OleDbCommand Dim da As OleDbDataAdapter Dim ds As New DataSet() Dim inscmd As New OleDbCommand() Dim delcmd As New OleDbCommand() Dim dr As OleDbDataReader Dim s As String Dim rno As Integer Dim dno As Integer Dim cn As New connectdatabase() Dim d As OleDbDataReader Dim deptcmd As OleDbCommand Dim desigcmd As OleDbCommand Dim recno As String Private Sub FrmdeptDesigw_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load c = AddressOf clw cn.connect() selcmd = New OleDbCommand("select * from designationweightage", conn) da = New OleDbDataAdapter() da.SelectCommand = selcmd da.Fill(ds) deptcmd = New OleDbCommand("select DESIGNID from designation", conn) Dim d As New OleDbDataAdapter(deptcmd) d.Fill(ds, "designation") Dim i As Integer For i = 0 To ds.Tables("designation").Rows.Count - 1 cmbdesig.Items.Add(ds.Tables("designation").Rows(i)(0)) Next

desigcmd = New OleDbCommand("select Deptno from departments", conn) Dim d1 As New OleDbDataAdapter(desigcmd) d1.Fill(ds, "departments") For i = 0 To ds.Tables("departments").Rows.Count - 1 CmbDeptno.Items.Add(ds.Tables("departments").Rows(i)(0)) Next rno = 0

235

Industrial Man Power Resource Organization


Call fillfields(rno) End Sub

Sub fillfields(ByVal rnum As Integer) cmbdesig.Text = ds.Tables(0).Rows(rnum)(0) CmbDeptno.Text = ds.Tables(0).Rows(rnum)(1) txtwei.Text = ds.Tables(0).Rows(rnum)(2) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim str As String str = "insert into designationweightage values('" & cmbdesig.Text & "'," & CmbDeptno.Text & ",'" & txtwei.Text & "')" MsgBox(str) inscmd.Connection = conn inscmd = New OleDbCommand(str, conn) inscmd.ExecuteNonQuery() MsgBox("successfully saved") End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim r As String r = InputBox("Enter The DesignationId To Delete") 'Call efill(r) Dim s As String s = "delete from designationweightage where DESIGNATIONID='" & cmbdesig.Text & "' and deptno=" & CmbDeptno.Text delcmd.Connection = conn delcmd = New OleDbCommand(s, conn) Dim res As Integer res = delcmd.ExecuteNonQuery() If res = 1 Then MsgBox("Record deleted.....") Else MsgBox("sorry") End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click If Button3.Text = "&Edit" Then Button3.Text = "&Update" recno = InputBox("Enter DesignationId to Modify...") dno = InputBox("Enter Deptno to Modify...") Call efill(recno) Else Dim ucmd As OleDbCommand Dim ups As String ups = "update designationweightage set WEIGHTAGE='" & txtwei.Text & "'where DESIGNATIONID='" & recno & "' and deptno=" & dno MsgBox(ups) Try ucmd = New OleDbCommand(ups, conn) ucmd.ExecuteNonQuery()

236

Industrial Man Power Resource Organization


Button3.Text = "&Edit" MsgBox("successfully deleted") Catch MsgBox("Sorry Give Desino,Deptno Properly.....") ucmd.CommandText = "" End Try End If End Sub Sub efill(ByVal rnumber As String) s = "select * from designationweightage where designationid ='" & rnumber & "'" Dim cmd As New OleDbCommand(s, conn) dr = cmd.ExecuteReader Dim n As Byte n = dr.Read() If n > 0 Then cmbdesig.Text = dr.Item(0) CmbDeptno.Text = dr.Item(1) txtwei.Text = dr.Item(2) Else MsgBox("NotFound") End If If Not dr.IsClosed Then dr.Close() End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click rno = 0 Call fillfields(rno) End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If rno > 0 Then rno -= 1 Call fillfields(rno) Else MsgBox("first record") End If End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If rno < ds.Tables(0).Rows.Count - 1 Then rno += 1 Call fillfields(rno) Else MsgBox("Last Record") End If End Sub

237

Industrial Man Power Resource Organization

Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click rno = ds.Tables("designationweightage").Rows.Count - 1 Call fillfields(rno) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.ClearFields(Me) End Sub Public Sub clw() Me.Hide() End Sub End Class

238

Industrial Man Power Resource Organization Source Module Coding

Imports System.Data.OleDb Module MainMod Public Delegate Sub cl() Public c As cl Public conn As New OleDbConnection Public Class connectdatabase Public Function connect() As OleDbConnection conn.ConnectionString = ("Provider=SQLOLEDB.1;User ID=sa;DATABASE=HOI;Data Source=SERVER")

'If conn.State = 1 Then conn.Close() conn.Open() Return conn MsgBox("connected") End Function Public Sub ClearFields(ByVal frm As Form) Dim cnt As Control For Each cnt In frm.Controls If TypeOf cnt Is TextBox Then cnt.Text = "" End If Next End Sub Public Function getid(ByVal reqfld As String, ByVal sendfld As String, ByVal tblname As String, ByVal supval As String) As String Dim cmd As OleDbCommand Dim s As String s = "select " & reqfld & " from " & tblname & " where " & sendfld & " = '" & Trim(supval) & "'" MsgBox(s) Dim f As OleDbDataReader cmd = New OleDbCommand(s, conn) f = cmd.ExecuteReader f.Read() getid = f.Item(0) f.Close() End Function

239

Industrial Man Power Resource Organization

Public Function allownum(ByVal num As Integer) As String Dim b As Boolean If Asc(num) < 47 Or Asc(num) > 57 Then MsgBox("sorry") b = False Return b Else b = True Return b End If End Function End Class

End Module

240

Industrial Man Power Resource Organization

User Registration Detail Form

241

Industrial Man Power Resource Organization

User Registration Code


Imports System.Data.OleDb Public Class FrmUserCreation Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents CmbACC As System.Windows.Forms.ComboBox Friend WithEvents Button8 As System.Windows.Forms.Button Friend WithEvents Button7 As System.Windows.Forms.Button Friend WithEvents Button6 As System.Windows.Forms.Button Friend WithEvents Button5 As System.Windows.Forms.Button Friend WithEvents Button4 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents txtpwd As System.Windows.Forms.TextBox Friend WithEvents Txtuname As System.Windows.Forms.TextBox Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label

242

Industrial Man Power Resource Organization


Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents cmbempno As System.Windows.Forms.ComboBox Friend WithEvents cmdExit As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(FrmUserCreation)) Me.CmbACC = New System.Windows.Forms.ComboBox() Me.Button8 = New System.Windows.Forms.Button() Me.Button7 = New System.Windows.Forms.Button() Me.Button6 = New System.Windows.Forms.Button() Me.Button5 = New System.Windows.Forms.Button() Me.Button4 = New System.Windows.Forms.Button() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.txtpwd = New System.Windows.Forms.TextBox() Me.Txtuname = New System.Windows.Forms.TextBox() Me.Label5 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.cmbempno = New System.Windows.Forms.ComboBox() Me.cmdExit = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'CmbACC ' Me.CmbACC.Items.AddRange(New Object() {"A", "U"}) Me.CmbACC.Location = New System.Drawing.Point(328, 256) Me.CmbACC.Name = "CmbACC" Me.CmbACC.Size = New System.Drawing.Size(136, 21) Me.CmbACC.TabIndex = 51 ' 'Button8 ' Me.Button8.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button8.BackgroundImage = CType(resources.GetObject("Button8.BackgroundImage"), System.Drawing.Bitmap) Me.Button8.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button8.ForeColor = System.Drawing.Color.Maroon Me.Button8.Location = New System.Drawing.Point(440, 320) Me.Button8.Name = "Button8" Me.Button8.Size = New System.Drawing.Size(75, 32) Me.Button8.TabIndex = 50 Me.Button8.Text = "&Last" ' 'Button7 ' Me.Button7.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button7.BackgroundImage = CType(resources.GetObject("Button7.BackgroundImage"), System.Drawing.Bitmap)

243

Industrial Man Power Resource Organization


Me.Button7.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button7.ForeColor = System.Drawing.Color.Maroon Me.Button7.Location = New System.Drawing.Point(368, 320) Me.Button7.Name = "Button7" Me.Button7.Size = New System.Drawing.Size(75, 32) Me.Button7.TabIndex = 49 Me.Button7.Text = "&Next" ' 'Button6 ' Me.Button6.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button6.BackgroundImage = CType(resources.GetObject("Button6.BackgroundImage"), System.Drawing.Bitmap) Me.Button6.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button6.ForeColor = System.Drawing.Color.Maroon Me.Button6.Location = New System.Drawing.Point(296, 320) Me.Button6.Name = "Button6" Me.Button6.Size = New System.Drawing.Size(75, 32) Me.Button6.TabIndex = 48 Me.Button6.Text = "&Previous" ' 'Button5 ' Me.Button5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button5.BackgroundImage = CType(resources.GetObject("Button5.BackgroundImage"), System.Drawing.Bitmap) Me.Button5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button5.ForeColor = System.Drawing.Color.Maroon Me.Button5.Location = New System.Drawing.Point(224, 320) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(72, 32) Me.Button5.TabIndex = 47 Me.Button5.Text = "&First" ' 'Button4 ' Me.Button4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button4.BackgroundImage = CType(resources.GetObject("Button4.BackgroundImage"), System.Drawing.Bitmap) Me.Button4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button4.ForeColor = System.Drawing.Color.Maroon Me.Button4.Location = New System.Drawing.Point(504, 240) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(75, 32) Me.Button4.TabIndex = 46 Me.Button4.Text = "&Delete" '

244

Industrial Man Power Resource Organization


'Button3 ' Me.Button3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button3.BackgroundImage = CType(resources.GetObject("Button3.BackgroundImage"), System.Drawing.Bitmap) Me.Button3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.Maroon Me.Button3.Location = New System.Drawing.Point(504, 208) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(75, 32) Me.Button3.TabIndex = 45 Me.Button3.Text = "&Edit" ' 'Button2 ' Me.Button2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button2.BackgroundImage = CType(resources.GetObject("Button2.BackgroundImage"), System.Drawing.Bitmap) Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.Maroon Me.Button2.Location = New System.Drawing.Point(504, 176) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(75, 32) Me.Button2.TabIndex = 44 Me.Button2.Text = "&Save" ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Button1.BackgroundImage = CType(resources.GetObject("Button1.BackgroundImage"), System.Drawing.Bitmap) Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.Maroon Me.Button1.Location = New System.Drawing.Point(504, 144) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(75, 32) Me.Button1.TabIndex = 43 Me.Button1.Text = "&Add" ' 'txtpwd ' Me.txtpwd.BackColor = System.Drawing.Color.White Me.txtpwd.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtpwd.ForeColor = System.Drawing.Color.Maroon Me.txtpwd.Location = New System.Drawing.Point(328, 176) Me.txtpwd.Name = "txtpwd" Me.txtpwd.Size = New System.Drawing.Size(136, 22) Me.txtpwd.TabIndex = 41

245

Industrial Man Power Resource Organization


Me.txtpwd.Text = "" ' 'Txtuname ' Me.Txtuname.BackColor = System.Drawing.Color.White Me.Txtuname.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Txtuname.ForeColor = System.Drawing.Color.Maroon Me.Txtuname.Location = New System.Drawing.Point(328, 144) Me.Txtuname.Name = "Txtuname" Me.Txtuname.Size = New System.Drawing.Size(136, 22) Me.Txtuname.TabIndex = 40 Me.Txtuname.Text = "" ' 'Label5 ' Me.Label5.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.ForeColor = System.Drawing.Color.Maroon Me.Label5.Location = New System.Drawing.Point(192, 264) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(113, 16) Me.Label5.TabIndex = 39 Me.Label5.Text = "Acc-Level :" ' 'Label4 ' Me.Label4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.Maroon Me.Label4.Location = New System.Drawing.Point(192, 224) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(104, 16) Me.Label4.TabIndex = 38 Me.Label4.Text = "EmployeeId:" ' 'Label3 ' Me.Label3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.Maroon Me.Label3.Location = New System.Drawing.Point(192, 184) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(104, 16) Me.Label3.TabIndex = 37 Me.Label3.Text = "Password :" ' 'Label2 '

246

Industrial Man Power Resource Organization


Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.Maroon Me.Label2.Location = New System.Drawing.Point(192, 144) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(112, 16) Me.Label2.TabIndex = 36 Me.Label2.Text = "UserId:" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.Label1.Font = New System.Drawing.Font("Book Antiqua", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Maroon Me.Label1.Location = New System.Drawing.Point(256, 48) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(257, 32) Me.Label1.TabIndex = 35 Me.Label1.Text = "User Registration" ' 'cmbempno ' Me.cmbempno.Location = New System.Drawing.Point(328, 216) Me.cmbempno.Name = "cmbempno" Me.cmbempno.Size = New System.Drawing.Size(136, 21) Me.cmbempno.TabIndex = 52 ' 'cmdExit ' Me.cmdExit.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(255, Byte)) Me.cmdExit.Location = New System.Drawing.Point(504, 272) Me.cmdExit.Name = "cmdExit" Me.cmdExit.Size = New System.Drawing.Size(75, 32) Me.cmdExit.TabIndex = 53 Me.cmdExit.Text = "Exit" ' 'FrmUserCreation ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.ClientSize = New System.Drawing.Size(768, 408) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.cmdExit, Me.cmbempno, Me.CmbACC, Me.Button8, Me.Button7, Me.Button6, Me.Button5, Me.Button4, Me.Button3, Me.Button2, Me.Button1, Me.txtpwd, Me.Txtuname, Me.Label5, Me.Label4, Me.Label3, Me.Label2, Me.Label1}) Me.Name = "FrmUserCreation" Me.Opacity = 0.5 Me.Text = "FrmUserCreation" Me.TransparencyKey = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte)) Me.WindowState = System.Windows.Forms.FormWindowState.Maximized

247

Industrial Man Power Resource Organization


Me.ResumeLayout(False) End Sub #End Region Dim selcmd As OleDbCommand Dim da As OleDbDataAdapter Dim ds As New DataSet() Dim inscmd As New OleDbCommand() Dim delcmd As New OleDbCommand() Dim dr As OleDbDataReader Dim s As String Dim rno As Integer Dim cn As New connectdatabase() Dim d As OleDbDataReader Dim deptcmd As OleDbCommand Private Sub FrmUserCreation_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load c = AddressOf clw cn.connect() selcmd = New OleDbCommand("select * from login", conn) da = New OleDbDataAdapter() da.SelectCommand = selcmd da.Fill(ds, "LOGIN") deptcmd = New OleDbCommand("select empid from employees", conn) Dim d As New OleDbDataAdapter(deptcmd) d.Fill(ds, "employees") Dim i As Integer For i = 0 To ds.Tables("employees").Rows.Count - 1 cmbempno.Items.Add(ds.Tables("employees").Rows(i)(0)) Next rno = 0 Call fillfields(rno) CmbACC.SelectedIndex = 1 End Sub Sub fillfields(ByVal rnum As Integer) Txtuname.Text = ds.Tables("LOGIN").Rows(rnum)(0) txtpwd.Text = ds.Tables("LOGIN").Rows(rnum)(1) cmbempno.Text = ds.Tables("employees").Rows(rnum)(0) CmbACC.Text = ds.Tables("LOGIN").Rows(rnum)(2) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim str As String str = "insert into login values('" & Txtuname.Text & "','" & txtpwd.Text & "','" & CmbACC.Text & "')" ','" & cmbempno.Text & "')" MsgBox(str) inscmd.Connection = conn inscmd = New OleDbCommand(str, conn) inscmd.ExecuteNonQuery() MsgBox("Successfully Saved") End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim r As String r = InputBox("Enter The user name ToDelete")

248

Industrial Man Power Resource Organization


'Call efill(r) Dim s As String s = "delete from login where username='" & r & "'" delcmd.Connection = conn delcmd = New OleDbCommand(s, conn) Dim res As Integer res = delcmd.ExecuteNonQuery() If res = 1 Then MsgBox("Record deleted.....") Else MsgBox("sorry") End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click If Button3.Text = "&Edit" Then Button3.Text = "&Update" Dim recno As String recno = InputBox("Enter the username to Modify...") Call efill(recno) Else Dim ucmd As OleDbCommand Dim ups As String ups = "update sections set password='" & txtpwd.Text & "',empid='" & cmbempno.Text & "'acclvl='" & CmbACC.Text & "' where username='" & Txtuname.Text & "'" MsgBox(ups) ucmd = New OleDbCommand(ups, conn) ucmd.ExecuteNonQuery() Button3.Text = "&Edit" MsgBox("Successfully Update") End If End Sub Sub efill(ByVal rnumber As String) s = "select * from login where username ='" & rnumber & "'" Dim cmd As New OleDbCommand(s, conn) dr = cmd.ExecuteReader Dim n As Byte n = dr.Read() If n > 0 Then Txtuname.Text = dr.Item(0) txtpwd.Text = dr.Item(1) cmbempno.Text = dr.Item(2) CmbACC.Text = dr.Item(3) Else MsgBox("NotFound") End If If Not dr.IsClosed Then dr.Close() End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click rno = ds.Tables(0).Rows.Count - 1 Call fillfields(rno) End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If rno < ds.Tables(0).Rows.Count - 1 Then rno += 1

249

Industrial Man Power Resource Organization


Call fillfields(rno) Else MsgBox("Last Record") End If End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If rno > 0 Then rno -= 1 Call fillfields(rno) Else MsgBox("First record") End If End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click rno = 0 Call fillfields(rno) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.ClearFields(Me) End Sub Private Sub cmdExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExit.Click Me.Hide() End Sub Public Sub clw() Me.Hide() End Sub End Class

250

Industrial Man Power Resource Organization

Shows users login Details

251

Industrial Man Power Resource Organization

Department Report of current Employee

252

Industrial Man Power Resource Organization

Report from different Department Section

253

Industrial Man Power Resource Organization

Output Screen of Report

254

Industrial Man Power Resource Organization

Output Screen of Report Application

255

Industrial Man Power Resource Organization

Output Screen Of Branche Report

256

Industrial Man Power Resource Organization

Output fof filled Vacancies

257

Industrial Man Power Resource Organization

Employee Information Details

258

Industrial Man Power Resource Organization


Report of Department Details output

259

Industrial Man Power Resource Organization

Testing & Result

260

Industrial Man Power Resource Organization

Testing
Testing is the phase where the errors remaining from all the previous phase must be detected. Hence, testing is very critical role for quality assurance and for ensuring the reliability of software.Testing of designed software consists of providing the software with a set of test outputs and observing if the software behaves as expected. If thesoftware fails to behave as expected, then the conditions under which failure occurs when needed for debugging and correction. Presence of an error implies that a failure must have occurred, and the observation of a failure applies that a fault does not imply a failure must occur. We have tested our project in many ways for e.g., by storing information of employees branches and their departments etc., into the database and checking the information by retrieving thefrom the database..following test practiced were used
Unit Testing Each form was intensively tested to check for error and defects. the mistakes were rectified Integration Testing Each form was intensively combined to check for error and defects.the mistakes were rectified System testing- the whole system was tested to check for more errors and defects .the mistake were rectified.

261

Industrial Man Power Resource Organization

Objectives of Testing
Testing is aprocess of executing a program with the intent of finding an error. A good test cause is one that has a probability of finding an undiscovered error A Sucessful test is one that uncovers errors A Good test should be neither too simple nor too complex

Principles of Testing
All tests should be traceable to consumer requirements. Test should be planned long before testing begins. Testing should begin in small and progress toward testing in large. Exhaustive testing is not possible. To be most effective, an independent third party should conduct testing.
I

262

Industrial Man Power Resource Organization

Unit Testing
Unit testing focuses verification effort on smallest unit of software design. This is white box testing oriented in the INDUSTRIAL MANPOWER RESOURCE ORGANIZER project each and every module is tested in the following ways This module interfaces are tested to ensure the information properly flows into and putthe program unit under test. The local data structure is examined to ensure data storedemporarily maintains its integrity during all steps in an algorithm execution. Boundary conditions are tested to ensure that the module operations properly at boundaries establish to limit or restrict processing. All independent paths through The control structure are exercised to ensure that all statements in a

module have been executed at least once.Error handling paths tested.

263

Industrial Man Power Resource Organization

Integration Testing

Integration testing is a systematic technique for construction the program structure whileat the some time conducting tests to uncover errors associated with interfacing The objective isto take unit tested modules and build a program structure that has been dictated by design. Allthe modules are combined in advance. The entire program tested as a whole. Present developed software is tested using bottom integration begins construction andtesting with atomic modules. Lowlevel modules are combined into clusters and driver was written to coordinate test case input output. The cluster is tested. The drivers are removed and clusters are combined and moving upward in the program structure. TopDownIntegration testing is an incremental approach to construction of the softwarearchitecture. Modules are integrated by moving downward through the control hierarchy,beginning with the main control module. Modules subordinate to the main control BreadthFirstmanner module areincorporated into the structure in either a depthFirstor

264

Industrial Man Power Resource Organization

System Testing
System testing is actually a series of different test whose primary purpose is to fullyexercise the computerbasedsystem. Steps taken during software design and the larger system Security testing verifies that protection mechanisms built into a system will, ifact, protect it from improper penetration. To quote Beizer: The systems security must, of course,be tested for invulnerability from frontal attackbutmust also be tested for invulnerability from flank or rear attack testing can greatly improve the probability of successful software integration in

Stress testing executes a system in a manner that demands resources in abnormal quantity, frequency, or volume

Performance tests are often coupled stress testing and usually require both hardware andsoftware instrumentation. That is, it is often necessary to measureresourceutilization in anexacting fashion. Externally instrumentation can monitorexecution intervals, log events has theyoccur, and sample machine states on a regular basis

Validating Testing
Software validation is achieved through a series of blackbox tests that demonstrate conformity with requirements. A test plan outlines the classes of tests to be conducted, and a test procedure defines specific with requirements In this validation testing we check each object for its validity like whether it is valid withthe value entered or not. test cases that will be used in an attempt to uncover errors in conformity

265

Industrial Man Power Resource Organization

Testing Process

Design System Test

Organise Project

Design /Bulid Test Process

Execute System Test

Execute Acceptanc Test

Sign Off And Pilot

Bulid Test enviroment

266

Industrial Man Power Resource Organization

Test Case

Login form
Test Case ID
Test_001

Test case Description


Enter

Test case steps and Test Input


Enter

Expected Output
Allows the

Actual Output
Admin is able to login into Website

Test Result

Username & type of user

password and

Respective

username and password and Enter admin as user Respective

admin to login into website

PASS

Test _002

Enter

Username & type of user

Allows the login into website

password and

username and password and user Application as Enter

application to

Application is able to login into Website

PASS

Test_003

Enter

Username & type of user

password and

Respective

Allows the login into website

username and password and Employee as user Enter

employee to

Employee is

able to login into website

PASS

Test_004

Enter

Username & type of user

password and

Respective wrong

Allows the

username and password and type of user

user to login into website

User is not able FAIL to login into website

267

Industrial Man Power Resource Organization

Registration

Form

Test Case ID Test_001

Test Case Enter

Description username & password

Test Case Steps and Test Input Enter username and 8 digit

Expected Output Allows user to update his details in form

Actual

Output User is successfully registred in form the mention Not a valid input

Test Result PASS

upto 6 aplhabets password (any combination) Enters

registration User is not allowed to register User is

Test_002

Enter

username and aplhanumeric

password with Username and password Enters Test_003 User enter details (mandatory ) Test_004 Enter phone number in mail place of E-

alphanumeric

FAIL

username,password registar Section department Email phone Enter wrong

User has updated User faild

successfully

PASS

information in email address

Please enter address

proper email registration

FAIL

268

Industrial Man Power Resource Organization Employee Enumeration

Test Case ID Test _001

Test Case Enter

Description Employee

Test Case Steps Expected and Test Input the Enter Employee Ouput the Information

Actual Output Data

Test Result

Information

information in System respective textboxes like Name ,Address etc

Should add to

into database add link

inserted PASS

After clicking

Test_002

Employee ID Auto Generation

Click on Add Number new Employee should link Assign generate

Auto Auto Generate Application be interview the status gets

Number

Gets PASS

Test_003

View

Shortlised details

candidates

interview date applicant and time for should candidates about the shortlisted informed

Shortlisted

their

FAIL

interview schedule

269

Industrial Man Power Resource Organization

Job Rotation

Test Case ID Test _001

Test Case

Description

Test Case Steps Expected and Test Input Ouput

Actual Output

Test Result

Enter present Enter emp ID Designation ,Deputed status EmpID And Remark Designation mandatory

Employee job Job as other to ID

rotation PASS

been done of Emp

to status and other rotated information department

Test_002

Enter another Enter designation to

designation,Emp rotating job

data in Error

the unsucessfully

in Job

rotation FAIL

and deputed id,Deputed to remark and Status

270

Industrial Man Power Resource Organization

Department Registration form


Test case ID Test Description Enter Case Test Steps and Test Output Input Enter Dept case Expected Actual Output of Department as Test Result

Test_001

Dept_no

,Dept _name number,enter Dept_Head Location name

Dept_no

in particular in registred Dept section

gets registrted in in the database

been

PASS

char,Head in the char,Location in char.

IMPRO

database Department FAIL

Test_002

Enter

incorrect

Enter char in Process Dept_no ,enter number Enter cannot

information of Dept_no Location Dept_Head Dept_Name Test_003 Without

Dept Head

in output

procees since registred doesnot

be as not been the database

in

alphanumeric data type in location Keep

matches

the

entering any blank click data in the fields & click on Add , Save

fields Blank Fields

Blank Feilds

FAIL

Test_004

Recall

previous

the Press

registred by

previous tab record

on Previous

department

and recall the deleted from last registred the database and

is sucessfully

Record details PASS

tab and then delete it press delete

previous data

271

Industrial Man Power Resource Organization

User Registration

Test case ID Test_001

Test

Description Enter User_ID,

Case Test case Steps and Expected Test Input user Output Enter number in User

Actual

Output in Name is

Test Result PASS

Password,

Employee ID, Acc-Level Test_002 Enter incorrect

password,Employee the database Register ID,,Acc-Level of IMPRO

ID, registar

gets Employee

Enter invalid data User is not Enter in the fields (such register as data Alphanumeric since invalid input and data feilds

valid FAILL in

information

Test_004

Delete

Exisitng User

Click on previous User tab

registered

delete tab to delete from the data

press been deleted Name got database of IMPRO deleted

has User

with PASS

272

Industrial Man Power Resource Organization

Section Registration Form

Test Case ID

Test

Description

case Test

Steps

case Expected and Output

Actual

Test Input numbers

Output Section

Test Results

Test_001

Enter section_id Enter ,Section_Name, Dept_No

Section_Incharge Section_id, name

in Sub-Section as

Department

Dept_no,and Section

in database IMPRO

register in the sucesfully of register

been been

Name

as

PASS

incharge. Test_002 Enter section_id Enter ,Section_Name, And

Section_Incharge Section_id, Dept_No and name

Incorrect in section

Dept_no and Section incharge failed

registration

FAIL

incorrect Dept_no,and Section

section_Incharge Test_003

in each other

donot match

incharge previous tab section edit button press been Register as been register Section as PASS

Edit the register Press Section information pressing Edit by and

previous tab and

by editing

altered sucesfully

273

Industrial Man Power Resource Organization

Department Dependency

Test Case ID Test_001

Test

Description up_Dept

case Test case Steps Expected and Test Input Output

Actual Output

Test Results PASS

Enter Dept_no Enter number Dependency as Dependency lower_Dept in Dept field been created in created and then char IMPRO Dept enter Add in up & lower database sucesfully

Test_002

Enter

dept_no upper

coreect Enter incorrect Dependecy and Information

enter incorrect and click on Department lower Dept Test_003 Enter Upper Lower and and Add button

not Created in Dependency failed

is Department

FAIL

correct Enter Dept lowe and

and information in not created in Dependency Dept and Department Fialed

correct Dependency is Department

FAIL

incorrect Dept_id Test_004 Delete

enter upper

in Dept _id the Click previous

incorrect on Previous Department PASS

previous

Added data

and then click deleted on delete

tab dependency is Dependency the table from delted sucesfully

274

Industrial Man Power Resource Organization

Vaccancy Filling Information

Test Case ID

Test case Description

Test

Steps

case Expected and Output

Actual

Test Input Test_001 Enter Enter

Output Vacancy updated

Test Results

vacancy_id,employee_id number and information Fill date ,intake details intake details updated as character incorrect drop sucessfully Vacancy information

Vacanciy

PASS

Test_002

Enter incorrect data in Enter vacancy_id

Updation failed

FAIL

,employee_id fill date numbers and not updated ,intake details Test_003 Enter section fields Enter down

except

correct intake

choose incorrect details choose from intake details failed from the choosen Test_004 drop box down donot match on Previous

details number and failed

Updation

since updation

Vacancy

FAIL

Delete the last entry Click filling information. and

made in the vaccnacy previous tab updation press

button

delete successfully

then been deleted sucessfully

as updated

Vacancy

PASS

275

Industrial Man Power Resource Organization

Designation Layer Registration

Test Case ID Test_001

Test

Description Enter

case Test case Steps Expected and Test Input Enter layer id Output

Actual Output

Test Results PASS

Designation_ID, number Layer, Weightage.

hierarchy selected

from registered

and particular Id is Registered the hierarchy

in Designation of Designation in successfully

Weightage Enter

as Of IMPRO

Test_002

Enter

Designation_ID, Designation_ID, Registration Layer incorrect and Layer incorrect and failed improper

Designation

Designaiton Registration Failed

FAIL

weightage Test_003 Dept_no

weightage

weightage enter Designation Failed FAIL

Enter Incorrect Enter data in Please weightage and choose correct Layer from

& the fields and valid layer in Registration drop data the field

down arrrow

Test_004

Delete

previous

the Press

Resgistered

Tab and then form click on delete

previous Data

deleted Designation the Deleted Sucessfully

PASS

designation

IMPRO

database

276

Industrial Man Power Resource Organization

System Testing

Test Case ID Test_001

Operating system Windows 2000 Windows Xp

Hardware RAM-512 MB HDD-80 GB Processor800MHz NIC

Actual Output IMPRO

Test Results

Somothly without

runs PASS any

interruption IMPRO

Test_002

Windows Server Ram 1GB 2003 Windows 7

HDD-160 GB Processor 1.2GHZ NIC

smoothly faster

server and more windows 7 IMPRO Run

with

runs PASS

in

Test_003

Windows 8 server

Windows 2008 HDD-250 GB I7 processor NIC

Ram 2GB

on windows 8 & windows 2008 Server Issue Compatablity

smoothly

donot FAIL

Test_004

Linux and Mac Ram 2GB os

HDD-250 GB I7 processor NIC

FAIL

277

Industrial Man Power Resource Organization

Security Implementation

278

Industrial Man Power Resource Organization

Implementation of Security

Numner Users User_1 User_2

of Type Of user Administrator (Admin) H-R Manager

Rights Assign Full ownership Add Add/update /Add vacancy

Security Level Full Access

employee, Partial Access

Department,Assign Designation Deparment HOD User_3 Employee for

/change

,Assign

Manage profile /apply Very Limited Access register/Request vacancy /Get for

resource from Admin User_4 HOD (Head Of Department) Assign /Change

Employee Partial Access Section

/change Department of Employee/Recuritment management

279

Industrial Man Power Resource Organization

System-Implementation

280

Industrial Man Power Resource Organization

By implementation the transformation of the design into a database


system, this operates on a particular machine. An application is complete only on the successful installation of the same. The successful installation of the application requires the hardware and software as specified in the requirements analysis phase. After implementing some traditional methods, it checks for problems in them and implements the same using modern methods. But the proposed system is not implemented in a stretch.During the implementation stage, the system is physically created. Necessary program are coded, debugged and documented. The test plan is implementation. Factors to be contrast while Implementing are
1. Obtaining and installing the system hardware. 2. Installing the system and making it run on its intended hardware. 3. Providing use access to the system. 4. Training the users on the new system. 5. Documentation the system for its users and for those who will be responding for maintaining it in future. 6. Transferring on going responsibility for its system from its developers to the operationsor maintenance part. 7. Evaluating the operation and use of the system.

281

Industrial Man Power Resource Organization

Software requirement

Front end - vb.net Back end - SQL server 2005 Tools - Microsoft visual studio 2008 O.S xp/windows 98 /windows 7 IE 6.0+ / Firefox 3.5+ /chrome. Enabled intranet administration with other facility

Hardware requirement Processor Intel Pentium 4 or above Minimum 512 MB Of RAM At least 16 GB Hard disk space Cache 512 KB NIC (network interface card ) Video CRT 1024 x786 Bit Code Mode

282

Industrial Man Power Resource Organization

Limitation and future Scope Of Project

283

Industrial Man Power Resource Organization

Limitations Every software cannot be self centertred for any such its
case Industrial Manpower Resource Organzition (IMPRO) as some of its limitation which are mention as follows Prepared according to customers requirement so in these

employees cannot be automate according to customer Requirment we have to add that module.

IMPRO donot have Payroll Syetem by which salary of

provide any module for employee to work from remote place

Though the IMPRO is an online (intranet) project donot

Future Work According to market demand and company requirement


Industrial Manpower Resource Oraganization software can add extra modules which are as follows.

Organization Organization

with jobfinder websites so to fill up the vacancy Employee to work from Remote location

can link there recuirtment site directly can add Remote Login module for

To add payroll module Approval Letter can be


canditates

posted through mail to the

Organization can Add NBS (Newz Broadcast Stream)

For borodcasting Netowork newz in the organization

284

Industrial Man Power Resource Organization

Conclusion

285

Industrial Man Power Resource Organization

No user No Software
Every project work, doesnt matter software project or any other project, could not be result of sole effort; even though developer team consists one member. I think success of any project doesnt depend only on better software development skills but also ,zeal to listen and help the users .only user interaction at development at development phase can give you an idea to fulfill their requirement .Because software is of developer up to the development or installation phase ,but then after it is of users. I experienced that do make the software for users not for frame of being better programmer of software developer. Ultimately users appraise your efforts not you peer.

Self-analysis of project viabilities


We ensure the automated project solution is working satisfactorily as it is quite user friendly .The interface has been designed such that the user is just not aware of the complexity handled inside. A non-computer professional person can also use the system very well. In human resource management system, we also take that if any error comes to an application that is shown to user directly... Problem encountered and possible solutions To get the knowledge of technology to develop the system , deep knowledge of VB.NET ,Microsoft visual Studio 2008 My SQL Server 2005 Requirement understanding collected requirement were understandable and clear. If any doubts are comes that team member resolved after discussing it with our team leader and other

286

Industrial Man Power Resource Organization Summary of project work


At this point in time when our project has been completed ,it is our pleasure to summarize the project work done during the entire Semester

Initially the time was spent merely on getting familiar to the organizations work structure .this didnt took long as it was quite friendly and healthy environment

Our first phase was preliminary investigation in which we collected all the phase we made our minds clear about what we were going to develop Second phase was the Analysis phase in which we collected all the

information related to our project with help of requirement document. In this

requirement from our company .we also studied nonfunctional requirement and domain requirement that were not told by the company .we analyzed the requirement and made UML diagrams for our system

After that design came into place where we have fixed our database and decided the different modules that would work for our system

After completing analysis and design we started coding for application .we used Microsoft visual studio 2008 as a development tool with VB.NET and SQL server 2005 as a database management system.

After completing the coding phase we started testing our applications. Many of the interface.

Defects were found that were fixed through changes in coding or even design

287

Industrial Man Power Resource Organization

Bibliography
Beginning VB.NET -Chris hart , john Clifton Andrew Tyrolese Microsoft Visual Studio 2008 & .Net 3.5 platform SQL complete Reference James .R .Gruff software Engineering -Prof .B.W khalkar

System Analysis ,Design and introduction to -Prof .S. Parthasarathy

Website used www.google.com www.wikiepedia.com www.querysnather.com www.visualstudioM.com www.VBNET.com

288

Industrial Man Power Resource Organization

289

You might also like