Пример #1
0
        public ActionResult Index(string create_welcome, string create_option, IVRModel model)
        {
            //TODO GET LIST OF option messages from the graph 
            //Maybe do this as a tuple of previous and next so user knows what he is doing
            //MAYBE show path in the viz
            //USER will add a message to the "next" message in that tuple

            TryUpdateModel(model);
            //TryUpdateModel(model.OptionMessage);
            if (!string.IsNullOrEmpty(create_welcome))
                CreateIVRWelcomeMessage(model.WelcomeMessage);

            if (!string.IsNullOrEmpty(create_option))
            {
                CreateIVRMessage(model.OptionMessage);

                //START from the ROOT node (WELCOME)
                AddMessageToWelcome(model.WelcomeMessage.id.Value, model.OptionMessage.id.Value);
            }

            //TODO get list of message linked to the welcome message
            //TODO add next message to message
            ModelState.Clear();
            return View(model);
        }
Пример #2
0
 public ActionResult Index(bool clear = false)
 {
     if (clear)
         ClearGraph();
     //TODO Get current welcome message for IVR
     IVRModel model = new IVRModel();
     model.WelcomeMessage = GetWelcomeMessage();
     return View(model);
 }