コード例 #1
0
 public Invoice GetBasketInvoice()
 {
     Invoice currentInvoice = new Invoice("CompareInvoiceId", "CompareUserId");
     foreach (KeyValuePair<string, Item> itemIdAndItem in GetCurrentItems())
     {
         currentInvoice.InvoiceLines.Add(itemIdAndItem.Key,
                  new InvoiceLine(itemIdAndItem.Key, GetItems()[itemIdAndItem.Key].Description, itemIdAndItem.Value.Quantity));
     }
     return currentInvoice;
 }
コード例 #2
0
 public Dictionary<string, double> GetRecommendedItemsScore(Invoice compareInvoice, int n)
 {
     return suggestor.SuggestItems(compareInvoice, n);
     //return suggestor.GetRecommendedItems(compareInvoice);
 }
コード例 #3
0
 public List<Item> GetRecommendedItems(Invoice compareInvoice, int n)
 {
     Dictionary<string, double> recommendedScores = suggestor.SuggestItems(compareInvoice, n);
     List<Item> recommendedItems = new List<Item>();
     foreach (string id in recommendedScores.Keys)
     {
         recommendedItems.Add(GetItems()[id]);
     }
     return recommendedItems;
 }