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
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:
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:
Image 3.
Now run the application:
Here I have 2 types of users, one is Admin and the second one is User:
Image 4.
Image 5.
Now click on the "Add New Visitor" link:
Image 6.
Image 7.
From here an employee can search for any visitor and can manually log him out.
Image 8.
Image 9.
Image 10.
Now login as ADMIN:
Image 11.
Image 12.
Now click the "Manage Employee" link:
Image 13.
Image 14.
Now again click on the ADMIN link and click on the "Manage Visitors" link.
Image 15.
Image 16.
An Admin can search visitors and can delete any visitor from here.
Image 17.
Now again click on the ADMIN link, then click on "View visitors By Employee".
Image 18.
Image 19.
Select Employee and click on the Search visitor button:
Image 20.
Image 21.
Enjoy my project. Happy Coding!