Beispiel #1
0
        public IActionResult InteractionDelete(int id)
        {
            Interaction i = intRepo.GetInteractionById(id);

            if (i != null)
            {
                intRepo.DeleteInteraction(i);
            }
            else
            {
                ModelState.AddModelError("", "Interaction Not Found");
            }
            return(RedirectToAction("Interactions"));
        }
        public IActionResult Archive(int id)
        {
            Interaction i = intRepo.GetInteractionById(id);

            if (i != null)
            {
                intRepo.ChangeStatus(i, "Archived");
                return(RedirectToAction("Index"));
            }
            else
            {
                ModelState.AddModelError("", "User Not Found");
            }
            return(RedirectToAction("Index", intRepo.GetAllInteractions().ToList()));
        }