// prints the boorowed/returned book information to the console static void PrintBookTypeInfoToConsole(ServiceReference1.BookType Book, string action) { Console.WriteLine("--------------------------------"); Console.WriteLine("You " + action + ":"); Console.WriteLine("Singature: " + Book.Signature + ", title: " + Book.Title); Console.WriteLine("--------------------------------"); }
// send the borrow request to the service static void SendBorrowRequest(ServiceReference1.Service1Client proxy, int Signature) { ServiceReference1.BookType BorrowedBook = proxy.BorrowBook(Signature); PrintBookTypeInfoToConsole(BorrowedBook, "borrowed"); }
// send the return book request to the service static void SendReturnBookRequest(ServiceReference1.Service1Client proxy, int Signature) { ServiceReference1.BookType ReturnedBook = proxy.ReturnBook(Signature); PrintBookTypeInfoToConsole(ReturnedBook, "returned"); }