public TransactionDetailModel(Transaction transaction) { Textbook textbook = TextbookHandler.getTextbook(transaction.TextbookId); SellerPost = PostHandler.getPost(transaction.SellerPostId); BuyerPost = PostHandler.getPost(transaction.BuyerPostId); this.BookTitle = textbook.BookTitle; this.ISBN = textbook.ISBN; this.Price = SellerPost.Price; this.FinalPrice = transaction.FinalPrice; this.Condition = SellerPost.BookCondition; this.CourseName = CourseHandler.getCourseName(textbook.CourseId); this.StorePrice = textbook.StorePrice; this.transaction = transaction; }