You are on page 1of 69

Library-Management-System-asp.

net-project
This web application is used to handle typical operations in a library system.
This application is developed for librarians. Issuing book, returning book, adding member, and
searching for books are some of the major operations of this application.

Technologies and Products used

ASP.NET 2.0
C# language

Visual Web Developer 2005 Express Edition

SQL Server 2005 Express Edition

File Structure
The following is the directory structure of this application.
exam
|- App_Data
|
|-Database.mdf
|- App_Code
|
|-Database.cs
|- App_Themes
|
|-style.css
|- all
|
|-LibraryService.asmx
|- photos (this directory contains .jpg files of members)
|- default.aspx
|- login.aspx
|- addtitle.aspx
|- addmember.aspx
|- Masterpage.master
|- memberinfo.aspx
|- members.aspx
|- chanepassword.aspx
|- deletemember.aspx
|- issue.aspx
|- returnbook.aspx
|- memberslist.aspx
|- searchbooks.aspx
|- web.config
|- web.sitemap
|- updatemembers.aspx
|- logout.aspx

Operations and related files


The following table lists operations and associated objects and files.

Operation

Files

Login

login.aspx

Logout

logout.aspx

Delete Member

deletemember.aspx

Master page of all

Masterpage.master

Home Page

Default.aspx

Change password

changepassword.aspx

Add Title

addtitle.aspx

Add Member

addmember.aspx

Iseue of book

issue.aspx

Return of book

returnbook.aspx

Search books

searchbooks.aspx

Update Members

updatemembers.aspx

Member Information memberinfo.aspx


List of books

books.aspx

Structure of Tables
USERS Table
uname - varchar(10)
pwd - varchar(10)
fullname - varchar(30)

SUBJECTS Table
subcode - varchar(10)
subname - varchar(30)
di - datetime

MEMBERS Table
mid - int
mname - varchar(30)
depositamt - int
djoin - datetime
email - varchar(40)
occupation - varchar(50)

TITLES Table

tid - int
title - varchar(30)
subcode - varchar(10)
authors - varchar(50)
price - int
dp - datetime
publishers - varchar(30)
status - char(1)

ISSUES Table
tid - int
mid - int
di - datetime
issuedby - varchar(10)

RETURNS Table
tid - int
mid - int
di - datetime
dr - datetime
issuedby - varchar(10)
returnedto - varchar(10)
fineamt - int

Steps to download, deploy and run this project


