Example #1
0
        /// <summary>
        /// GET: /Home/GetDeseaseBySpeciality
        /// </summary>
        /// <returns>ask[ActionResult] with JSON contains list of Setences</returns>
        public async Task <ActionResult> LoadSuggestSentence(string searchQuery)
        {
            try
            {
                // Return list of sentences
                List <string> sentenceDic = await DictionaryUtil.LoadSuggestSentenceAsync(searchQuery.Trim());

                return(Json(sentenceDic, JsonRequestBehavior.AllowGet));
            }
            catch (Exception exception)
            {
                LoggingUtil.LogException(exception);
                return(RedirectToAction(Constants.SystemFailureHomeAction, Constants.ErrorController));
            }
        }