Exemple #1
0
      public async Task EnterAnyComments(IDialogContext context, IAwaitable <object> result)
      {
          var    activity = await result as Activity;
          string Comments = activity.Text;

          RootDialog.UserResponse = Comments;
          VisitorData.Comment     = Comments;
          VisitorID = SQLManager.InsertVisitorData(UserData.UserID, VisitorData.ContactName, VisitorData.VisitorName, VisitorData.CompanyName, VisitorData.NeedParking, VisitorData.NoOfParkingTicket, VisitorData.BuildingName, VisitorData.StartDate, VisitorData.EndDate, VisitorData.Comment);
          RootDialog.BotResponse = SQLManager.GetVisitorBadgeQuestions(23);
          RootDialog.BotResponse = RootDialog.BotResponse.Replace("<ref. number>", VisitorID);
          await context.PostAsync(RootDialog.BotResponse);

          SQLManager.GetConversationData(UserData.UserID, RootDialog.UserResponse, RootDialog.BotResponse);

          this.SendMail(context, result);
      }