/// <summary> /// Resolves specified book to the givenm search Result /// </summary> /// <param name="book">Book object to update</param> /// <param name="item">Online result whose attributes to use</param> /// <remarks> /// Use the PreviousPageProperty to post objects from 1 page to another. /// Search for a book in DB, then get online results. /// Match one of those results to the book. /// </remarks> /// <see cref="searchOnlineMatches"/> public void resolveBookWithOnlineMatch(DBHelper.Book book, Klib.AWS.WSDL.Item item) { if (book.UniqueMap) throw new InvalidOperationException("Book already mapped!"); book.Author = ""; foreach (var author in item.ItemAttributes.Author) { book.Author += author + ", "; } book.Title = item.ItemAttributes.Title; book.UniqueMap = true; if (item.ItemAttributes.ISBN.Length == 10) book.ISBN10 = item.ItemAttributes.ISBN; else if (item.ItemAttributes.ISBN.Length == 13) book.ISBN13 = item.ItemAttributes.ISBN; //TODO : add code to update the book in the database. //book.updateFunction(); book.Update(); }
public Person(Klib.Person person) { // Constructs Public.Person from Klib.Person this.UID = person.UID; this.FirstName = person.FirstName; this.LastName = person.LastName; this.Location = person.Location; }
public Music(Klib.Music music) { // Constructs Public.Movie from Klib.Movie this.UID = music.UID; this.Track = music.Track; this.Artist = music.Artist; this.Album = music.Album; this.Owner = music.Owner; }
public Movie(Klib.Movie movie) { // Constructs Public.Movie from Klib.Movie this.UID = movie.UID; this.Title = movie.Title; this.Year = movie.Year; this.Owner = movie.Owner; }
public Book(Klib.Book book) { // Constructs Public.Book from Klib.Book this.UID = book.UID; this.Title = book.Title; this.Author = book.Author; this.ISBN10 = book.ISBN10; this.ISBN13 = book.ISBN13; this.Owner = book.Owner; this.UniqueMap = book.UniqueMap; }
public AWSInfo(Klib.AWSInfo awsInfo) { // Constructs Public.AWSawsInfo from Klib.AWSawsInfo this.UID = awsInfo.UID; this.Title = awsInfo.Title; this.Author = awsInfo.Author; this.ISBN10 = awsInfo.ISBN10; this.ISBN13 = awsInfo.ISBN13; this.URL = awsInfo.URL; }