示例#1
0
 private static async Task ShowAppointments(IBotContext context, List <Appointment> appointments)
 {
     if (appointments.Count == 0)
     {
         await context.PostAsync("You don't have any pending appointment");
     }
     else
     {
         var usuario = context.UserData.GetValue <User>("user");
         var message = context.MakeMessage();
         message.AddAppointmentsCard(usuario.Name, appointments);
         await context.PostAsync(message);
     }
 }
示例#2
0
 private static async Task ShowRefunds(IBotContext context, List <Refund> refunds)
 {
     if (refunds.Count == 0)
     {
         await context.PostAsync("You don't have any pending refund");
     }
     else
     {
         var message = context.MakeMessage();
         var user    = context.UserData.GetValue <User>("user");
         message.AddRefundCard(user.Name, refunds);
         await context.PostAsync(message);
     }
 }