The following are the steps to related to be taken to run the existing part of the
application :
1. Download lm.zip and unzip it into any directory in your system. (For example if you
extract to d:\ then it will create a directory lm in d:\.
2. Open Visual Web Developer 2005 Express Edition.
3. Open the project from the directory into which you extracted project.For example, d:\lm
4. Add SQL Database file to your project and create necessary tables as shown above.
5. Create issuebook and returnbook procedures as shown below.
6. ALTER PROCEDURE IssueBook
7.
(
8.
@tid int,
9.
@mid int,
10. @di datetime,
11. @issuedby varchar(10)
12. )
13. AS

14. declare @nbooks int


15. /* check titles availablity */
16.
17. if not exists( select * from titles where tid = @tid and status
18. begin
19.
raiserror('Title is not present or not available',15,1)
20.
return
21. end
22.
23. /* check members availablity */
24. if not exists (select * from members where mid = @mid )
25. begin
26.
raiserror('Invalid member id!',15,1)
27.
return
28. end
29.
30.
31. ALTER PROCEDURE ReturnBook
32. (
33. @tid int,
34. @dr datetime,
35. @user varchar(10)
36. )
37. AS
38. declare @fine int
39. declare @mid int
40. declare @issuedby varchar(10)
41. declare @di datetime
42.
43.
44. /* check tid is valid */
45. if not exists (select * from issues where tid = @tid)
46. begin
47.
raiserror('Title is not in the issued titles!',15,1)
48.
return
49. end
50.
51. /* calculate fine */
52. select @fine=case
53.
when datediff(dd,di,getdate()) > 15 then
datediff(dd,di,getdate())-15

54.
else 0
55.
end
56. from issues where tid = @tid;
57.
58. select @mid = mid, @di = di, @issuedby=issuedby

= 'a')

59. from issues where tid = @tid;


60.
61. /* insert a row into returns */
62.
63. begin tran
64. insert into returns
65. values(@tid,@mid,@di,@dr,@issuedby,@user,@fine);
66.
67. delete from issues where tid = @tid;
68.
69. update titles set status ='a'
70. where tid = @tid
71.
72. commit tran
73.
74. Goto Solution Explorer and make default.aspx the startup page.
75. Run project from VWD 2005 Express Edition.
76. You should see login.aspx page.

Library-Management-System-asp.net-project
This web application is used to handle typical operations in a library system.
This application is developed for librarians. Issuing book, returning book, adding member, and
searching for books are some of the major operations of this application.

Technologies and Products used

ASP.NET 2.0
C# language

Visual Web Developer 2005 Express Edition

SQL Server 2005 Express Edition

File Structure
The following is the directory structure of this application.
exam
|- App_Data
|
|-Database.mdf
|- App_Code
|
|-Database.cs

||
||
||||||||||||||||||-

App_Themes
|-style.css
all
|-LibraryService.asmx
photos (this directory contains .jpg files of members)
default.aspx
login.aspx
addtitle.aspx
addmember.aspx
Masterpage.master
memberinfo.aspx
members.aspx
chanepassword.aspx
deletemember.aspx
issue.aspx
returnbook.aspx
memberslist.aspx
searchbooks.aspx
web.config
web.sitemap
updatemembers.aspx
logout.aspx

Operations and related files


The following table lists operations and associated objects and files.
Operation

Files

Login

login.aspx

Logout

logout.aspx

Delete Member

deletemember.aspx

Master page of all

Masterpage.master

Home Page

Default.aspx

Change password

changepassword.aspx

Add Title

addtitle.aspx

Add Member

addmember.aspx

Iseue of book

issue.aspx

Return of book

returnbook.aspx

Search books

searchbooks.aspx

Update Members

updatemembers.aspx

Member Information memberinfo.aspx


List of books

books.aspx

Structure of Tables
USERS Table
uname - varchar(10)
pwd - varchar(10)
fullname - varchar(30)

SUBJECTS Table
subcode - varchar(10)
subname - varchar(30)
di - datetime

MEMBERS Table
mid - int
mname - varchar(30)
depositamt - int
djoin - datetime
email - varchar(40)
occupation - varchar(50)

TITLES Table
tid - int
title - varchar(30)
subcode - varchar(10)
authors - varchar(50)
price - int
dp - datetime
publishers - varchar(30)
status - char(1)

ISSUES Table
tid - int
mid - int
di - datetime
issuedby - varchar(10)

RETURNS Table
tid - int
mid - int
di - datetime
dr - datetime
issuedby - varchar(10)
returnedto - varchar(10)
fineamt - int

Steps to download, deploy and run this project


The following are the steps to related to be taken to run the existing part of the
application :
77. Download lm.zip and unzip it into any directory in your system. (For example if you
extract to d:\ then it will create a directory lm in d:\.
78. Open Visual Web Developer 2005 Express Edition.
79. Open the project from the directory into which you extracted project.For example, d:\lm
80. Add SQL Database file to your project and create necessary tables as shown above.
81. Create issuebook and returnbook procedures as shown below.
82. ALTER PROCEDURE IssueBook
83. (
84. @tid int,
85. @mid int,
86. @di datetime,
87. @issuedby varchar(10)
88. )
89. AS
90. declare @nbooks int
91. /* check titles availablity */
92.
93. if not exists( select * from titles where tid = @tid and status
94. begin
95.
raiserror('Title is not present or not available',15,1)
96.
return
97. end
98.
99. /* check members availablity */
100. if not exists (select * from members where mid = @mid )
101.
begin
102.
raiserror('Invalid member id!',15,1)
103.
return
104. end
105.
106.
107. ALTER PROCEDURE ReturnBook
108.
(
109.
@tid int,
110.
@dr datetime,
111.
@user varchar(10)
112.
)

= 'a')

113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.

AS
declare
declare
declare
declare

@fine int
@mid int
@issuedby varchar(10)
@di datetime

/* check tid is valid */


if not exists (select * from issues where tid = @tid)
begin
raiserror('Title is not in the issued titles!',15,1)
return
end

/* calculate fine */
select @fine=case
when datediff(dd,di,getdate()) > 15 then
datediff(dd,di,getdate())-15
130.
else 0
131.
end
132. from issues where tid = @tid;

133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.

select @mid = mid, @di = di, @issuedby=issuedby


from issues where tid = @tid;
/* insert a row into returns */
begin tran
insert into returns
values(@tid,@mid,@di,@dr,@issuedby,@user,@fine);
delete from issues where tid = @tid;
update titles set status ='a'
where tid = @tid
commit tran

Goto Solution Explorer and make default.aspx the startup page.

151.

Run project from VWD 2005 Express Edition.

152.

You should see login.aspx page.

Library-Management-System-asp.net-project
This web application is used to handle typical operations in a library system.
This application is developed for librarians. Issuing book, returning book, adding member, and
searching for books are some of the major operations of this application.

Technologies and Products used

ASP.NET 2.0
C# language

Visual Web Developer 2005 Express Edition

SQL Server 2005 Express Edition

File Structure
The following is the directory structure of this application.
exam
|- App_Data
|
|-Database.mdf
|- App_Code
|
|-Database.cs
|- App_Themes
|
|-style.css
|- all
|
|-LibraryService.asmx
|- photos (this directory contains .jpg files of members)
|- default.aspx
|- login.aspx
|- addtitle.aspx
|- addmember.aspx
|- Masterpage.master
|- memberinfo.aspx
|- members.aspx
|- chanepassword.aspx
|- deletemember.aspx
|- issue.aspx
|- returnbook.aspx
|- memberslist.aspx
|- searchbooks.aspx
|- web.config
|- web.sitemap
|- updatemembers.aspx
|- logout.aspx

Operations and related files

The following table lists operations and associated objects and files.
Operation

Files

Login

login.aspx

Logout

logout.aspx

Delete Member

deletemember.aspx

Master page of all

Masterpage.master

Home Page

Default.aspx

Change password

changepassword.aspx

Add Title

addtitle.aspx

Add Member

addmember.aspx

Iseue of book

issue.aspx

Return of book

returnbook.aspx

Search books

searchbooks.aspx

Update Members

updatemembers.aspx

Member Information memberinfo.aspx


List of books

books.aspx

Structure of Tables
USERS Table
uname - varchar(10)
pwd - varchar(10)
fullname - varchar(30)

SUBJECTS Table
subcode - varchar(10)
subname - varchar(30)
di - datetime

MEMBERS Table
mid - int
mname - varchar(30)
depositamt - int
djoin - datetime
email - varchar(40)
occupation - varchar(50)

TITLES Table
tid - int
title - varchar(30)
subcode - varchar(10)
authors - varchar(50)
price - int
dp - datetime
publishers - varchar(30)
status - char(1)

ISSUES Table
tid - int
mid - int
di - datetime
issuedby - varchar(10)

RETURNS Table
tid - int
mid - int
di - datetime
dr - datetime
issuedby - varchar(10)
returnedto - varchar(10)
fineamt - int

Steps to download, deploy and run this project


The following are the steps to related to be taken to run the existing part of the
application :
153.
Download lm.zip and unzip it into any directory in your system. (For example if
you extract to d:\ then it will create a directory lm in d:\.
154.
Open Visual Web Developer 2005 Express Edition.
155.
Open the project from the directory into which you extracted project.For example,
d:\lm
156.
Add SQL Database file to your project and create necessary tables as shown
above.
157.

Create issuebook and returnbook procedures as shown below.

158. ALTER PROCEDURE IssueBook


159.
(
160.
@tid int,
161.
@mid int,

162.
163.
164.
165.
166.
167.
168.
169.

@di datetime,
@issuedby varchar(10)
)
AS
declare @nbooks int
/* check titles availablity */

if not exists( select * from titles where tid = @tid and status
'a')
170. begin
171.
raiserror('Title is not present or not available',15,1)
172.
return
173. end

174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.

/* check members availablity */


if not exists (select * from members where mid = @mid )
begin
raiserror('Invalid member id!',15,1)
return
end

ALTER PROCEDURE ReturnBook


(
@tid int,
@dr datetime,
@user varchar(10)
)
AS
declare @fine int
declare @mid int
declare @issuedby varchar(10)
declare @di datetime

/* check tid is valid */


if not exists (select * from issues where tid = @tid)
begin
raiserror('Title is not in the issued titles!',15,1)
return
end

/* calculate fine */
select @fine=case
when datediff(dd,di,getdate()) > 15 then
datediff(dd,di,getdate())-15

206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
220.
221.
222.
223.
224.
225.
226.

else 0
end
from issues where tid = @tid;
select @mid = mid, @di = di, @issuedby=issuedby
from issues where tid = @tid;
/* insert a row into returns */
begin tran
insert into returns
values(@tid,@mid,@di,@dr,@issuedby,@user,@fine);
delete from issues where tid = @tid;
update titles set status ='a'
where tid = @tid
commit tran

Goto Solution Explorer and make default.aspx the startup page.

227.

Run project from VWD 2005 Express Edition.

228.

You should see login.aspx page.

Library-Management-System-asp.net-project
This web application is used to handle typical operations in a library system.
This application is developed for librarians. Issuing book, returning book, adding member, and
searching for books are some of the major operations of this application.

Technologies and Products used

ASP.NET 2.0
C# language

Visual Web Developer 2005 Express Edition

SQL Server 2005 Express Edition

File Structure

The following is the directory structure of this application.


exam
|- App_Data
|
|-Database.mdf
|- App_Code
|
|-Database.cs
|- App_Themes
|
|-style.css
|- all
|
|-LibraryService.asmx
|- photos (this directory contains .jpg files of members)
|- default.aspx
|- login.aspx
|- addtitle.aspx
|- addmember.aspx
|- Masterpage.master
|- memberinfo.aspx
|- members.aspx
|- chanepassword.aspx
|- deletemember.aspx
|- issue.aspx
|- returnbook.aspx
|- memberslist.aspx
|- searchbooks.aspx
|- web.config
|- web.sitemap
|- updatemembers.aspx
|- logout.aspx

Operations and related files


The following table lists operations and associated objects and files.
Operation

Files

Login

login.aspx

Logout

logout.aspx

Delete Member

deletemember.aspx

Master page of all

Masterpage.master

Home Page

Default.aspx

Change password

changepassword.aspx

Add Title

addtitle.aspx

Add Member

addmember.aspx

Iseue of book

issue.aspx

Return of book

returnbook.aspx

Search books

searchbooks.aspx

Update Members

updatemembers.aspx

Member Information memberinfo.aspx


List of books

books.aspx

Structure of Tables
USERS Table
uname - varchar(10)
pwd - varchar(10)
fullname - varchar(30)

SUBJECTS Table
subcode - varchar(10)
subname - varchar(30)
di - datetime

MEMBERS Table
mid - int
mname - varchar(30)
depositamt - int
djoin - datetime
email - varchar(40)
occupation - varchar(50)

TITLES Table
tid - int
title - varchar(30)
subcode - varchar(10)
authors - varchar(50)
price - int
dp - datetime
publishers - varchar(30)
status - char(1)

ISSUES Table
tid - int
mid - int
di - datetime
issuedby - varchar(10)

RETURNS Table
tid - int

mid - int
di - datetime
dr - datetime
issuedby - varchar(10)
returnedto - varchar(10)
fineamt - int

Steps to download, deploy and run this project


The following are the steps to related to be taken to run the existing part of the
application :
229.
Download lm.zip and unzip it into any directory in your system. (For example if
you extract to d:\ then it will create a directory lm in d:\.
230.
Open Visual Web Developer 2005 Express Edition.
231.
Open the project from the directory into which you extracted project.For example,
d:\lm
232.
Add SQL Database file to your project and create necessary tables as shown
above.
233.
234.
235.
236.
237.
238.
239.
240.
241.
242.
243.
244.
245.

Create issuebook and returnbook procedures as shown below.


ALTER PROCEDURE IssueBook
(
@tid int,
@mid int,
@di datetime,
@issuedby varchar(10)
)
AS
declare @nbooks int
/* check titles availablity */

if not exists( select * from titles where tid = @tid and status
'a')
246. begin
247.
raiserror('Title is not present or not available',15,1)
248.
return
249. end

250.
251. /* check members availablity */
252. if not exists (select * from members where mid = @mid )
253.
begin
254.
raiserror('Invalid member id!',15,1)
255.
return
256. end

257.
258.
259.
260.
261.
262.
263.
264.
265.
266.
267.
268.
269.
270.
271.
272.
273.
274.
275.
276.
277.
278.
279.
280.
281.

ALTER PROCEDURE ReturnBook


(
@tid int,
@dr datetime,
@user varchar(10)
)
AS
declare @fine int
declare @mid int
declare @issuedby varchar(10)
declare @di datetime

/* check tid is valid */


if not exists (select * from issues where tid = @tid)
begin
raiserror('Title is not in the issued titles!',15,1)
return
end

/* calculate fine */
select @fine=case
when datediff(dd,di,getdate()) > 15 then
datediff(dd,di,getdate())-15
282.
else 0
283.
end
284. from issues where tid = @tid;

285.
286.
287.
288.
289.
290.
291.
292.
293.
294.
295.
296.
297.
298.
299.
300.
301.

select @mid = mid, @di = di, @issuedby=issuedby


from issues where tid = @tid;
/* insert a row into returns */
begin tran
insert into returns
values(@tid,@mid,@di,@dr,@issuedby,@user,@fine);
delete from issues where tid = @tid;
update titles set status ='a'
where tid = @tid
commit tran

302.

Goto Solution Explorer and make default.aspx the startup page.

303.

Run project from VWD 2005 Express Edition.

304.

You should see login.aspx page.

Library-Management-System-asp.net-project
This web application is used to handle typical operations in a library system.
This application is developed for librarians. Issuing book, returning book, adding member, and
searching for books are some of the major operations of this application.

Technologies and Products used

ASP.NET 2.0
C# language

Visual Web Developer 2005 Express Edition

SQL Server 2005 Express Edition

File Structure
The following is the directory structure of this application.
exam
|- App_Data
|
|-Database.mdf
|- App_Code
|
|-Database.cs
|- App_Themes
|
|-style.css
|- all
|
|-LibraryService.asmx
|- photos (this directory contains .jpg files of members)
|- default.aspx
|- login.aspx
|- addtitle.aspx
|- addmember.aspx
|- Masterpage.master
|- memberinfo.aspx
|- members.aspx
|- chanepassword.aspx
|- deletemember.aspx
|- issue.aspx
|- returnbook.aspx
|- memberslist.aspx
|- searchbooks.aspx

||||-

web.config
web.sitemap
updatemembers.aspx
logout.aspx

Operations and related files


The following table lists operations and associated objects and files.
Operation

Files

Login

login.aspx

Logout

logout.aspx

Delete Member

deletemember.aspx

Master page of all

Masterpage.master

Home Page

Default.aspx

Change password

changepassword.aspx

Add Title

addtitle.aspx

Add Member

addmember.aspx

Iseue of book

issue.aspx

Return of book

returnbook.aspx

Search books

searchbooks.aspx

Update Members

updatemembers.aspx

Member Information memberinfo.aspx


List of books

books.aspx

Structure of Tables
USERS Table
uname - varchar(10)
pwd - varchar(10)
fullname - varchar(30)

SUBJECTS Table
subcode - varchar(10)
subname - varchar(30)
di - datetime

MEMBERS Table

mid - int
mname - varchar(30)
depositamt - int
djoin - datetime
email - varchar(40)
occupation - varchar(50)

TITLES Table
tid - int
title - varchar(30)
subcode - varchar(10)
authors - varchar(50)
price - int
dp - datetime
publishers - varchar(30)
status - char(1)

ISSUES Table
tid - int
mid - int
di - datetime
issuedby - varchar(10)

RETURNS Table
tid - int
mid - int
di - datetime
dr - datetime
issuedby - varchar(10)
returnedto - varchar(10)
fineamt - int

Steps to download, deploy and run this project


The following are the steps to related to be taken to run the existing part of the
application :
305.
Download lm.zip and unzip it into any directory in your system. (For example if
you extract to d:\ then it will create a directory lm in d:\.
306.
Open Visual Web Developer 2005 Express Edition.
307.
Open the project from the directory into which you extracted project.For example,
d:\lm
308.
Add SQL Database file to your project and create necessary tables as shown
above.

309.
310.
311.
312.
313.
314.
315.
316.
317.
318.
319.
320.
321.

Create issuebook and returnbook procedures as shown below.


ALTER PROCEDURE IssueBook
(
@tid int,
@mid int,
@di datetime,
@issuedby varchar(10)
)
AS
declare @nbooks int
/* check titles availablity */

if not exists( select * from titles where tid = @tid and status
'a')
322. begin
323.
raiserror('Title is not present or not available',15,1)
324.
return
325. end

326.
327.
328.
329.
330.
331.
332.
333.
334.
335.
336.
337.
338.
339.
340.
341.
342.
343.
344.
345.
346.
347.
348.
349.
350.
351.
352.

/* check members availablity */


if not exists (select * from members where mid = @mid )
begin
raiserror('Invalid member id!',15,1)
return
end

ALTER PROCEDURE ReturnBook


(
@tid int,
@dr datetime,
@user varchar(10)
)
AS
declare @fine int
declare @mid int
declare @issuedby varchar(10)
declare @di datetime

/* check tid is valid */


if not exists (select * from issues where tid = @tid)
begin
raiserror('Title is not in the issued titles!',15,1)
return

353.
end
354.
355. /* calculate fine */
356. select @fine=case
357.
when datediff(dd,di,getdate()) > 15 then
datediff(dd,di,getdate())-15
358.
else 0
359.
end
360. from issues where tid = @tid;

361.
362.
363.
364.
365.
366.
367.
368.
369.
370.
371.
372.
373.
374.
375.
376.
377.
378.

select @mid = mid, @di = di, @issuedby=issuedby


from issues where tid = @tid;
/* insert a row into returns */
begin tran
insert into returns
values(@tid,@mid,@di,@dr,@issuedby,@user,@fine);
delete from issues where tid = @tid;
update titles set status ='a'
where tid = @tid
commit tran

Goto Solution Explorer and make default.aspx the startup page.

379.

Run project from VWD 2005 Express Edition.

380.

You should see login.aspx page.

Library-Management-System-asp.net-project
This web application is used to handle typical operations in a library system.
This application is developed for librarians. Issuing book, returning book, adding member, and
searching for books are some of the major operations of this application.

Technologies and Products used

ASP.NET 2.0
C# language

Visual Web Developer 2005 Express Edition

SQL Server 2005 Express Edition

File Structure
The following is the directory structure of this application.
exam
|- App_Data
|
|-Database.mdf
|- App_Code
|
|-Database.cs
|- App_Themes
|
|-style.css
|- all
|
|-LibraryService.asmx
|- photos (this directory contains .jpg files of members)
|- default.aspx
|- login.aspx
|- addtitle.aspx
|- addmember.aspx
|- Masterpage.master
|- memberinfo.aspx
|- members.aspx
|- chanepassword.aspx
|- deletemember.aspx
|- issue.aspx
|- returnbook.aspx
|- memberslist.aspx
|- searchbooks.aspx
|- web.config
|- web.sitemap
|- updatemembers.aspx
|- logout.aspx

Operations and related files


The following table lists operations and associated objects and files.
Operation

Files

Login

login.aspx

Logout

logout.aspx

Delete Member

deletemember.aspx

Master page of all

Masterpage.master

Home Page

Default.aspx

Change password

changepassword.aspx

Add Title

addtitle.aspx

Add Member

addmember.aspx

Iseue of book

issue.aspx

Return of book

returnbook.aspx

Search books

searchbooks.aspx

Update Members

updatemembers.aspx

Member Information memberinfo.aspx


List of books

books.aspx

Structure of Tables
USERS Table
uname - varchar(10)
pwd - varchar(10)
fullname - varchar(30)

SUBJECTS Table
subcode - varchar(10)
subname - varchar(30)
di - datetime

MEMBERS Table
mid - int
mname - varchar(30)
depositamt - int
djoin - datetime
email - varchar(40)
occupation - varchar(50)

TITLES Table
tid - int
title - varchar(30)
subcode - varchar(10)
authors - varchar(50)
price - int
dp - datetime
publishers - varchar(30)
status - char(1)

ISSUES Table
tid - int

mid - int
di - datetime
issuedby - varchar(10)

RETURNS Table
tid - int
mid - int
di - datetime
dr - datetime
issuedby - varchar(10)
returnedto - varchar(10)
fineamt - int

Steps to download, deploy and run this project


The following are the steps to related to be taken to run the existing part of the
application :
381.
Download lm.zip and unzip it into any directory in your system. (For example if
you extract to d:\ then it will create a directory lm in d:\.
382.
Open Visual Web Developer 2005 Express Edition.
383.
Open the project from the directory into which you extracted project.For example,
d:\lm
384.
Add SQL Database file to your project and create necessary tables as shown
above.
385.
386.
387.
388.
389.
390.
391.
392.
393.
394.
395.
396.
397.

Create issuebook and returnbook procedures as shown below.


ALTER PROCEDURE IssueBook
(
@tid int,
@mid int,
@di datetime,
@issuedby varchar(10)
)
AS
declare @nbooks int
/* check titles availablity */

if not exists( select * from titles where tid = @tid and status
'a')
398. begin
399.
raiserror('Title is not present or not available',15,1)
400.
return
401. end

402.

403.
404.
405.
406.
407.
408.
409.
410.
411.
412.
413.
414.
415.
416.
417.
418.
419.
420.
421.
422.
423.
424.
425.
426.
427.
428.
429.
430.
431.
432.
433.

/* check members availablity */


if not exists (select * from members where mid = @mid )
begin
raiserror('Invalid member id!',15,1)
return
end

ALTER PROCEDURE ReturnBook


(
@tid int,
@dr datetime,
@user varchar(10)
)
AS
declare @fine int
declare @mid int
declare @issuedby varchar(10)
declare @di datetime

/* check tid is valid */


if not exists (select * from issues where tid = @tid)
begin
raiserror('Title is not in the issued titles!',15,1)
return
end

/* calculate fine */
select @fine=case
when datediff(dd,di,getdate()) > 15 then
datediff(dd,di,getdate())-15
434.
else 0
435.
end
436. from issues where tid = @tid;

437.
438.
439.
440.
441.
442.
443.
444.
445.
446.
447.

select @mid = mid, @di = di, @issuedby=issuedby


from issues where tid = @tid;
/* insert a row into returns */
begin tran
insert into returns
values(@tid,@mid,@di,@dr,@issuedby,@user,@fine);
delete from issues where tid = @tid;

448.
449. update titles set status ='a'
450. where tid = @tid
451.
452. commit tran
453.
454.
Goto Solution Explorer and make default.aspx the startup page.
455.

Run project from VWD 2005 Express Edition.

456.

You should see login.aspx page.

Library-Management-System-asp.net-project
This web application is used to handle typical operations in a library system.
This application is developed for librarians. Issuing book, returning book, adding member, and
searching for books are some of the major operations of this application.

Technologies and Products used

ASP.NET 2.0
C# language

Visual Web Developer 2005 Express Edition

SQL Server 2005 Express Edition

File Structure
The following is the directory structure of this application.
exam
|- App_Data
|
|-Database.mdf
|- App_Code
|
|-Database.cs
|- App_Themes
|
|-style.css
|- all
|
|-LibraryService.asmx
|- photos (this directory contains .jpg files of members)
|- default.aspx
|- login.aspx
|- addtitle.aspx
|- addmember.aspx
|- Masterpage.master
|- memberinfo.aspx

|||||||||||-

members.aspx
chanepassword.aspx
deletemember.aspx
issue.aspx
returnbook.aspx
memberslist.aspx
searchbooks.aspx
web.config
web.sitemap
updatemembers.aspx
logout.aspx

Operations and related files


The following table lists operations and associated objects and files.
Operation

Files

Login

login.aspx

Logout

logout.aspx

Delete Member

deletemember.aspx

Master page of all

Masterpage.master

Home Page

Default.aspx

Change password

changepassword.aspx

Add Title

addtitle.aspx

Add Member

addmember.aspx

Iseue of book

issue.aspx

Return of book

returnbook.aspx

Search books

searchbooks.aspx

Update Members

updatemembers.aspx

Member Information memberinfo.aspx


List of books

books.aspx

Structure of Tables
USERS Table
uname - varchar(10)
pwd - varchar(10)
fullname - varchar(30)

SUBJECTS Table
subcode - varchar(10)
subname - varchar(30)
di - datetime

MEMBERS Table
mid - int
mname - varchar(30)
depositamt - int
djoin - datetime
email - varchar(40)
occupation - varchar(50)

TITLES Table
tid - int
title - varchar(30)
subcode - varchar(10)
authors - varchar(50)
price - int
dp - datetime
publishers - varchar(30)
status - char(1)

ISSUES Table
tid - int
mid - int
di - datetime
issuedby - varchar(10)

RETURNS Table
tid - int
mid - int
di - datetime
dr - datetime
issuedby - varchar(10)
returnedto - varchar(10)
fineamt - int

Steps to download, deploy and run this project


The following are the steps to related to be taken to run the existing part of the
application :
457.
Download lm.zip and unzip it into any directory in your system. (For example if
you extract to d:\ then it will create a directory lm in d:\.

458.

Open Visual Web Developer 2005 Express Edition.

459.
Open the project from the directory into which you extracted project.For example,
d:\lm
460.
Add SQL Database file to your project and create necessary tables as shown
above.
461.
462.
463.
464.
465.
466.
467.
468.
469.
470.
471.
472.
473.

Create issuebook and returnbook procedures as shown below.


ALTER PROCEDURE IssueBook
(
@tid int,
@mid int,
@di datetime,
@issuedby varchar(10)
)
AS
declare @nbooks int
/* check titles availablity */

if not exists( select * from titles where tid = @tid and status
'a')
474. begin
475.
raiserror('Title is not present or not available',15,1)
476.
return
477. end

478.
479.
480.
481.
482.
483.
484.
485.
486.
487.
488.
489.
490.
491.
492.
493.
494.
495.
496.
497.

/* check members availablity */


if not exists (select * from members where mid = @mid )
begin
raiserror('Invalid member id!',15,1)
return
end

ALTER PROCEDURE ReturnBook


(
@tid int,
@dr datetime,
@user varchar(10)
)
AS
declare @fine int
declare @mid int
declare @issuedby varchar(10)
declare @di datetime

498.
499.
500.
501.
502.
503.
504.
505.
506.
507.
508.
509.

/* check tid is valid */


if not exists (select * from issues where tid = @tid)
begin
raiserror('Title is not in the issued titles!',15,1)
return
end

/* calculate fine */
select @fine=case
when datediff(dd,di,getdate()) > 15 then
datediff(dd,di,getdate())-15
510.
else 0
511.
end
512. from issues where tid = @tid;

513.
514.
515.
516.
517.
518.
519.
520.
521.
522.
523.
524.
525.
526.
527.
528.
529.
530.

select @mid = mid, @di = di, @issuedby=issuedby


from issues where tid = @tid;
/* insert a row into returns */
begin tran
insert into returns
values(@tid,@mid,@di,@dr,@issuedby,@user,@fine);
delete from issues where tid = @tid;
update titles set status ='a'
where tid = @tid
commit tran

Goto Solution Explorer and make default.aspx the startup page.

531.

Run project from VWD 2005 Express Edition.

532.

You should see login.aspx page.

Library-Management-System-asp.net-project
This web application is used to handle typical operations in a library system.

This application is developed for librarians. Issuing book, returning book, adding member, and
searching for books are some of the major operations of this application.

Technologies and Products used

ASP.NET 2.0
C# language

Visual Web Developer 2005 Express Edition

SQL Server 2005 Express Edition

File Structure
The following is the directory structure of this application.
exam
|- App_Data
|
|-Database.mdf
|- App_Code
|
|-Database.cs
|- App_Themes
|
|-style.css
|- all
|
|-LibraryService.asmx
|- photos (this directory contains .jpg files of members)
|- default.aspx
|- login.aspx
|- addtitle.aspx
|- addmember.aspx
|- Masterpage.master
|- memberinfo.aspx
|- members.aspx
|- chanepassword.aspx
|- deletemember.aspx
|- issue.aspx
|- returnbook.aspx
|- memberslist.aspx
|- searchbooks.aspx
|- web.config
|- web.sitemap
|- updatemembers.aspx
|- logout.aspx

Operations and related files


The following table lists operations and associated objects and files.
Operation

Files

Login

login.aspx

Logout

logout.aspx

Delete Member

deletemember.aspx

Master page of all

Masterpage.master

Home Page

Default.aspx

Change password

changepassword.aspx

Add Title

addtitle.aspx

Add Member

addmember.aspx

Iseue of book

issue.aspx

Return of book

returnbook.aspx

Search books

searchbooks.aspx

Update Members

updatemembers.aspx

Member Information memberinfo.aspx


List of books

books.aspx

Structure of Tables
USERS Table
uname - varchar(10)
pwd - varchar(10)
fullname - varchar(30)

SUBJECTS Table
subcode - varchar(10)
subname - varchar(30)
di - datetime

MEMBERS Table
mid - int
mname - varchar(30)
depositamt - int
djoin - datetime
email - varchar(40)
occupation - varchar(50)

TITLES Table
tid - int
title - varchar(30)
subcode - varchar(10)

authors - varchar(50)
price - int
dp - datetime
publishers - varchar(30)
status - char(1)

ISSUES Table
tid - int
mid - int
di - datetime
issuedby - varchar(10)

RETURNS Table
tid - int
mid - int
di - datetime
dr - datetime
issuedby - varchar(10)
returnedto - varchar(10)
fineamt - int

Steps to download, deploy and run this project


The following are the steps to related to be taken to run the existing part of the
application :
533.
Download lm.zip and unzip it into any directory in your system. (For example if
you extract to d:\ then it will create a directory lm in d:\.
534.
Open Visual Web Developer 2005 Express Edition.
535.
Open the project from the directory into which you extracted project.For example,
d:\lm
536.
Add SQL Database file to your project and create necessary tables as shown
above.
537.
538.
539.
540.
541.
542.
543.
544.
545.
546.
547.

Create issuebook and returnbook procedures as shown below.


ALTER PROCEDURE IssueBook
(
@tid int,
@mid int,
@di datetime,
@issuedby varchar(10)
)
AS
declare @nbooks int
/* check titles availablity */

548.
549. if

not exists( select * from titles where tid = @tid and status
'a')
550. begin
551.
raiserror('Title is not present or not available',15,1)
552.
return
553. end

554.
555.
556.
557.
558.
559.
560.
561.
562.
563.
564.
565.
566.
567.
568.
569.
570.
571.
572.
573.
574.
575.
576.
577.
578.
579.
580.
581.
582.
583.
584.
585.

/* check members availablity */


if not exists (select * from members where mid = @mid )
begin
raiserror('Invalid member id!',15,1)
return
end

ALTER PROCEDURE ReturnBook


(
@tid int,
@dr datetime,
@user varchar(10)
)
AS
declare @fine int
declare @mid int
declare @issuedby varchar(10)
declare @di datetime

/* check tid is valid */


if not exists (select * from issues where tid = @tid)
begin
raiserror('Title is not in the issued titles!',15,1)
return
end

/* calculate fine */
select @fine=case
when datediff(dd,di,getdate()) > 15 then
datediff(dd,di,getdate())-15
586.
else 0
587.
end
588. from issues where tid = @tid;

589.
590. select @mid = mid, @di = di, @issuedby=issuedby
591. from issues where tid = @tid;

592.
593.
594.
595.
596.
597.
598.
599.
600.
601.
602.
603.
604.
605.
606.

/* insert a row into returns */


begin tran
insert into returns
values(@tid,@mid,@di,@dr,@issuedby,@user,@fine);
delete from issues where tid = @tid;
update titles set status ='a'
where tid = @tid
commit tran

Goto Solution Explorer and make default.aspx the startup page.

607.

Run project from VWD 2005 Express Edition.

608.

You should see login.aspx page.

Library-Management-System-asp.net-project
This web application is used to handle typical operations in a library system.
This application is developed for librarians. Issuing book, returning book, adding member, and
searching for books are some of the major operations of this application.

Technologies and Products used

ASP.NET 2.0
C# language

Visual Web Developer 2005 Express Edition

SQL Server 2005 Express Edition

File Structure
The following is the directory structure of this application.
exam
|- App_Data
|
|-Database.mdf
|- App_Code
|
|-Database.cs
|- App_Themes

|
||
||||||||||||||||||-

|-style.css
all
|-LibraryService.asmx
photos (this directory contains .jpg files of members)
default.aspx
login.aspx
addtitle.aspx
addmember.aspx
Masterpage.master
memberinfo.aspx
members.aspx
chanepassword.aspx
deletemember.aspx
issue.aspx
returnbook.aspx
memberslist.aspx
searchbooks.aspx
web.config
web.sitemap
updatemembers.aspx
logout.aspx

Operations and related files


The following table lists operations and associated objects and files.
Operation

Files

Login

login.aspx

Logout

logout.aspx

Delete Member

deletemember.aspx

Master page of all

Masterpage.master

Home Page

Default.aspx

Change password

changepassword.aspx

Add Title

addtitle.aspx

Add Member

addmember.aspx

Iseue of book

issue.aspx

Return of book

returnbook.aspx

Search books

searchbooks.aspx

Update Members

updatemembers.aspx

Member Information memberinfo.aspx


List of books

books.aspx

Structure of Tables
USERS Table
uname - varchar(10)
pwd - varchar(10)
fullname - varchar(30)

SUBJECTS Table
subcode - varchar(10)
subname - varchar(30)
di - datetime

MEMBERS Table
mid - int
mname - varchar(30)
depositamt - int
djoin - datetime
email - varchar(40)
occupation - varchar(50)

TITLES Table
tid - int
title - varchar(30)
subcode - varchar(10)
authors - varchar(50)
price - int
dp - datetime
publishers - varchar(30)
status - char(1)

ISSUES Table
tid - int
mid - int
di - datetime
issuedby - varchar(10)

RETURNS Table
tid - int
mid - int
di - datetime
dr - datetime
issuedby - varchar(10)
returnedto - varchar(10)
fineamt - int

Steps to download, deploy and run this project


The following are the steps to related to be taken to run the existing part of the
application :
609.
Download lm.zip and unzip it into any directory in your system. (For example if
you extract to d:\ then it will create a directory lm in d:\.
610.
Open Visual Web Developer 2005 Express Edition.
611.
Open the project from the directory into which you extracted project.For example,
d:\lm
612.
Add SQL Database file to your project and create necessary tables as shown
above.
613.
614.
615.
616.
617.
618.
619.
620.
621.
622.
623.
624.
625.

Create issuebook and returnbook procedures as shown below.


ALTER PROCEDURE IssueBook
(
@tid int,
@mid int,
@di datetime,
@issuedby varchar(10)
)
AS
declare @nbooks int
/* check titles availablity */

if not exists( select * from titles where tid = @tid and status
'a')
626. begin
627.
raiserror('Title is not present or not available',15,1)
628.
return
629. end

630.
631. /* check members availablity */
632. if not exists (select * from members where mid = @mid )
633.
begin
634.
raiserror('Invalid member id!',15,1)
635.
return
636. end
637.
638.
639. ALTER PROCEDURE ReturnBook
640.
(
641.
@tid int,

642.
643.
644.
645.
646.
647.
648.
649.
650.
651.
652.
653.
654.
655.
656.
657.
658.
659.
660.
661.

@dr datetime,
@user varchar(10)
)
AS
declare
declare
declare
declare

@fine int
@mid int
@issuedby varchar(10)
@di datetime

/* check tid is valid */


if not exists (select * from issues where tid = @tid)
begin
raiserror('Title is not in the issued titles!',15,1)
return
end

/* calculate fine */
select @fine=case
when datediff(dd,di,getdate()) > 15 then
datediff(dd,di,getdate())-15
662.
else 0
663.
end
664. from issues where tid = @tid;

665.
666.
667.
668.
669.
670.
671.
672.
673.
674.
675.
676.
677.
678.
679.
680.
681.
682.

select @mid = mid, @di = di, @issuedby=issuedby


from issues where tid = @tid;
/* insert a row into returns */
begin tran
insert into returns
values(@tid,@mid,@di,@dr,@issuedby,@user,@fine);
delete from issues where tid = @tid;
update titles set status ='a'
where tid = @tid
commit tran

Goto Solution Explorer and make default.aspx the startup page.

683.

Run project from VWD 2005 Express Edition.

684.

You should see login.aspx page.

Library-Management-System-asp.net-project
This web application is used to handle typical operations in a library system.
This application is developed for librarians. Issuing book, returning book, adding member, and
searching for books are some of the major operations of this application.

Technologies and Products used

ASP.NET 2.0
C# language

Visual Web Developer 2005 Express Edition

SQL Server 2005 Express Edition

File Structure
The following is the directory structure of this application.
exam
|- App_Data
|
|-Database.mdf
|- App_Code
|
|-Database.cs
|- App_Themes
|
|-style.css
|- all
|
|-LibraryService.asmx
|- photos (this directory contains .jpg files of members)
|- default.aspx
|- login.aspx
|- addtitle.aspx
|- addmember.aspx
|- Masterpage.master
|- memberinfo.aspx
|- members.aspx
|- chanepassword.aspx
|- deletemember.aspx
|- issue.aspx
|- returnbook.aspx
|- memberslist.aspx
|- searchbooks.aspx
|- web.config
|- web.sitemap
|- updatemembers.aspx
|- logout.aspx

Operations and related files


The following table lists operations and associated objects and files.
Operation

Files

Login

login.aspx

Logout

logout.aspx

Delete Member

deletemember.aspx

Master page of all

Masterpage.master

Home Page

Default.aspx

Change password

changepassword.aspx

Add Title

addtitle.aspx

Add Member

addmember.aspx

Iseue of book

issue.aspx

Return of book

returnbook.aspx

Search books

searchbooks.aspx

Update Members

updatemembers.aspx

Member Information memberinfo.aspx


List of books

books.aspx

Structure of Tables
USERS Table
uname - varchar(10)
pwd - varchar(10)
fullname - varchar(30)

SUBJECTS Table
subcode - varchar(10)
subname - varchar(30)
di - datetime

MEMBERS Table
mid - int
mname - varchar(30)
depositamt - int
djoin - datetime
email - varchar(40)

occupation - varchar(50)

TITLES Table
tid - int
title - varchar(30)
subcode - varchar(10)
authors - varchar(50)
price - int
dp - datetime
publishers - varchar(30)
status - char(1)

ISSUES Table
tid - int
mid - int
di - datetime
issuedby - varchar(10)

RETURNS Table
tid - int
mid - int
di - datetime
dr - datetime
issuedby - varchar(10)
returnedto - varchar(10)
fineamt - int

Steps to download, deploy and run this project


The following are the steps to related to be taken to run the existing part of the
application :
685.
Download lm.zip and unzip it into any directory in your system. (For example if
you extract to d:\ then it will create a directory lm in d:\.
686.
Open Visual Web Developer 2005 Express Edition.
687.
Open the project from the directory into which you extracted project.For example,
d:\lm
688.
Add SQL Database file to your project and create necessary tables as shown
above.
689.

Create issuebook and returnbook procedures as shown below.

690. ALTER PROCEDURE IssueBook


691.
(
692.
@tid int,

693.
694.
695.
696.
697.
698.
699.
700.
701.

@mid int,
@di datetime,
@issuedby varchar(10)
)
AS
declare @nbooks int
/* check titles availablity */

if not exists( select * from titles where tid = @tid and status
'a')
702. begin
703.
raiserror('Title is not present or not available',15,1)
704.
return
705. end

706.
707.
708.
709.
710.
711.
712.
713.
714.
715.
716.
717.
718.
719.
720.
721.
722.
723.
724.
725.
726.
727.
728.
729.
730.
731.
732.
733.
734.
735.
736.

/* check members availablity */


if not exists (select * from members where mid = @mid )
begin
raiserror('Invalid member id!',15,1)
return
end

ALTER PROCEDURE ReturnBook


(
@tid int,
@dr datetime,
@user varchar(10)
)
AS
declare @fine int
declare @mid int
declare @issuedby varchar(10)
declare @di datetime

/* check tid is valid */


if not exists (select * from issues where tid = @tid)
begin
raiserror('Title is not in the issued titles!',15,1)
return
end
/* calculate fine */
select @fine=case

737.

when datediff(dd,di,getdate()) > 15 then


datediff(dd,di,getdate())-15
738.
else 0
739.
end
740. from issues where tid = @tid;

741.
742.
743.
744.
745.
746.
747.
748.
749.
750.
751.
752.
753.
754.
755.
756.
757.
758.

select @mid = mid, @di = di, @issuedby=issuedby


from issues where tid = @tid;
/* insert a row into returns */
begin tran
insert into returns
values(@tid,@mid,@di,@dr,@issuedby,@user,@fine);
delete from issues where tid = @tid;
update titles set status ='a'
where tid = @tid
commit tran

Goto Solution Explorer and make default.aspx the startup page.

759.

Run project from VWD 2005 Express Edition.

760.

You should see login.aspx page.

Library-Management-System-asp.net-project
This web application is used to handle typical operations in a library system.
This application is developed for librarians. Issuing book, returning book, adding member, and
searching for books are some of the major operations of this application.

Technologies and Products used

ASP.NET 2.0
C# language

Visual Web Developer 2005 Express Edition

SQL Server 2005 Express Edition

File Structure
The following is the directory structure of this application.
exam
|- App_Data
|
|-Database.mdf
|- App_Code
|
|-Database.cs
|- App_Themes
|
|-style.css
|- all
|
|-LibraryService.asmx
|- photos (this directory contains .jpg files of members)
|- default.aspx
|- login.aspx
|- addtitle.aspx
|- addmember.aspx
|- Masterpage.master
|- memberinfo.aspx
|- members.aspx
|- chanepassword.aspx
|- deletemember.aspx
|- issue.aspx
|- returnbook.aspx
|- memberslist.aspx
|- searchbooks.aspx
|- web.config
|- web.sitemap
|- updatemembers.aspx
|- logout.aspx

Operations and related files


The following table lists operations and associated objects and files.
Operation

Files

Login

login.aspx

Logout

logout.aspx

Delete Member

deletemember.aspx

Master page of all

Masterpage.master

Home Page

Default.aspx

Change password

changepassword.aspx

Add Title

addtitle.aspx

Add Member

addmember.aspx

Iseue of book

issue.aspx

Return of book

returnbook.aspx

Search books

searchbooks.aspx

Update Members

updatemembers.aspx

Member Information memberinfo.aspx


List of books

books.aspx

Structure of Tables
USERS Table
uname - varchar(10)
pwd - varchar(10)
fullname - varchar(30)

SUBJECTS Table
subcode - varchar(10)
subname - varchar(30)
di - datetime

MEMBERS Table
mid - int
mname - varchar(30)
depositamt - int
djoin - datetime
email - varchar(40)
occupation - varchar(50)

TITLES Table
tid - int
title - varchar(30)
subcode - varchar(10)
authors - varchar(50)
price - int
dp - datetime
publishers - varchar(30)
status - char(1)

ISSUES Table
tid - int
mid - int
di - datetime
issuedby - varchar(10)

RETURNS Table
tid - int
mid - int
di - datetime
dr - datetime
issuedby - varchar(10)
returnedto - varchar(10)
fineamt - int

Steps to download, deploy and run this project


The following are the steps to related to be taken to run the existing part of the
application :
761.
Download lm.zip and unzip it into any directory in your system. (For example if
you extract to d:\ then it will create a directory lm in d:\.
762.
Open Visual Web Developer 2005 Express Edition.
763.
Open the project from the directory into which you extracted project.For example,
d:\lm
764.
Add SQL Database file to your project and create necessary tables as shown
above.
765.
766.
767.
768.
769.
770.
771.
772.
773.
774.
775.
776.
777.

Create issuebook and returnbook procedures as shown below.


ALTER PROCEDURE IssueBook
(
@tid int,
@mid int,
@di datetime,
@issuedby varchar(10)
)
AS
declare @nbooks int
/* check titles availablity */

if not exists( select * from titles where tid = @tid and status
'a')
778. begin
779.
raiserror('Title is not present or not available',15,1)
780.
return
781. end

782.
783. /* check members availablity */
784. if not exists (select * from members where mid = @mid )
785.
begin

786.
787.
788.
789.
790.
791.
792.
793.
794.
795.
796.
797.
798.
799.
800.
801.
802.
803.
804.
805.
806.
807.
808.
809.
810.
811.
812.
813.

raiserror('Invalid member id!',15,1)


return
end

ALTER PROCEDURE ReturnBook


(
@tid int,
@dr datetime,
@user varchar(10)
)
AS
declare @fine int
declare @mid int
declare @issuedby varchar(10)
declare @di datetime

/* check tid is valid */


if not exists (select * from issues where tid = @tid)
begin
raiserror('Title is not in the issued titles!',15,1)
return
end

/* calculate fine */
select @fine=case
when datediff(dd,di,getdate()) > 15 then
datediff(dd,di,getdate())-15
814.
else 0
815.
end
816. from issues where tid = @tid;

817.
818.
819.
820.
821.
822.
823.
824.
825.
826.
827.
828.
829.
830.

select @mid = mid, @di = di, @issuedby=issuedby


from issues where tid = @tid;
/* insert a row into returns */
begin tran
insert into returns
values(@tid,@mid,@di,@dr,@issuedby,@user,@fine);
delete from issues where tid = @tid;
update titles set status ='a'
where tid = @tid

831.
832. commit tran
833.
834.
Goto Solution Explorer and make default.aspx the startup page.
835.

Run project from VWD 2005 Express Edition.

836.

You should see login.aspx page.

Library-Management-System-asp.net-project
This web application is used to handle typical operations in a library system.
This application is developed for librarians. Issuing book, returning book, adding member, and
searching for books are some of the major operations of this application.

Technologies and Products used

ASP.NET 2.0
C# language

Visual Web Developer 2005 Express Edition

SQL Server 2005 Express Edition

File Structure
The following is the directory structure of this application.
exam
|- App_Data
|
|-Database.mdf
|- App_Code
|
|-Database.cs
|- App_Themes
|
|-style.css
|- all
|
|-LibraryService.asmx
|- photos (this directory contains .jpg files of members)
|- default.aspx
|- login.aspx
|- addtitle.aspx
|- addmember.aspx
|- Masterpage.master
|- memberinfo.aspx
|- members.aspx
|- chanepassword.aspx
|- deletemember.aspx
|- issue.aspx

|||||||-

returnbook.aspx
memberslist.aspx
searchbooks.aspx
web.config
web.sitemap
updatemembers.aspx
logout.aspx

Operations and related files


The following table lists operations and associated objects and files.
Operation

Files

Login

login.aspx

Logout

logout.aspx

Delete Member

deletemember.aspx

Master page of all

Masterpage.master

Home Page

Default.aspx

Change password

changepassword.aspx

Add Title

addtitle.aspx

Add Member

addmember.aspx

Iseue of book

issue.aspx

Return of book

returnbook.aspx

Search books

searchbooks.aspx

Update Members

updatemembers.aspx

Member Information memberinfo.aspx


List of books

books.aspx

Structure of Tables
USERS Table
uname - varchar(10)
pwd - varchar(10)
fullname - varchar(30)

SUBJECTS Table
subcode - varchar(10)
subname - varchar(30)

di - datetime

MEMBERS Table
mid - int
mname - varchar(30)
depositamt - int
djoin - datetime
email - varchar(40)
occupation - varchar(50)

TITLES Table
tid - int
title - varchar(30)
subcode - varchar(10)
authors - varchar(50)
price - int
dp - datetime
publishers - varchar(30)
status - char(1)

ISSUES Table
tid - int
mid - int
di - datetime
issuedby - varchar(10)

RETURNS Table
tid - int
mid - int
di - datetime
dr - datetime
issuedby - varchar(10)
returnedto - varchar(10)
fineamt - int

Steps to download, deploy and run this project


The following are the steps to related to be taken to run the existing part of the
application :
837.
Download lm.zip and unzip it into any directory in your system. (For example if
you extract to d:\ then it will create a directory lm in d:\.
838.
Open Visual Web Developer 2005 Express Edition.
839.
Open the project from the directory into which you extracted project.For example,
d:\lm

840.
Add SQL Database file to your project and create necessary tables as shown
above.
841.
842.
843.
844.
845.
846.
847.
848.
849.
850.
851.
852.
853.

Create issuebook and returnbook procedures as shown below.


ALTER PROCEDURE IssueBook
(
@tid int,
@mid int,
@di datetime,
@issuedby varchar(10)
)
AS
declare @nbooks int
/* check titles availablity */

if not exists( select * from titles where tid = @tid and status
'a')
854. begin
855.
raiserror('Title is not present or not available',15,1)
856.
return
857. end

858.
859.
860.
861.
862.
863.
864.
865.
866.
867.
868.
869.
870.
871.
872.
873.
874.
875.
876.
877.
878.
879.
880.
881.

/* check members availablity */


if not exists (select * from members where mid = @mid )
begin
raiserror('Invalid member id!',15,1)
return
end

ALTER PROCEDURE ReturnBook


(
@tid int,
@dr datetime,
@user varchar(10)
)
AS
declare @fine int
declare @mid int
declare @issuedby varchar(10)
declare @di datetime

/* check tid is valid */


if not exists (select * from issues where tid = @tid)

882.
begin
883.
raiserror('Title is not in the issued titles!',15,1)
884.
return
885.
end
886.
887. /* calculate fine */
888. select @fine=case
889.
when datediff(dd,di,getdate()) > 15 then
datediff(dd,di,getdate())-15
else 0
end
from issues where tid = @tid;

890.
891.
892.
893.
894.
895.
896.
897.
898.
899.
900.
901.
902.
903.
904.
905.
906.
907.
908.
909.
910.

select @mid = mid, @di = di, @issuedby=issuedby


from issues where tid = @tid;
/* insert a row into returns */
begin tran
insert into returns
values(@tid,@mid,@di,@dr,@issuedby,@user,@fine);
delete from issues where tid = @tid;
update titles set status ='a'
where tid = @tid
commit tran

Goto Solution Explorer and make default.aspx the startup page.

911.

Run project from VWD 2005 Express Edition.

912.

You should see login.aspx page.

Library-Management-System-asp.net-project
This web application is used to handle typical operations in a library system.
This application is developed for librarians. Issuing book, returning book, adding member, and
searching for books are some of the major operations of this application.

Technologies and Products used

ASP.NET 2.0
C# language

Visual Web Developer 2005 Express Edition

SQL Server 2005 Express Edition

File Structure
The following is the directory structure of this application.
exam
|- App_Data
|
|-Database.mdf
|- App_Code
|
|-Database.cs
|- App_Themes
|
|-style.css
|- all
|
|-LibraryService.asmx
|- photos (this directory contains .jpg files of members)
|- default.aspx
|- login.aspx
|- addtitle.aspx
|- addmember.aspx
|- Masterpage.master
|- memberinfo.aspx
|- members.aspx
|- chanepassword.aspx
|- deletemember.aspx
|- issue.aspx
|- returnbook.aspx
|- memberslist.aspx
|- searchbooks.aspx
|- web.config
|- web.sitemap
|- updatemembers.aspx
|- logout.aspx

Operations and related files


The following table lists operations and associated objects and files.
Operation

Files

Login

login.aspx

Logout

logout.aspx

Delete Member

deletemember.aspx

Master page of all

Masterpage.master

Home Page

Default.aspx

Change password

changepassword.aspx

Add Title

addtitle.aspx

Add Member

addmember.aspx

Iseue of book

issue.aspx

Return of book

returnbook.aspx

Search books

searchbooks.aspx

Update Members

updatemembers.aspx

Member Information memberinfo.aspx


List of books

books.aspx

Structure of Tables
USERS Table
uname - varchar(10)
pwd - varchar(10)
fullname - varchar(30)

SUBJECTS Table
subcode - varchar(10)
subname - varchar(30)
di - datetime

MEMBERS Table
mid - int
mname - varchar(30)
depositamt - int
djoin - datetime
email - varchar(40)
occupation - varchar(50)

TITLES Table
tid - int
title - varchar(30)
subcode - varchar(10)
authors - varchar(50)
price - int
dp - datetime
publishers - varchar(30)
status - char(1)

ISSUES Table
tid - int
mid - int
di - datetime
issuedby - varchar(10)

RETURNS Table
tid - int
mid - int
di - datetime
dr - datetime
issuedby - varchar(10)
returnedto - varchar(10)
fineamt - int

Steps to download, deploy and run this project


The following are the steps to related to be taken to run the existing part of the
application :
913.
Download lm.zip and unzip it into any directory in your system. (For example if
you extract to d:\ then it will create a directory lm in d:\.
914.
Open Visual Web Developer 2005 Express Edition.
915.
Open the project from the directory into which you extracted project.For example,
d:\lm
916.
Add SQL Database file to your project and create necessary tables as shown
above.
917.
918.
919.
920.
921.
922.
923.
924.
925.
926.
927.
928.
929.

Create issuebook and returnbook procedures as shown below.


ALTER PROCEDURE IssueBook
(
@tid int,
@mid int,
@di datetime,
@issuedby varchar(10)
)
AS
declare @nbooks int
/* check titles availablity */

if not exists( select * from titles where tid = @tid and status
'a')
930. begin
931.
raiserror('Title is not present or not available',15,1)

932.
933.
934.
935.
936.
937.
938.
939.
940.
941.
942.
943.
944.
945.
946.
947.
948.
949.
950.
951.
952.
953.
954.
955.
956.
957.
958.
959.
960.
961.
962.
963.
964.
965.

return
end
/* check members availablity */
if not exists (select * from members where mid = @mid )
begin
raiserror('Invalid member id!',15,1)
return
end

ALTER PROCEDURE ReturnBook


(
@tid int,
@dr datetime,
@user varchar(10)
)
AS
declare @fine int
declare @mid int
declare @issuedby varchar(10)
declare @di datetime

/* check tid is valid */


if not exists (select * from issues where tid = @tid)
begin
raiserror('Title is not in the issued titles!',15,1)
return
end

/* calculate fine */
select @fine=case
when datediff(dd,di,getdate()) > 15 then
datediff(dd,di,getdate())-15
966.
else 0
967.
end
968. from issues where tid = @tid;

969.
970.
971.
972.
973.
974.
975.
976.

select @mid = mid, @di = di, @issuedby=issuedby


from issues where tid = @tid;
/* insert a row into returns */
begin tran
insert into returns

977.
978.
979.
980.
981.
982.
983.
984.
985.
986.

values(@tid,@mid,@di,@dr,@issuedby,@user,@fine);
delete from issues where tid = @tid;
update titles set status ='a'
where tid = @tid
commit tran

Goto Solution Explorer and make default.aspx the startup page.

987.

Run project from VWD 2005 Express Edition.

988.

You should see login.aspx page.

Library-Management-System-asp.net-project
This web application is used to handle typical operations in a library system.
This application is developed for librarians. Issuing book, returning book, adding member, and
searching for books are some of the major operations of this application.

Technologies and Products used

ASP.NET 2.0
C# language

Visual Web Developer 2005 Express Edition

SQL Server 2005 Express Edition

File Structure
The following is the directory structure of this application.
exam
|- App_Data
|
|-Database.mdf
|- App_Code
|
|-Database.cs
|- App_Themes
|
|-style.css
|- all
|
|-LibraryService.asmx
|- photos (this directory contains .jpg files of members)
|- default.aspx
|- login.aspx

|||||||||||||||-

addtitle.aspx
addmember.aspx
Masterpage.master
memberinfo.aspx
members.aspx
chanepassword.aspx
deletemember.aspx
issue.aspx
returnbook.aspx
memberslist.aspx
searchbooks.aspx
web.config
web.sitemap
updatemembers.aspx
logout.aspx

Operations and related files


The following table lists operations and associated objects and files.
Operation

Files

Login

login.aspx

Logout

logout.aspx

Delete Member

deletemember.aspx

Master page of all

Masterpage.master

Home Page

Default.aspx

Change password

changepassword.aspx

Add Title

addtitle.aspx

Add Member

addmember.aspx

Iseue of book

issue.aspx

Return of book

returnbook.aspx

Search books

searchbooks.aspx

Update Members

updatemembers.aspx

Member Information memberinfo.aspx


List of books

books.aspx

Structure of Tables
USERS Table
uname - varchar(10)

pwd - varchar(10)
fullname - varchar(30)

SUBJECTS Table
subcode - varchar(10)
subname - varchar(30)
di - datetime

MEMBERS Table
mid - int
mname - varchar(30)
depositamt - int
djoin - datetime
email - varchar(40)
occupation - varchar(50)

TITLES Table
tid - int
title - varchar(30)
subcode - varchar(10)
authors - varchar(50)
price - int
dp - datetime
publishers - varchar(30)
status - char(1)

ISSUES Table
tid - int
mid - int
di - datetime
issuedby - varchar(10)

RETURNS Table
tid - int
mid - int
di - datetime
dr - datetime
issuedby - varchar(10)
returnedto - varchar(10)
fineamt - int

Steps to download, deploy and run this project


The following are the steps to related to be taken to run the existing part of the
application :

989.
Download lm.zip and unzip it into any directory in your system. (For example if
you extract to d:\ then it will create a directory lm in d:\.
990.
Open Visual Web Developer 2005 Express Edition.
991.
Open the project from the directory into which you extracted project.For example,
d:\lm
992.
Add SQL Database file to your project and create necessary tables as shown
above.
993.

Create issuebook and returnbook procedures as shown below.

994. ALTER PROCEDURE IssueBook


995.
(
996.
@tid int,
997.
@mid int,
998.
@di datetime,
999.
@issuedby varchar(10)
1000.
)
1001. AS
1002. declare @nbooks int
1003. /* check titles availablity */
1004.
1005. if not exists( select * from titles where tid = @tid and status
'a')
1006. begin
1007.
raiserror('Title is not present or not available',15,1)
1008.
return
1009. end

1010.
1011. /* check members availablity */
1012. if not exists (select * from members where mid = @mid )
1013. begin
1014.
raiserror('Invalid member id!',15,1)
1015.
return
1016. end
1017.
1018.
1019. ALTER PROCEDURE ReturnBook
1020.
(
1021.
@tid int,
1022.
@dr datetime,
1023.
@user varchar(10)
1024.
)
1025. AS
1026. declare @fine int
1027. declare @mid int

1028. declare @issuedby varchar(10)


1029. declare @di datetime
1030.
1031.
1032. /* check tid is valid */
1033. if not exists (select * from issues where tid = @tid)
1034. begin
1035.
raiserror('Title is not in the issued titles!',15,1)
1036.
return
1037. end
1038.
1039. /* calculate fine */
1040. select @fine=case
1041.
when datediff(dd,di,getdate()) > 15 then
datediff(dd,di,getdate())-15
1042.
else 0
1043.
end
1044. from issues where tid = @tid;

1045.
1046. select @mid = mid, @di = di, @issuedby=issuedby
1047. from issues where tid = @tid;
1048.
1049. /* insert a row into returns */
1050.
1051. begin tran
1052. insert into returns
1053. values(@tid,@mid,@di,@dr,@issuedby,@user,@fine);
1054.
1055. delete from issues where tid = @tid;
1056.
1057. update titles set status ='a'
1058. where tid = @tid
1059.
1060. commit tran
1061.
1062.
Goto Solution Explorer and make default.aspx the startup page.
1063.

Run project from VWD 2005 Express Edition.

1064.

You should see login.aspx page.

Library-Management-System-asp.net-project

This web application is used to handle typical operations in a library system.


This application is developed for librarians. Issuing book, returning book, adding member, and
searching for books are some of the major operations of this application.

Technologies and Products used

ASP.NET 2.0
C# language

Visual Web Developer 2005 Express Edition

SQL Server 2005 Express Edition

File Structure
The following is the directory structure of this application.
exam
|- App_Data
|
|-Database.mdf
|- App_Code
|
|-Database.cs
|- App_Themes
|
|-style.css
|- all
|
|-LibraryService.asmx
|- photos (this directory contains .jpg files of members)
|- default.aspx
|- login.aspx
|- addtitle.aspx
|- addmember.aspx
|- Masterpage.master
|- memberinfo.aspx
|- members.aspx
|- chanepassword.aspx
|- deletemember.aspx
|- issue.aspx
|- returnbook.aspx
|- memberslist.aspx
|- searchbooks.aspx
|- web.config
|- web.sitemap
|- updatemembers.aspx
|- logout.aspx

Operations and related files


The following table lists operations and associated objects and files.
Operation

Files

Login

login.aspx

Logout

logout.aspx

Delete Member

deletemember.aspx

Master page of all

Masterpage.master

Home Page

Default.aspx

Change password

changepassword.aspx

Add Title

addtitle.aspx

Add Member

addmember.aspx

Iseue of book

issue.aspx

Return of book

returnbook.aspx

Search books

searchbooks.aspx

Update Members

updatemembers.aspx

Member Information memberinfo.aspx


List of books

books.aspx

Structure of Tables
USERS Table
uname - varchar(10)
pwd - varchar(10)
fullname - varchar(30)

SUBJECTS Table
subcode - varchar(10)
subname - varchar(30)
di - datetime

MEMBERS Table
mid - int
mname - varchar(30)
depositamt - int
djoin - datetime
email - varchar(40)
occupation - varchar(50)

TITLES Table

tid - int
title - varchar(30)
subcode - varchar(10)
authors - varchar(50)
price - int
dp - datetime
publishers - varchar(30)
status - char(1)

ISSUES Table
tid - int
mid - int
di - datetime
issuedby - varchar(10)

RETURNS Table
tid - int
mid - int
di - datetime
dr - datetime
issuedby - varchar(10)
returnedto - varchar(10)
fineamt - int

Steps to download, deploy and run this project


The following are the steps to related to be taken to run the existing part of the
application :
1065.
Download lm.zip and unzip it into any directory in your system. (For example if
you extract to d:\ then it will create a directory lm in d:\.
1066.
Open Visual Web Developer 2005 Express Edition.
1067.
Open the project from the directory into which you extracted project.For example,
d:\lm
1068.
Add SQL Database file to your project and create necessary tables as shown
above.
1069.

Create issuebook and returnbook procedures as shown below.

1070. ALTER PROCEDURE IssueBook


1071.
(
1072.
@tid int,
1073.
@mid int,
1074.
@di datetime,
1075.
@issuedby varchar(10)
1076.
)

1077. AS
1078. declare @nbooks int
1079. /* check titles availablity */
1080.
1081. if not exists( select * from titles where tid = @tid and status
'a')
1082. begin
1083.
raiserror('Title is not present or not available',15,1)
1084.
return
1085. end

1086.
1087. /* check members availablity */
1088. if not exists (select * from members where mid = @mid )
1089. begin
1090.
raiserror('Invalid member id!',15,1)
1091.
return
1092. end
1093.
1094.
1095. ALTER PROCEDURE ReturnBook
1096.
(
1097.
@tid int,
1098.
@dr datetime,
1099.
@user varchar(10)
1100.
)
1101. AS
1102. declare @fine int
1103. declare @mid int
1104. declare @issuedby varchar(10)
1105. declare @di datetime
1106.
1107.
1108. /* check tid is valid */
1109. if not exists (select * from issues where tid = @tid)
1110. begin
1111.
raiserror('Title is not in the issued titles!',15,1)
1112.
return
1113. end
1114.
1115. /* calculate fine */
1116. select @fine=case
1117.
when datediff(dd,di,getdate()) > 15 then
datediff(dd,di,getdate())-15
1118.
else 0
1119.
end
1120. from issues where tid = @tid;

1121.
1122. select @mid = mid, @di = di, @issuedby=issuedby
1123. from issues where tid = @tid;
1124.
1125. /* insert a row into returns */
1126.
1127. begin tran
1128. insert into returns
1129. values(@tid,@mid,@di,@dr,@issuedby,@user,@fine);
1130.
1131. delete from issues where tid = @tid;
1132.
1133. update titles set status ='a'
1134. where tid = @tid
1135.
1136. commit tran
1137.
1138.
Goto Solution Explorer and make default.aspx the startup page.
1139.

Run project from VWD 2005 Express Edition.

1140.

You should see login.aspx page.

You might also like