Ejemplo n.º 1
0
        public ActionResult Nuevo(ViewPersona model)
        {
            ServicioSoapClient client = new ServicioSoapClient();

            Persona per = new Persona();

            per.Nombre      = model.Nombre;
            per.Cedula      = model.Cedula;
            per.correo      = model.correo;
            per.contraseña  = model.correo;
            per.tipo_perfil = model.tipo_perfil;
            try
            {
                if (ModelState.IsValid)
                {
                    client.AgregaPersona(per);

                    return(Redirect("~/Persona/About"));
                }

                return(View(model));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }