Esempio n. 1
0
        public async Task ProcessPaymentOption(IDialogContext context, IAwaitable <string> result)
        {
            switch (result.ToString())
            {
            case "R2000 deposit, 3/6/10 monthly installments":
                await context.PostAsync("You can choose how many installments (3. 6 or 10 months) you want to pay but the deposit is R2000");

                await context.PostAsync("E.g. if a course costs R6365, you pay R2000 depost upfront");

                await context.PostAsync("Then you may choose the installment plan () that you'll use to settle the remainder of R4365");

                break;

            case "Payment by credit card":
                await context.PostAsync("You need to pay the full cost of the course");

                break;

            default:
            case "Payment by cash":
                await context.PostAsync("You need to pay the full cost of the course and make a cash deposit onto our bank account");

                break;
            }
        }
        internal async Task ReadDataFromAdaptiveCard(IDialogContext context, IAwaitable <object> result)
        {
            var token = JToken.Parse(result.ToString());

            AdditionalInfo          = string.Empty;
            NosOfUserImpacted       = string.Empty;
            DisplayedErrorMessage   = string.Empty;
            TaskAttemptedWhileIssue = string.Empty;
            PinAndFullName          = string.Empty;


            //if (System.Convert.ToBoolean(token["postback"].Value<string>()))
            if (System.Convert.ToBoolean(token["ImBack"].Value <string>()))
            {
                JToken commandToken = JToken.Parse(result.ToString());
                string command      = commandToken["action"].Value <string>();

                if (command.ToLowerInvariant() == "PinAndFullName")
                {
                    PinAndFullName = commandToken["PinAndFullName"].Value <string>();
                }
                if (command.ToLowerInvariant() == "TaskAttemptedWhileIssue")
                {
                    TaskAttemptedWhileIssue = commandToken["TaskAttemptedWhileIssue"].Value <string>();
                }
                if (command.ToLowerInvariant() == "DisplayedErrorMessage")
                {
                    DisplayedErrorMessage = commandToken["DisplayedErrorMessage"].Value <string>();
                }
                if (command.ToLowerInvariant() == "NosOfUserImpacted")
                {
                    NosOfUserImpacted = commandToken["NosOfUserImpacted"].Value <string>();
                }
                if (command.ToLowerInvariant() == "AdditionalInfo")
                {
                    AdditionalInfo = commandToken["AdditionalInfo"].Value <string>();
                }
            }

            // await turnContext.SendActivityAsync($"You Selected {selectedcolor}", cancellationToken: cancellationToken);
        }
Esempio n. 3
0
        private async Task StoreJTSNumber(IDialogContext context, IAwaitable <object> result)
        {
            int JTSNumber = GetJTSNumber(result.ToString());

            if (JTSNumber > 0)
            {
                context.UserData.SetValue("JTSNumber", JTSNumber);
                await ConstructJTSLink(context);
            }
            else
            {
                PromptDialog.Text(context, StoreJTSNumber, "I am sorry! That was not a JTS number");
            }
        }
        public async Task ServiceMessageArabic(IDialogContext context, IAwaitable <string> result)
        {
            string transText = await Translation(result.ToString());

            if (transText.Contains("Complaint") || transText.Contains("service") || transText.Contains("issue"))
            {
                string Welcomemessage = "ما هي شكواك ؟";
                await context.PostAsync(Welcomemessage);
            }
            else if (transText.Contains("status"))
            {
                string Welcomemessage = "ما هو رقمك المرجعي للشكاوى ؟";
                await context.PostAsync(Welcomemessage);
            }
        }
Esempio n. 5
0
        private async Task StoreProductCode(IDialogContext context, IAwaitable <object> result)
        {
            int ProductCode = int.Parse(result.ToString());

            //int ProductCode = GetJTSNumber(result.ToString());
            if (ProductCode > 0)
            {
                context.UserData.SetValue("ProductCode", ProductCode);
                await ConstructJTSLink(context);
            }
            else
            {
                PromptDialog.Text(context, StoreProductCode, "I am sorry! That was not a Product Code");
            }
        }