public ActionResult Create(TbSePais collection)
        {
            if (!ModelState.IsValid)
            {
                return(View());
            }
            TbSePais pais;
            var      ids = User.Claims.FirstOrDefault(x => x.Type == ClaimTypes.NameIdentifier)?.Value;

            try
            {
                pais = PaisService.Create(collection);
                if (pais != null)
                {
                    TbSeMensaje msj = new TbSeMensaje("Has creado un Pais");
                    // Email("Se creo un Pais", msj);

                    this.IBitacoraMap.CrearBitacora(Convert.ToInt32(ids), "Creo un nuevo pais", pais.Id, "Pais");
                }
                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                throw;
            }
        }
Example #2
0
 public PaisViewModel DomainToViewModelSingle(TbSePais domain)
 {
     return(new PaisViewModel {
         Id = domain.Id,
         GentilicioEn = domain.GentilicioEn,
         GentilicioEs = domain.GentilicioEs,
         Inactivo = domain.Inactivo,
         Iniciales = domain.Iniciales,
         NombreEn = domain.NombreEn,
         NombreEs = domain.NombreEs
     });
 }
Example #3
0
 public PaisViewModel DomainToViewModelSingle(TbSePais domain)
 {
     throw new NotImplementedException();
 }
Example #4
0
 public TbSePais UpdatePais(TbSePais domain)
 {
     return(repository.Update(domain));
 }
Example #5
0
 public TbSePais Create(TbSePais collection)
 {
     return(repository.Save(collection));
 }