Beispiel #1
0
        public IActionResult DeleteSynonym(int id)
        {
            if (id > 0)
            {
                var synonym = _generalService.DeleteSynonym(id);
                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"));
        }