Exemplo n.º 1
0
 public void ChangeDiagnosis(Diagnosis diagnosis)
 {
     try
     {
         _context.Entry(diagnosis).State = EntityState.Modified;
         _context.SaveChanges();
     }
     catch (Exception e)
     {
         _loggerService.Error($"{e}");
         throw;
     }
 }
Exemplo n.º 2
0
 public void Update(Patient patient)
 {
     try
     {
         _context.Entry(patient).State = EntityState.Modified;
         _context.SaveChanges();
     }
     catch (Exception e)
     {
         _loggerService.Error($"{e}");
         throw;
     }
 }
Exemplo n.º 3
0
        public void ChangePrescriptionStatus(int?id)
        {
            var prescription = _context.Prescriptions.SingleOrDefault(p => p.PrescriptionType.Id == id);

            try
            {
                if (prescription == null)
                {
                    return;
                }
                prescription.IsDone = !prescription.IsDone;
                _context.Entry(prescription).State = EntityState.Modified;
                _context.SaveChanges();
            }
            catch (Exception e)
            {
                _loggerService.Error($"{e}");
                throw;
            }
        }
Exemplo n.º 4
0
 public void Update(Doctor doctor)
 {
     _context.Entry(doctor).State = EntityState.Modified;
     _context.SaveChanges();
 }