Ravi Kumanduri

Ravi Kumanduri

  • NA
  • 6
  • 541

Exception: the method .. (in Bot emulator)

Mar 7 2018 1:09 AM
When i am trying to test the bot in emulator and calling oil_details intent which is simply adding the product in the cart(which i defined it as a list), it is showing the text
 
"Exception: The method or operation is not implemented.
[File of type 'text/plain']"
 
Please help me out of this situation. Cant even figure out if the product is added in the adding_to_cart() function which i defined in another class AllMethods. And also not understanding what is wrong in the code. Thanks in advance.
 
[LuisIntent("oil_details")]
public async Task oil(IDialogContext context, LuisResult result)
{
DataTable final_table = new DataTable();
final_table.Columns.Add("Product_name", typeof(String));
final_table.Columns.Add("Price", typeof(int));
final_table.Rows.Add("L****", 500);
final_table.Rows.Add("L****_cream", 400);
final_table.Rows.Add("L****_oil", 800);
final_table.Rows.Add("colour_black_hair", 600);
final_table.Rows.Add("colour_blue_hair", 700);
string o = final_table.Rows[2]["Price"].ToString();
await context.PostAsync("L**** Oil for Dry hair.");
var message = context.MakeMessage();
var thumb = new HeroCard
{
Title = "L****  Oil",
Subtitle = "Rs 800",
Text = "df",
Images = new List { new CardImage("C:/Users/ISAdmin/Pictures/hair/product_details.jpg") },
Buttons = new List { new CardAction(ActionTypes.ImBack, "Add to Cart", value: "Add to Cart.") }
};
var attachment = thumb.ToAttachment();
message.Attachments.Add(attachment);
await context.PostAsync(message);
AllMethods adding = new AllMethods();
adding.adding_to_cart(o);
context.Done(null);
//context.Done();
}

Answers (1)