2016-07-18 13 views
0

Ich arbeite an der Bot-Framework-Technologie in einem meiner Projekte und möchte die Quittungskarte unter dem folgenden Link https://docs.botframework.com/en-us/csharp/builder/sdkreference/attachments.html zum Hinzufügen der Quittungskarte in meinem Projekt anzeigen.Nur ein Titelname, der auf mehreren Belegpositionen der Quittungskarte angezeigt wird

Dies ist mein Code über Quittungskarte.

#region Receipt Card 
      ConnectorClient connector = new ConnectorClient(new Uri(activity.ServiceUrl)); 
      Activity replyToConversation = activity.CreateReply("Welcome to **** Hotels."); 
      replyToConversation.Recipient = activity.From; 
      replyToConversation.Type = "message"; 
      replyToConversation.Attachments = new List<Attachment>(); 
      //List<CardImage> cardImages = new List<CardImage>(); 
      //cardImages.Add(new CardImage(url: "http://cache.*****.com/propertyimages/h/hydcy/hydcy_main02.jpg",alt: "The **** Hyderabad welcomes guests to the heart of the city centre with an array of amenities and comfortable, sophisticated lodging.")); 
      List<CardAction> cardButtons = new List<CardAction>(); 
      CardAction plButton = new CardAction() 
      { 
       Value = "http://www.*****.com/hotels/travel/hydcy-courtyard-hyderabad/", 
       Type = "openUrl", 
       Title = "Confirmed" 
      }; 
      cardButtons.Add(plButton); 
      ReceiptItem lineItem1 = new ReceiptItem() 
      { 
       Title = "***** Hyderabad", 
       Subtitle = "*****, Hyderabad, IN 500 080", 
       Text= "The **** Hyderabad welcomes guests to the heart of the city centre with an array of amenities and comfortable, sophisticated lodging." 
      }; 
      ReceiptItem lineItem2 = new ReceiptItem() 
      { 
       Title="Executive Deluxe,Guest Room", 
       Image = new CardImage(url: "http://cache.****.com/propertyimages/h/hydcy/hydcy_main02.jpg"), 
       Price = "7000.25", 
       Quantity = "1", 
       Tap = null 
      }; 

      List<ReceiptItem> receiptList = new List<ReceiptItem>(); 
      receiptList.Add(lineItem1); 
      receiptList.Add(lineItem2); 

      ReceiptCard plCard = new ReceiptCard() 
      { 
       Title = "**** Hyderabad Hotel Reservation Confirmed", 
       Buttons = cardButtons, 
       Items = receiptList, 
       Tax = "27.52", 
       Total = "7027.77"          
      }; 
      Attachment plAttachment = plCard.ToAttachment(); 
      replyToConversation.Attachments.Add(plAttachment); 
      var reply = await connector.Conversations.SendToConversationAsync(replyToConversation); 
      #endregion 

In der oben Ich habe den beiden Receipt des Artikel mit verschiedenen Titeln hinzugefügt, aber am Ende war es nur ein Titelname auf zwei Eingangsposition in meiner Receipt-Karte wie diese Abbildung unten angezeigt. enter image description here

Bitte sagen Sie mir, wie Sie das obige Problem lösen können.

Ich denke, es könnte einen Fehler in Bot Framework Channel Emulator sein.

-Kishore.

+0

Welchen Kanal verwenden Sie? – Lars

+0

Ich benutze keinen Kanal, nur habe ich meinen Bot im neuesten Bot-Emulator getestet. – Kishore1021

+0

Sieht aus wie ein Fehler. Untersuchung – Lars

Antwort

0

Vielen Dank für die Identifizierung eines Fehlers im Emulator. Es wurde behoben und sollte in Kürze veröffentlicht werden.

+0

Danke @Lars – Kishore1021