Пример #1
0
        public ActionResult CadastrarContatos(ListaContatosViewModel Itens)
        {
            try
            {
                Itens.Status = true;
                AgendaContatosService.Add(Itens.ToDomain());

                return(RedirectToAction("Index", "Home"));
            }
            catch (Exception ex)
            {
                return(RedirectToAction("Index", "Home"));
            }
        }
Пример #2
0
        public ActionResult EditarContatos(ListaContatosViewModel Itens)
        {
            try
            {
                Itens.Status = true;
                AgendaContatosService.Update(Itens.ToDomain());


                return(RedirectToAction("Index", "Home"));
            }
            catch
            {
                return(RedirectToAction("Index", "Home"));
            }
        }