Example #1
0
 public void ChangeDiagnosis(Diagnosis diagnosis)
 {
     try
     {
         _context.Entry(diagnosis).State = EntityState.Modified;
         _context.SaveChanges();
     }
     catch (Exception e)
     {
         _loggerService.Error($"{e}");
         throw;
     }
 }
Example #2
0
 public void Update(Patient patient)
 {
     try
     {
         _context.Entry(patient).State = EntityState.Modified;
         _context.SaveChanges();
     }
     catch (Exception e)
     {
         _loggerService.Error($"{e}");
         throw;
     }
 }
Example #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;
            }
        }
Example #4
0
 public void Update(Doctor doctor)
 {
     _context.Entry(doctor).State = EntityState.Modified;
     _context.SaveChanges();
 }