The home page of the library management system is composed of a welcome message and bells university logo. It serves as the welcome screen to the users of the system. Below is the pictorial view of the home page
Figure 4.1 – Home Page
48 4.2 Login Page
The login page serves as an access point for existing users of the system. It allows users with username and password to access the system and carry out operations that are relevant to the user. It also allows new users to register for a username and password in order to gain access into the system. The username uniquely identifies each user of the system and the password is a string of characters used to authenticate the user or prove the identity of the user or access approval to gain access to resources or the system.
In case of a mismatch in the username and password, the system would display an error message “Login Failed. Please remember that passwords are case sensitive”.
Figure 4.2 – Login Page
49 4.3 Library Administrator
The library administrator holds the primary role of leadership in the library. In the library management system, the library administrator is responsible for administering user roles to different users of the system. The administrator is seen as a super user and has a better privilege than regular library staff and users. Below is a list of pages that can be viewed by the administrator:
1. USER MANAGEMENT 2. BOOK MANAGEMENT 3. TRANSACTION LOG 4. FINE PAYMENT 5. CLASSMARK BOOKS
USER MANAGEMENT: The user management page enables the library administrator to add new users and manage or view existing users. At the point of registration, each new user [student, teaching staff and library staff] is assigned a role to enable them carry out activities relevant to their role.
Figure 4.3 – User Management [STUDENT REGISTRATION]
50
Figure 4.4 – User Management [TEACHING STAFF REGISTRATION]
Figure 4.5 – User Management [LIBRARY STAFF REGISTRATION]
51
Figure 4.6 – User Management [LIST OF EXISTING MEMBERS]
Figure 4.7 – User Management [UPDATING EXISTING USER DETAILS]
52
BOOK MANAGEMENT: The book management page enables the library administrator to add new books and view the library stock.
Figure 4.8 – Book Management [BOOK REGISTRATION]
Figure 4.9a – Book Management [VIEW LIBRARY STOCK]
53
Figure 4.9b – Book Management [VIEW LIBRARY STOCK]
TRANSACTION LOG: The transaction log is a record of the activities carried out in the system, these activities include: user registration, book registration, issuing, renewing and returning of books, fine payment etc.
Figure 4.10 – Transaction Log
54
FINE PAYMENT: The fine payment page enables the library administrator to view fine records.
Figure 4.11a – Fine Records
Figure 4.11b – Fine Records [STUDENT FINE RECORDS]
55
Figure 4.11c – Fine Records [STAFF FINE RECORDS]
CLASSMARK BOOKS: The classmark books page enables the library administrator to classmark books.
Figure 4.12a – Classmark Books
56
Figure 4.12b – Classmark Books
4.4 Circulation Desk Staff
The circulation desk staff is responsible for registering users, issuing and discharging books, attending to the reservation requests of the students and teaching staff and fine payment.
Below is a list of pages that can be viewed by the circulation desk staff:
1. REGISTRATION 2. BOOK TRANSACTION 3. FINE PAYMENTS 4. RESERVATIONS 5. REMINDER
57
REGISTRATION: The registration page enables the circulation desk staff to register new users.
Figure 4.13 – Student Registration
Figure 4.14 – Teaching Staff Registration
58
BOOK TRANSACTION: The book transaction page enables the circulation desk staff to carry out the following transactions: issue book, renew book, return/discharge book and fine payment.
Figure 4.15a – Book Transaction
Figure 4.15b – Book Transaction [ISSUE BOOK]
59
Figure 4.15c – Book Transaction [FINE PAYMENT]
FINE PAYMENT: The fine payment page enables the circulation desk staff to view fine records.
Figure 4.16a – Fine Records
60
Figure 4.16b – Fine Records [STUDENT FINE RECORDS]
Figure 4.16c – Fine Records [STAFF FINE RECORDS]
61
RESERVATIONS: The reservations page enables the circulation desk staff to view reserved books made by students and staff.
Figure 4.17 – Reservations
REMINDER: The reminder page enables the circulation desk staff to send reminder messages in the form of an e-mail to users who have a day left to return possessed books.
Figure 4.18 – Reminder
62 4.5 Acquisition Staff
The acquisition staff is responsible for registering books, monitoring the library stock and sending notifications about new book arrivals to registered users. Below is a list of pages that can be viewed by the acquisition staff:
1. ADD BOOKS 2. VIEW STOCK 3. NOTIFICATION
ADD BOOKS: The add books page enables the acquisition staff to register/add new books to the system’s database.
Figure 4.19 – Book Registration
63
VIEW STOCK: The view stock page allows the acquisition staff to view the library stock [list of registered books].
Figure 4.20 – View Stock
NOTIFICATION: The notification page allows the acquisition staff to send notifications concerning new collections of books to the mailboxes of registered users.
Figure 4.21 – Notification
64 4.6 Library Users
The library users are those that make use of the library for the purpose of gaining knowledge and research. For the purpose of this project the library users are limited to the students and teaching staff of Bells University of Technology. Below is a list of pages that can be viewed by the teaching staff and students:
1. SEARCH 2. LIBRARY
SEARCH: The search page allows the students and staff to search for books in the library by title, subject and author.
Figure 4.22a – Library Search
65
Figure 4.22b – Library Search [BOOK DETAILS]
LIBRARY: The library page enables the students and staff to view the entire book collection in the library.
Figure 4.23a – Library Page
66
Figure 4.23b – Library Collection
4.7 Classification Staff
The classification staff is responsible for classifying the books in the library. The CLASSMARK BOOKS page is viewed by the classification staff.
Figure 4.24 – Classmark Books
67 4.8 E-Library Administrator
The e-library administrator is responsible for adding e-books.
Figure 4.25a – E-Book Registration
Figure 4.25b – E-Book Registration
68
CHAPTER FIVE
CONCLUSION AND RECOMMENDATION
5.1 Conclusion
What I have achieved in the course of this project is developing an online library management system that can automated the activities carried out in the various sections of the library. The implementation of an email service as stated on previous sections has been achieved. The system is able to carry out automated task such as the deletion of user reservations and adding defaulters to the defaulters list through the use of a windows service.
I have been able to study the current section of the readers’ service, collection and development and technical departments plus the e-library. I also reviewed various literatures on different library management systems. This project has been able to establish the use of a class library from iTextSharp to extract the metadata of pdf files to ease the registration process of e-books in the e-library. The module responsible for extracting e-book details was designed for pdf files only. The major challenge in the process of extracting e-book details from pdf files is that not all pdf files have a complete meta-data. As a result, the system will not be able to effectively extract and store the details of the e-books.
The report generation feature of the system enables the library staff in the readers’ service department and the collection and development department to generate reports in an excel format. This enables them to possess a printed copy of the generated reports.
Lastly, this project has been able to show an architectural design [four-tier system architecture]
of an online library management system using Microsoft Enterprise Library for database connectivity, iTextSharp Library for extraction pdf metadata and windows service to carry out automated tasks. The differences between my work and that of [Grant-Ezeronye, 2011] is that the developed system is a web-based management system. It possesses an emailing functionality for sending notifications and reminders. It is capable of carrying out automated tasks through the use of a windows service. The online library management system provides the functionality of extracting pdf details from the meta-date of pdf files and is able to record the various transactions or activities carried out in the library.
69
5.2 Recommendation
I hereby recommend the Bells University librarian to employ the use of this automated software to the University Library. The system will reduce the errors encountered, and the manual process involved in the library activities; and also to increase operation speed.
The online library management system only automates the activities carried out in the readers’
service department, collection and development department, technical department and the e-library. Processes like attending to non-members of the university, getting and arranging important newspaper clips and keeping record of serials could not be attended to.
I encounter the university to try and encourage the students and staff to carry out further research in the development of library automated systems that can overcome the limitation of the present online library management system. Upgrade approach of technology should be recognized, acknowledged and accepted since the Library resides in a University of Technology.
Students in lower levels can also improve on this system hereby making it their final year project.
70
References
1. Ashutosh Tripathi and Ashish Srivastava, 2012. “Online Library Management System”.
IOSR JOURNAL OF ENGINEERING (IOSRJEN). Pg. 180 – 186
2. Akazue Maureen and Ojeme Blessing, 2011. “Design of an Automated Library Management System for State Universities in Nigeria”. ASIAN JOURNAL OF INFORMATION TECHNOLOGY. Pg. 335 – 340
3. AllWords.com, 2013. “Definition of System Design” [Online]:
http://www.allwords.com/word-systems+design.html
4. Bhupendra, Shraddha Panwar and Vijay Vaishnav, 2011. “Online Library Management System”. Project Report, November 2011.
5. Bijesh Nair, 2011. “Online Library System”. Final year project report of Masters of Computer Application in G.V School of Engineering and Technology. April 2011.
6. Buena Vista University (2013), “Library Mission” [Online]:
http://www.bvu.edu/library/about_us/purpose.dot
7. Chelmsford Public Library (2013), “Objectives and Purposes of the Library” [Online]:
http://www.chelmsfordlibrary.org/library_info/policies/objectives.html 8. Dictionary.com, 2013. “Online Public Access Catalog” [Online]:
http://dictionary.reference.com/browse/Online+Public+Access+Catalog?s=t 9. Darren Adams, Sergey Begun, Andrew Fail, Shawn Halger and Franklin Lee, 2007.
“Library Management System: Design and Implementation”. Final year project, April 2007.
10. Dubberly Design Office, 2013. “System Design” [Online]:
http://www.dubberly.com/articles/what-is-systems-design.html 11. Flightsystems, 2013. “Purpose of System Design” [Online]:
http://flightsystems.org/system_design_definition.htm
12. Grant-Ezeronye G. C., 2011. “Development of a Library’s Readers’ Desk Management System”. Final year project submitted to the Department of Computer Science, June 2011.
13. HRSA (Health Resources and Services Administration), 2014. “System Implementation”
[Online]:
http://www.hrsa.gov/healthit/toolbox/HealthITAdoptiontoolbox/SystemImplementatio n/
14. Infoplease. The Columbia Electronic Encyclopedia, 6th Ed. - Columbia University Press (2013), “Library: Evolution” [Online]:
http://www.infoplease.com/encyclopedia/entertainment/library-evolution.html
71
15. M. Satish Kumar, 2012. “Online Library”. Final year project, July 2012.
16. N. Sivakumar, 2012. “International Library Management Systems”. INTERNATIONAL JOURNAL OF LIBRARY AND INFORMATION SCIENCE RESEARCH AND DEVELOPMENT. Pg.
35 - 47
17. Neelakandan. B, Duraisekar. S, Balasubramani.R, Srinivasa Ragavan.S (2010),
“Implementation of Automated Library Management System in the School of Chemistry Bharathidasan University using Koha Open Source Software”. INTERNATIONAL JOURNAL OF APPLIED ENGINEERING RESEARCH, DINDIGUL. Pg. 149 - 167
18. N.p., “System Implementation”, 2014. [Online]:
http://web.simmons.edu/~benoit/lis486/SystemsImplementation.html 19. N.p., “System Implementation”, 2014. [Online]:
http://www.uky.edu/~dsianita/695A&D/lecture5.html
20. Oxford Dictionaries, 2013. “Definition of Library in English”, Oxford University Press.
[Online]: http://oxforddictionaries.com/definition/english/library
21. Tan Chaur Chuan, 2010. “Library Management System”. Final year project submitted to the Department of School of Arts and Science, Campbell University, U.S.A
22. Wikipedia. Wikimedia Foundation (2013), “Library” [Online]:
http://en.wikipedia.org/wiki/Library
23. Wikipedia. Wikimedia Foundation (2013), “Library Management” [Online]:
http://en.wikipedia.org/wiki/Library_management
24. Wikipedia. Wikimedia Foundation (2013), “Library Catalog” [Online]:
http://en.wikipedia.org/wiki/Library_catalog
25. Wikipedia. Wikimedia Foundation (2013), “Online Public Access Catalog” [Online]:
http://en.wikipedia.org/wiki/Online_Public_Access_Catalog
26. Wikipedia. Wikimedia Foundation (2013), “Library Management System” [Online]:
http://en.wikipedia.org/wiki/Library_management_system
27. Wikipedia. Wikimedia Foundation (2013), “System Design” [Online]:
http://en.wikipedia.org/wiki/System_design
APPENDIX 1: SOURCE CODE
public partial class DesktopModules_LMS_Modules_Registration : PortalModuleBase {
//Resetting mulitple controls in the form
public void ResetControls(ControlCollection ctrls) {
ClosePanels(); public void ResetDropDownList() {
if(userCategoryDropDown.SelectedValue == "1") {
else if (userCategoryDropDown.SelectedValue == "2") {
protected void Page_Load(object sender, EventArgs e) {
studentCollegeDropDown.DataTextField = "college_name";
studentCollegeDropDown.DataValueField = "college_id";
studentCollegeDropDown.DataBind();
staffCollegeDropDown.DataSource = (DataTable)UserBLL.LoadCollege().ReturnObject;
staffCollegeDropDown.DataTextField = "college_name";
staffCollegeDropDown.DataValueField = "college_id";
staffCollegeDropDown.DataBind();
protected void studentRegistrationBtn_Click(object sender, EventArgs e) {
try
UserBEL.Instance.phone_number = personalPhoneNumberTextBox.Text;
UserBEL.Instance.home_phone_number = homePhoneNumberTextBox.Text;
UserBEL.Instance.home_address = addressTextBox.Text;
UserBEL.Instance.cos = categoryRadList.SelectedItem.Text;
UserBEL.Instance.user_id = matricNumberTextBox.Text;
UserBEL.Instance.others = (categoryRadList.SelectedItem.Text == "OTHERS") ? othersTextBox.Text : null;
UserBEL.Instance.user_level = Convert.ToInt32(levelDropDown.SelectedValue);
UserBEL.Instance.yoa = Convert.ToInt32(yoaDropDown.SelectedValue);
UserBEL.Instance.hostel = hallTextBox.Text;
UserBEL.Instance.room_number = roomNumberTextBox.Text;
UserBEL.Instance.nos = nosRadList.SelectedItem.Text;
UserBEL.Instance.user_picture = profilePicture.ImageUrl;
UserBEL.Instance.dor = dorLabel.Text;
break;
protected void staffRegisterBtn_Click(object sender, EventArgs e) {
UserBEL.Instance.phone_number = personalPhoneNumberTextBox.Text;
UserBEL.Instance.home_phone_number = homePhoneNumberTextBox.Text;
UserBEL.Instance.home_address = addressTextBox.Text;
UserBEL.Instance.user_status = statusDropDownList.SelectedValue;
UserBEL.Instance.cos = cosRadList.SelectedItem.Text;
UserBEL.Instance.user_id = staffIDTextBox.Text;
UserBEL.Instance.others = (cosRadList.SelectedItem.Text == "OTHERS") ? othersTextBox2.Text : null;
UserBEL.Instance.nos = null;
UserBEL.Instance.user_status = statusDropDownList.SelectedValue;
UserBEL.Instance.yoe = Convert.ToInt32(yoeDropDown.SelectedValue);
UserBEL.Instance.user_picture = profilePicture.ImageUrl;
UserBEL.Instance.dor = staffDorLb.Text;
messagePanel.Visible = true;
protected void userCategoryDropDown_SelectedIndexChanged(object sender, EventArgs e) {
if (userCategoryDropDown.SelectedItem.Text == "---Select---") {
ClosePanels();
generalDetailsPanel.Visible = true;
}
else if (userCategoryDropDown.SelectedItem.Text == "Student") {
ClosePanels();
generalDetailsPanel.Visible = true;
studentPanel.Visible = true;
firstNameValidator.ValidationGroup = "StudentDetails";
middleNameValidator.ValidationGroup = "StudentDetails";
lastNameValidator.ValidationGroup = "StudentDetails";
addressValidator.ValidationGroup = "StudentDetails";
emailValidator.ValidationGroup = "StudentDetails";
homePhoneNumberValidator.ValidationGroup = "StudentDetails";
personalPhoneNumberValidator.ValidationGroup = "StudentDetails";
dorLabel.Text = DateTime.Today.ToString("dd/MM/yyyy");
}
else if (userCategoryDropDown.SelectedItem.Text == "Teaching Staff") {
ClosePanels();
generalDetailsPanel.Visible = true;
staffPanel.Visible = true;
firstNameValidator.ValidationGroup = "StaffDetails";
middleNameValidator.ValidationGroup = "StaffDetails";
lastNameValidator.ValidationGroup = "StaffDetails";
addressValidator.ValidationGroup = "StaffDetails";
emailValidator.ValidationGroup = "StaffDetails";
homePhoneNumberValidator.ValidationGroup = "StaffDetails";
personalPhoneNumberValidator.ValidationGroup = "StaffDetails";
staffDorLb.Text = DateTime.Today.ToString("dd/MM/yyyy");
} }
protected void studentCancelBtn_Click(object sender, EventArgs e) {
Response.Redirect(Globals.NavigateURL());
}
protected void staffCancelBtn_Click(object sender, EventArgs e) {
Response.Redirect(Globals.NavigateURL());
}
protected void studentCollegeDropDown_SelectedIndexChanged(object sender, EventArgs e) {
if (studentCollegeDropDown.SelectedValue != "0") {
studentDepartmentDropDown.Enabled = true;
int college_id = Convert.ToInt32(studentCollegeDropDown.SelectedValue);
DataTable table = (DataTable)UserBLL.LoadDepartment(college_id).ReturnObject;
studentDepartmentDropDown.Items.Clear();
studentDepartmentDropDown.DataSource = table;
studentDepartmentDropDown.DataTextField = "department_name";
studentDepartmentDropDown.DataValueField = "department_id";
studentDepartmentDropDown.DataBind();
studentDepartmentDropDown.Items.Insert(0, new ListItem("---Select---", "0"));
}
protected void staffCollegeDropDown_SelectedIndexChanged(object sender, EventArgs e) {
if (staffCollegeDropDown.SelectedValue != "0") {
staffDepartmentDropDown.Enabled = true;
int college_id = Convert.ToInt32(staffCollegeDropDown.SelectedValue);
DataTable table = (DataTable)UserBLL.LoadDepartment(college_id).ReturnObject;
staffDepartmentDropDown.Items.Clear();
staffDepartmentDropDown.DataSource = table;
staffDepartmentDropDown.DataTextField = "department_name";
staffDepartmentDropDown.DataValueField = "department_id";
staffDepartmentDropDown.DataBind();
staffDepartmentDropDown.Items.Insert(0, new ListItem("---Select---", "0"));
}
protected void studentResetBtn_Click(object sender, EventArgs e) {
protected void staffResetBtn_Click(object sender, EventArgs e) {
public void CreatePortalUser() {
UserInfo objUser = new UserInfo();
string password = UserController.GeneratePassword(8).ToString();
var roleCtl = new RoleController();
objUser.FirstName = firstNameTextBox.Text;
objUser.LastName = lastNameTextBox.Text;
objUser.IsSuperUser = false;
objUser.Username = (userCategoryDropDown.SelectedValue == "1") ? matricNumberTextBox.Text : staffIDTextBox.Text;
objUser.DisplayName = firstNameTextBox.Text + " " + lastNameTextBox.Text;
objUser.Email = emailTextBox.Text;
objUser.PortalID = this.PortalId;
objUser.Membership.Password = password;
objUser.Membership.UpdatePassword = true; //enables users to change their password objUser.Membership.Approved = true;
objUser.Membership.IsOnLine = false;
UserCreateStatus objCreateStatus = UserController.CreateUser(ref objUser);
RoleInfo newRole = roleCtl.GetRoleByName(PortalId, "Library Users");
roleCtl.AddUserRole(PortalId, objUser.UserID, newRole.RoleID, DateTime.MinValue);
StringBuilder message = new StringBuilder();
message.AppendFormat("<table width='400px' align='center'>");
message.AppendFormat("<tr><td colspan='2' align='center'>User Details</td></tr>");
message.AppendFormat("<tr><td align='right'>First Name:</td><td align='left'>" + objUser.FirstName + "</td></tr>");
message.AppendFormat("<tr><td align='right'>Last Name:</td><td align='left'>" + objUser.LastName + "</td></tr>");
message.AppendFormat("<tr><td align='right'>Username:</td><td align='left'>" + objUser.Username + "</td></tr>");
message.AppendFormat("<tr><td align='right'>Password:</td><td align='left'>" + objUser.Membership.Password + "</td></tr>");
message.AppendFormat("</table>");
string msgBody = message.ToString();
bool mailStatus = SendMail.SendMailToUser(objUser.Email, "Registration Details", msgBody);
public void SendMailToUser(string user_email, string mailBody) {
try {
MailMessage mailMessage = new MailMessage("[email protected]", user_email);
mailMessage.Subject = "Registration Details";
mailMessage.IsBodyHtml = true;
mailMessage.Body = mailBody;
SmtpClient smtpClient = new SmtpClient();
smtpClient.Send(mailMessage);
protected void cosRadList_SelectedIndexChanged(object sender, EventArgs e) {
protected void categoryRadList_SelectedIndexChanged(object sender, EventArgs e) {
if (categoryRadList.SelectedItem.Text == "OTHERS") {
public partial class DesktopModules_LMS_Modules_AddBook : PortalModuleBase {
public void ResetControls(ControlCollection controls) {
foreach(Control ctrl in controls) {
if(ctrl is TextBox)
{
((TextBox)ctrl).Text = string.Empty;
}
if(ctrl is System.Web.UI.WebControls.Image) {
if (((System.Web.UI.WebControls.Image)ctrl).ID.Equals("bookThumbNail")) {
protected void Page_Load(object sender, EventArgs e) {
disciplineDropDown.DataSource = (DataTable)BookBLL.LoadDiscipline().ReturnObject;
disciplineDropDown.DataTextField = "discipline";
disciplineDropDown.DataValueField = "discipline_id";
disciplineDropDown.DataBind();
} }
protected void addBookBtn_Click(object sender, EventArgs e) {
BookBEL.Instance.copies = Convert.ToInt32(copiesTextBox.Text);
BookBEL.Instance.subject = subjectsTextBox.Text;
BookBEL.Instance.thumbnail = (bookThumbNail.ImageUrl == "~/book_thumbnail/no thumbnail.png") ? "~/book_thumbnail/no image.png" : bookThumbNail.ImageUrl;
BookBEL.Instance.isbn = isbnTextBox.Text;
BookBEL.Instance.book_description = descriptionTextBox.Text;
BookBEL.Instance.discipline_id = Convert.ToInt32(disciplineDropDown.SelectedValue);
BookBEL.Instance.subDiscipline_id = Convert.ToInt32(subDisciplineDropDown.SelectedValue);
BookBEL.Instance.book_type = Convert.ToInt32(bookTypeDropDown.SelectedValue);
BookBEL.Instance.book_location =
Convert.ToInt32(bookLocationDropDown.SelectedValue);
BookBEL.Instance.book_label = barcodeTextBox.Text;
BookBEL.Instance.vetted_by = vetTextBox.Text;
OperationResultInfo result = BookBLL.AddBooks(BookBEL.Instance.book_title, BookBEL.Instance.edition, BookBEL.Instance.author, BookBEL.Instance.publisher,
protected void cancelBtn_Click(object sender, EventArgs e) {
Response.Redirect(Globals.NavigateURL());
}
protected void resetBtn_Click(object sender, EventArgs e) {
ResetControls(Page.Controls);
Session.Clear();
Session.Abandon();
}
protected void disciplineDropDown_SelectedIndexChanged(object sender, EventArgs e) {
if(disciplineDropDown.SelectedValue != "0") {
subDisciplineDropDown.DataTextField = "sub-discipline";
subDisciplineDropDown.DataValueField = "sub-discipline_id";
subDisciplineDropDown.DataBind();
subDisciplineDropDown.Items.Insert(0, new ListItem("---Select---", "0"));
} else {
subDisciplineDropDown.Enabled = false;
subDisciplineDropDown.SelectedValue = "0"; } }
protected void acquisitionDropDown_SelectedIndexChanged(object sender, EventArgs e) {
if (acquisitionDropDown.SelectedItem.Text == "Purchase") {
protected void uploadBtn_Click(object sender, EventArgs e) {
thumbNailUploadPopUp.Show();
if (thumbNailUpload.HasFile) {
string extension = Path.GetExtension(thumbNailUpload.FileName);
if (extension.ToLower() == ".png" || extension.ToLower() == ".jpg") {
thumbNailUpload.PostedFile.SaveAs(Server.MapPath("~/book_thumbnail/") + thumbNailUpload.FileName);
protected void closeBtn_Click(object sender, EventArgs e)
bookThumbNail.ImageUrl = "~/book_thumbnail/no thumbnail.png";
} }
protected void bookThumbNail_Click(object sender, ImageClickEventArgs e) {
public partial class DesktopModules_LMS_Modules_FinePayment : PortalModuleBase {
protected void Page_Load(object sender, EventArgs e) {
protected void recordTypeDropDown_SelectedIndexChanged(object sender, EventArgs e) {
else if (Convert.ToInt32(recordTypeDropDown.SelectedValue) == 100)
{
else if (Convert.ToInt32(recordTypeDropDown.SelectedValue) == 200) {
messageLabel.Text = "An error occured. Contact Administrator if error persists";
} }
protected void studentRecordExportBtn_Click(object sender, EventArgs e) {
try {
GridViewToExcel.ExportToExcel(studentFineGrid, "Student Fine Records");
}
messageLabel.Text = "An error occured. Contact Administrator if error persists";
} }
protected void staffRecordExportBtn_Click(object sender, EventArgs e) {
try {
GridViewToExcel.ExportToExcel(staffFineGrid, "Staff Fine Records");
}
messageLabel.Text = "An error occured. Contact Administrator if error persists";
} } }
APPENDIX 2: TRANSACT-SQL STATEMENTS
IF EXISTS (SELECT userID FROM LMS_Users WHERE userID = @user_id) BEGIN
SELECT -100 END
ELSE BEGIN
INSERT INTO dbo.LMS_Users (first_name, middle_name, last_name, gender, phone_number, email, home_address, home_phone_number,
user_picture, college_id, department_id, library_department, user_level, user_status, user_category, userID, cos, nos, others, yoe, yoa, dor, hostel, room_number)
VALUES (
@first_name, @middle_name, @last_name, @gender,
@phone_number, @email, @home_address, @home_phone_number,
@user_picture, @college_id, @department_id,
@library_department, @user_level, @user_status, @user_category, @user_id, @cos, @nos,
@others, @yoe, @yoa, @dor, @hostel, @room_number )
SELECT 100 END
END
BOOK REGISTRATION
IF EXISTS(SELECT book_title FROM LMS_Books WHERE
[dbo].[LMS_RemoveAllSpaces](book_title) = [dbo].[LMS_RemoveAllSpaces](@book_title))
INSERT INTO dbo.LMS_Books (book_title, edition, author, publisher, year_of_publication, place_of_publication, copies, number_of_pages, subjects,
acquisition_type, book_price, cataloger, book_thumbnail, isbn, illustrated, classmark, book_description, discipline_id, subdiscipline_id, book_type, book_location, barcode_label, book_availability, vetted_by)
VALUES (@book_title, @edition, @author, @publisher,
@yop, @pop, @copies, NULL, @subjects, @acquisition_type,
@price,
@name_of_cataloger, @book_thumbnail, @isbn, NULL, NULL,
@description, @discipline_id, @subDiscipline_id, @book_type,
@book_location,
@barcode_label, 1, @vetted_by)
DECLARE @accession_number AS VARCHAR(50), @counter AS INTEGER, @book_id AS INTEGER
SELECT @book_id = book_id FROM dbo.LMS_Books WHERE book_title = @book_title SET @counter = 0
WHILE (@counter < @copies) BEGIN
SELECT @accession_number = CASE WHEN LEN(random_number) < 6 THEN REPLICATE('0', 6-LEN(random_number))+''+random_number ELSE random_number
END
FROM dbo.LMS_RandomNumber
UPDATE dbo.LMS_RandomNumber SET random_number = (CONVERT(INTEGER, random_number) + 1)
INSERT INTO LMS_AccessionNumber (book_id, accession_number) VALUES (@book_id, @accession_number)
SET @counter = @counter + 1 END
SELECT 100
IF EXISTS (SELECT * FROM LMS_Issued_Books WHERE accession_number = @accession_number AND userID = @user_id AND renew_status = 0 AND return_status = 0)
BEGIN
SELECT -100 END
ELSE BEGIN
INSERT INTO LMS_Issued_Books (accession_number, userID, issuer_username, date_issued, due_date, renew_status, return_status)
VALUES (@accession_number, @user_id, @issuer_username, @date_issued, @due_date,
@renew_status, @return_status) SELECT 100 END
END