Ejemplo n.º 1
0
        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"));
        }
Ejemplo n.º 2
0
 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"));
 }
Ejemplo n.º 3
0
 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"));
 }
Ejemplo n.º 4
0
 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"));
 }
Ejemplo n.º 5
0
 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"));
 }
Ejemplo n.º 6
0
        public Categoria Put([FromBody] Categoria cat)
        {
            _context.Entry <Categoria>(cat).State = EntityState.Modified;
            _context.SaveChanges();

            return(cat);
        }
Ejemplo n.º 7
0
        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());
            }
        }