It is common these days to see every company maintain record of every visitor and to keep the information online, in other words who visits the company, what was his/her purpose to visit, whom he/she wants to meet and so on.

Now I am explaining my project.

Here I developed this project using Visual Studio 2012 and SQL Server 2008 R2.

The following are the table details used in this project.

Employee

Employee
Image 1.

The following is the script of my table :

  1. CREATETABLE [dbo].[Employee](
  2. [EMP_ID] [int] IDENTITY(1,1)NOTNULL,
  3. [Email] [varchar](500)NULL,
  4. [Password] [varchar](50)NULL,
  5. [Name] [varchar](50)NULL,
  6. [User_Type] [varchar](10)NULL,
  7. [Created_Date] [datetime] NULL,
  8. CONSTRAINT [PK_Employee] PRIMARYKEYCLUSTERED
  9. (
  10. [EMP_ID] ASC
  11. )WITH (PAD_INDEX=OFF,STATISTICS_NORECOMPUTE=OFF,IGNORE_DUP_KEY=OFF,ALLOW_ROW_LOCKS=ON,ALLOW_PAGE_LOCKS=ON)ON [PRIMARY]
  12. )ON [PRIMARY]
  13. GO
  14. SETANSI_PADDINGOFF
  15. GO
  16. ALTERTABLE [dbo].[Employee] ADDCONSTRAINT [DF_Employee_Created_Date] DEFAULT (getdate())FOR [Created_Date]
  17. GO

Visitors:

Visitors
Image 2.

The following is the script of my table:

  1. CREATETABLE [dbo].[Visitor](
  2. [Visitor_ID] [int] IDENTITY(1,1)NOTNULL,
  3. [Emp_ID] [int] NULL,
  4. [Name] [varchar](500)NULL,
  5. [Mobile] [varchar](50)NULL,
  6. [Organization] [varchar](500)NULL,
  7. [City] [varchar](50)NULL,
  8. [Address] [varchar](2000)NULL,
  9. [Visit_Department] [varchar](500)NULL,
  10. [VisitPurpose] [varchar](5000)NULL,
  11. [Visit_Date] [date] NULL,
  12. [In_Time] [varchar](50)NULL,
  13. [Out_Time] [varchar](50)NULL,
  14. CONSTRAINT [PK_Visitor] PRIMARYKEYCLUSTERED
  15. (
  16. [Visitor_ID] ASC
  17. )WITH (PAD_INDEX=OFF,STATISTICS_NORECOMPUTE=OFF,IGNORE_DUP_KEY=OFF,ALLOW_ROW_LOCKS=ON,ALLOW_PAGE_LOCKS=ON)ON [PRIMARY]
  18. )ON [PRIMARY]
  19. GO
  20. SETANSI_PADDINGOFF
  21. GO
  22. ALTERTABLE [dbo].[Visitor] ADDCONSTRAINT [DF_Visitor_Visit_Date] DEFAULT (getdate())FOR [Visit_Date]
  23. GO

Now in the following figure I am trying to explain how my project works:

project working
Image 3.

Now run the application:

Here I have 2 types of users, one is Admin and the second one is User:

Admin
Image 4.

User
Image 5.

Now click on the "Add New Visitor" link:

Add New Visitor
Image 6.

New Visitor
Image 7.

From here an employee can search for any visitor and can manually log him out.

search
Image 8.

log out
Image 9.

make log out
Image 10.

Now login as ADMIN:

Login As ADMIN
Image 11.

ADMIN page
Image 12.

Now click the "Manage Employee" link:

Manage Employee
Image 13.

click here Manage Employee
Image 14.

Now again click on the ADMIN link and click on the "Manage Visitors" link.

click on ADMIN link
Image 15.

click on Manage Visitors
Image 16.

An Admin can search visitors and can delete any visitor from here.

delete any visitor
Image 17.

Now again click on the ADMIN link, then click on "View visitors By Employee".

View visitors
Image 18.

View visitors By Employee
Image 19.

Select Employee and click on the Search visitor button:

Search visitor Button
Image 20.

Select Employee
Image 21.

Enjoy my project. Happy Coding!