public ActionResult DeleteConfirmed(int id)
        {
            ExpedientePaciente expedientePaciente = db.ExpedientePaciente.Find(id);

            db.ExpedientePaciente.Remove(expedientePaciente);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "IDExpediente,CorreoPaciente,NombrePac,ApellidoPatPac,ApellidoMatPac,Sexo,Edad,Enfermedad,Peso,TipoDeSangre,TratamientosActuales,TratamientosAnteriores,CorreoDoc")] ExpedientePaciente expedientePaciente)
 {
     if (ModelState.IsValid)
     {
         db.Entry(expedientePaciente).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CorreoDoc      = new SelectList(db.RegistroDoctor, "CorreoDoc", "CorreoDoc", expedientePaciente.CorreoDoc);
     ViewBag.CorreoPaciente = new SelectList(db.RegistroPaciente, "CorreoPaciente", "CorreoPaciente", expedientePaciente.CorreoPaciente);
     return(View(expedientePaciente));
 }
        // GET: ExpedientePacientes/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ExpedientePaciente expedientePaciente = db.ExpedientePaciente.Find(id);

            if (expedientePaciente == null)
            {
                return(HttpNotFound());
            }
            return(View(expedientePaciente));
        }
        // GET: ExpedientePacientes/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ExpedientePaciente expedientePaciente = db.ExpedientePaciente.Find(id);

            if (expedientePaciente == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CorreoDoc      = new SelectList(db.RegistroDoctor, "CorreoDoc", "CorreoDoc", expedientePaciente.CorreoDoc);
            ViewBag.CorreoPaciente = new SelectList(db.RegistroPaciente, "CorreoPaciente", "CorreoPaciente", expedientePaciente.CorreoPaciente);
            return(View(expedientePaciente));
        }
Esempio n. 5
0
        public ActionResult Create([Bind(Include = "NombreUsuario,ApellidoPatPac,ApellidoMatPac,CorreoPaciente,ContraseñaPaciente")] RegistroPaciente registroPaciente)
        {
            if (ModelState.IsValid)
            {
                db.RegistroPaciente.Add(registroPaciente);
                db.SaveChanges();
                //return RedirectToAction("Index");

                //Cosa que ayudo Q


                ExpedientePaciente expedientePaciente = new ExpedientePaciente();
                expedientePaciente.CorreoPaciente = registroPaciente.CorreoPaciente;

                return(RedirectToAction("Create", "ExpedientePacientes", expedientePaciente));
            }
            //,registroPaciente.CorreoPaciente
            return(View(registroPaciente));
        }