protected void borrowButton_Click(object sender, EventArgs e) { MemberManager aMemberManager = new MemberManager(); Library aLibrary = new Library(); Member aMember = aMemberManager.Search(Convert.ToInt32(enterMemberNoTextBox.Text)); if (aMember != null) { aLibrary.MemberId = aMember.Id; aLibrary.BookId = Convert.ToInt32(selectBookDropDownList.SelectedValue); aLibrary.BorrowStatus = true; LibraryManager aLibraryManager = new LibraryManager(); aLibraryManager.BorrowBook(aLibrary); msg = "This book is borrowed by member whose id is : " + aMember.Number; } else { msg = "Not Exists"; } msgLabel.Text = msg; }