Exemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("NumFactura,Fecha,IdExpediente")] Factura factura)
        {
            if (id != factura.NumFactura)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(factura);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!FacturaExists(factura.NumFactura))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdExpediente"] = new SelectList(_context.Expediente, "IdExpediente", "IdExpediente", factura.IdExpediente);
            return(View(factura));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Edit(int id, [Bind("IdEnfermera,Nombre,Estado")] Enfermera enfermera)
        {
            if (id != enfermera.IdEnfermera)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(enfermera);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EnfermeraExists(enfermera.IdEnfermera))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(enfermera));
        }
Exemplo n.º 3
0
        public async Task <ActionResult <Signos> > PostSignos(Signos exp)
        {
            _context.Update(exp);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetSignos", new { id = exp.IdMedicion }, exp));
        }
Exemplo n.º 4
0
        public async Task <IActionResult> Edit(int id, [Bind("IdDoctor,NoColegiado,Nombre")] Doctor doctor)
        {
            if (id != doctor.IdDoctor)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(doctor);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DoctorExists(doctor.IdDoctor))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(doctor));
        }
Exemplo n.º 5
0
        public async Task <IActionResult> Edit(int id, [Bind("IdCita,IdPaciente,Estado,FechaInicio,FechaFinal")] Cita cita)
        {
            if (id != cita.IdCita)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(cita);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CitaExists(cita.IdCita))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdPaciente"] = new SelectList(_context.Paciente, "IdPaciente", "IdPaciente", cita.IdPaciente);
            return(View(cita));
        }
        public async Task <IActionResult> Edit(int id, [Bind("NumDetalle,NumFactura,NombreConsulta,Cantidad,Precio")] DetalleFac detalleFac)
        {
            if (id != detalleFac.NumDetalle)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(detalleFac);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DetalleFacExists(detalleFac.NumDetalle))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["NumFactura"] = new SelectList(_context.Factura, "NumFactura", "NumFactura", detalleFac.NumFactura);
            return(View(detalleFac));
        }
Exemplo n.º 7
0
        public async Task <IActionResult> Edit(int id, [Bind("IdDiagnostico,IdCie,IdConsulta")] Diagnostico diagnostico)
        {
            if (id != diagnostico.IdDiagnostico)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(diagnostico);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DiagnosticoExists(diagnostico.IdDiagnostico))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdConsulta"] = new SelectList(_context.Consulta, "IdConsulta", "IdConsulta", diagnostico.IdConsulta);
            return(View(diagnostico));
        }
Exemplo n.º 8
0
        public async Task <IActionResult> Edit(int id, [Bind("IdConsulta,IdDoctor,Asunto,MontoCaja,Fecha,TipoConsulta,IdExpediente,SeguroMedico,NombreCompania,PolizaSeguro,Relacion")] Consulta consulta)
        {
            if (id != consulta.IdConsulta)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(consulta);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ConsultaExists(consulta.IdConsulta))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdDoctor"]     = new SelectList(_context.Doctor, "IdDoctor", "IdDoctor", consulta.IdDoctor);
            ViewData["IdExpediente"] = new SelectList(_context.Expediente, "IdExpediente", "IdExpediente", consulta.IdExpediente);
            return(View(consulta));
        }
Exemplo n.º 9
0
        public async Task <IActionResult> Edit(int id, [Bind("IdOrden,NombreExamen,IdConsulta")] OrdenLab ordenLab)
        {
            if (id != ordenLab.IdOrden)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(ordenLab);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!OrdenLabExists(ordenLab.IdOrden))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdConsulta"] = new SelectList(_context.Consulta, "IdConsulta", "IdConsulta", ordenLab.IdConsulta);
            return(View(ordenLab));
        }
Exemplo n.º 10
0
        public async Task <IActionResult> Edit(int id, [Bind("IdDescripcion,IdReceta,Medicamento,Cantidad,Dosis")] DesReceta desReceta)
        {
            if (id != desReceta.IdDescripcion)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(desReceta);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DesRecetaExists(desReceta.IdDescripcion))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdReceta"] = new SelectList(_context.Receta, "IdReceta", "IdReceta", desReceta.IdReceta);
            return(View(desReceta));
        }
Exemplo n.º 11
0
        public async Task <IActionResult> Edit(int id, [Bind("IdMedicion,Estatura,Peso,Temp,Pulso,PresionArt,FrecCardiaca,FrecRespiratoria,IdEnfermera,Fecha,IdConsulta")] Signos signos)
        {
            if (id != signos.IdMedicion)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(signos);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SignosExists(signos.IdMedicion))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdConsulta"]  = new SelectList(_context.Consulta, "IdConsulta", "IdConsulta", signos.IdConsulta);
            ViewData["IdEnfermera"] = new SelectList(_context.Enfermera, "IdEnfermera", "IdEnfermera", signos.IdEnfermera);
            return(View(signos));
        }
Exemplo n.º 12
0
        public async Task <IActionResult> Edit(int id, [Bind("IdExpediente,FechaGen,IdPaciente")] Expediente expediente)
        {
            if (id != expediente.IdExpediente)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(expediente);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ExpedienteExists(expediente.IdExpediente))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdPaciente"] = new SelectList(_context.Paciente, "IdPaciente", "IdPaciente", expediente.IdPaciente);
            return(View(expediente));
        }
Exemplo n.º 13
0
        public async Task <IActionResult> Edit(int id, [Bind("IdAdmin,NombreAdmin,Email,Pass,Rol")] AdminLogin adminLogin)
        {
            if (id != adminLogin.IdAdmin)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try {
                    _context.Update(adminLogin);
                    await _context.SaveChangesAsync();
                } catch (DbUpdateConcurrencyException) {
                    if (!AdminLoginExists(adminLogin.IdAdmin))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(adminLogin));
        }
Exemplo n.º 14
0
        public async Task <IActionResult> Edit(int id, [Bind("IdPaciente,PrimerNombre,SegundoNombre,PrimerApellido,SegundoApellido,ApellidoCasada,Genero,FechaNacimiento,NoId,TipoEncargado,NombreEncargado,NumeroTel,IdAdmin")] Paciente paciente)
        {
            if (id != paciente.IdPaciente)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(paciente);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PacienteExists(paciente.IdPaciente))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdAdmin"] = new SelectList(_context.AdminLogin, "IdAdmin", "IdAdmin", paciente.IdAdmin);
            return(View(paciente));
        }