public ActionResult MedicalPrescriptionEdit(int id, medicalPrescription medicalPrescription) { db.Entry(medicalPrescription).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); Appointment a = db.Appointments.Where(u => u.idmedicalPrescription == id).FirstOrDefault(); Patient p = db.Patients.Find(a.cardNumber); medicalRecord m = db.medicalRecords.Find(p.idmedicalRecords); m.previousDiseases = m.previousDiseases + ", " + medicalPrescription.Diagnostic; m.date = a.Date; db.Entry(m).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); TempData["Success"] = "Changes successfully applied to your Medical Prescription!"; return(RedirectToAction("AppointmentIndex", "Appointment")); }
public ActionResult MedicalRecordEdit(int id, medicalRecord medicalRecord) { db.Entry(medicalRecord).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); TempData["Success"] = "Changes successfully applied to your Medical Record!"; return(RedirectToAction("PatientIndex", "Patient")); }
public ActionResult PatientEdit(string id, Patient patient) { db.Entry(patient).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); TempData["Success"] = "Changes successfully applied to the patient!"; return(RedirectToAction("PatientIndex")); }
public ActionResult MedicEdit(int id, Medic medic) { db.Entry(medic).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); TempData["Success"] = "Changes successfully applied to this Medic!"; return(RedirectToAction("MedicIndex")); }
public ActionResult AppointmentEdit(int id, Appointment appointment) { db.Entry(appointment).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); TempData["Success"] = "Changes successfully applied to your appointment!"; return(RedirectToAction("AppointmentIndex")); }
public Categoria Put([FromBody] Categoria cat) { _context.Entry <Categoria>(cat).State = EntityState.Modified; _context.SaveChanges(); return(cat); }
public ActionResult EditAssistant(int id, Assistant assistant) { try { db.Entry(assistant).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); TempData["Success"] = "Changes successfully applied to the assistant!"; return(RedirectToAction("IndexAssistant")); } catch { return(View()); } }