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 :
- CREATETABLE [dbo].[Employee](
- [EMP_ID] [int] IDENTITY(1,1)NOTNULL,
- [Email] [varchar](500)NULL,
- [Password] [varchar](50)NULL,
- [Name] [varchar](50)NULL,
- [User_Type] [varchar](10)NULL,
- [Created_Date] [datetime] NULL,
- CONSTRAINT [PK_Employee] PRIMARYKEYCLUSTERED
- (
- [EMP_ID] ASC
- )WITH (PAD_INDEX=OFF,STATISTICS_NORECOMPUTE=OFF,IGNORE_DUP_KEY=OFF,ALLOW_ROW_LOCKS=ON,ALLOW_PAGE_LOCKS=ON)ON [PRIMARY]
- )ON [PRIMARY]
-
- GO
-
- SETANSI_PADDINGOFF
- GO
-
- ALTERTABLE [dbo].[Employee] ADDCONSTRAINT [DF_Employee_Created_Date] DEFAULT (getdate())FOR [Created_Date]
- GO
Visitors:
![Visitors]()
Image 2.
The following is the script of my table:
- CREATETABLE [dbo].[Visitor](
- [Visitor_ID] [int] IDENTITY(1,1)NOTNULL,
- [Emp_ID] [int] NULL,
- [Name] [varchar](500)NULL,
- [Mobile] [varchar](50)NULL,
- [Organization] [varchar](500)NULL,
- [City] [varchar](50)NULL,
- [Address] [varchar](2000)NULL,
- [Visit_Department] [varchar](500)NULL,
- [VisitPurpose] [varchar](5000)NULL,
- [Visit_Date] [date] NULL,
- [In_Time] [varchar](50)NULL,
- [Out_Time] [varchar](50)NULL,
- CONSTRAINT [PK_Visitor] PRIMARYKEYCLUSTERED
- (
- [Visitor_ID] ASC
- )WITH (PAD_INDEX=OFF,STATISTICS_NORECOMPUTE=OFF,IGNORE_DUP_KEY=OFF,ALLOW_ROW_LOCKS=ON,ALLOW_PAGE_LOCKS=ON)ON [PRIMARY]
- )ON [PRIMARY]
-
- GO
-
- SETANSI_PADDINGOFF
- GO
-
- ALTERTABLE [dbo].[Visitor] ADDCONSTRAINT [DF_Visitor_Visit_Date] DEFAULT (getdate())FOR [Visit_Date]
- 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!