public ActionResult Create([Bind(Include = "LugarId,Descripcion,PadreId")] LugarGeografico lugarGeografico)
        {
            if (ModelState.IsValid)
            {
                db.LugaresGeograficos.Add(lugarGeografico);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(lugarGeografico));
        }
Example #2
0
        public ActionResult Create([Bind(Include = "DocumentoId,Descripcion")] TipoDocumento tipoDocumento)
        {
            if (ModelState.IsValid)
            {
                db.TipoDocumentoes.Add(tipoDocumento);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tipoDocumento));
        }
Example #3
0
        public ActionResult Create([Bind(Include = "PosicionId,Nombre")] Posicion posicion)
        {
            if (ModelState.IsValid)
            {
                db.Posiciones.Add(posicion);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(posicion));
        }
Example #4
0
        public ActionResult Create([Bind(Include = "DominioId,Descripcion,PadreId,vigente,Abreviatura,Observacion")] ControlDominio controlDominio)
        {
            if (ModelState.IsValid)
            {
                db.ControlDominios.Add(controlDominio);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(controlDominio));
        }
Example #5
0
        public ActionResult Create([Bind(Include = "IntegranteEquipoId,id,PosicionId,EquipoId")] IntegranteEquipo integranteEquipo)
        {
            if (ModelState.IsValid)
            {
                db.IntegrantesEquipos.Add(integranteEquipo);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.EquipoId   = new SelectList(db.Equipos, "EquipoId", "Nombre", integranteEquipo.EquipoId);
            ViewBag.PosicionId = new SelectList(db.Posiciones, "PosicionId", "Nombre", integranteEquipo.PosicionId);
            return(View(integranteEquipo));
        }
Example #6
0
        public ActionResult Create([Bind(Include = "PesonaId,Nombres,Apellidos,Identificacion,DocumentoId")] PruebaPersona pruebaPersona)
        {
            if (ModelState.IsValid)
            {
                db.PruebaPersona.Add(pruebaPersona);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }



            ViewBag.DocumentoId = new SelectList(db.TipoDocumentoes, "DocumentoId", "Descripcion", pruebaPersona.DocumentoId);
            return(View(pruebaPersona));
        }
Example #7
0
        public ActionResult Create(Equipo equipo)
        {
            try
            {
                equipo.UsuarioCrea = User.Identity.GetUserId();
                if (ModelState.IsValid)
                {
                    db.Equipos.Add(equipo);
                    db.SaveChanges();
                    return(RedirectToAction("Index"));
                }
            } catch (Exception ex)
            {
            }

            return(View(equipo));
        }
Example #8
0
        public ActionResult RespuestaJugador(string estado, int idEquipo, string usuario)
        {
            IntegranteEquipo integrante = new IntegranteEquipo();


            if (estado == "Confirmado")
            {
                integrante.id         = usuario;
                integrante.EquipoId   = idEquipo;
                integrante.Estado     = estado;
                integrante.PosicionId = 3;


                if (ModelState.IsValid)
                {
                    db.IntegrantesEquipos.Add(integrante);
                    db.SaveChanges();
                }
            }

            return(View());
        }