Пример #1
0
        public IActionResult ConnectSynonym(int id, string text)
        {
            if (id > 0 && !String.IsNullOrEmpty(text))
            {
                var synonym = _generalService.ConnectSynonym(id, text);
                if (synonym.IsOk())
                {
                    return(RedirectToAction("Index"));
                }

                TempData["ErrorMessage"] = string.Format("Hiba a törlés során ({0} : {1})", synonym.Status, synonym.Message);
                return(RedirectToAction("Index"));
            }
            TempData["ErrorMessage"] = string.Format("Hiba a törlés során: Nem létező paraméter");
            return(RedirectToAction("Index"));
        }