Esempio n. 1
0
        public TwiMLResult ConfirmDelete(string digits)
        {
            var response = new VoiceResponse();

            if (digits == "1")
            {
                ReviewRepository repo = new ReviewRepository();
                repo.DeleteOrderDetail((int)Session["OrderDetailID"]);
                response.Say("Item successfully Deleted.", voice: "alice", language: "en-US");
                response.Redirect("/Review/ReviewEntireOrder");
            }
            else if (digits == "2")
            {
                response.Say("Delete canceled.", voice: "alice", language: "en-US");
                int x = (int)Session["Index"];
                x++;
                Session["Index"] = x;
                response.Redirect("/Review/ReviewEntireOrder");
            }
            else
            {
                response.Say("Invalid choice", voice: "alice", language: "en-US");
                response.Redirect("/Review/ChooseDelete");
            }
            return(TwiML(response));
        }