Ejemplo n.º 1
0
 public void addVisit(Visit visit, int patient_id)
 {
     var sess = SessionProvider.createSession();
     PatientService patientService = new PatientService();
     Patient p = patientService.getPatientById(patient_id);
     visit.patient = p;
     sess.Save(visit);
     sess.Flush();
 }
Ejemplo n.º 2
0
 public void update(int id, Visit v)
 {
     var sess = SessionProvider.createSession();
     IQuery q = sess.CreateQuery("FROM Visit where id = " + id.ToString());
     Visit visit = q.List<Domain.Visit>().First();
     visit.date = v.date;
     visit.complaint = v.complaint;
     visit.diagnosis = v.diagnosis;
     visit.tooth = v.tooth;
     visit.treatment = v.treatment;
     visit.cost = v.cost;
     visit.paid = v.paid;
     sess.Update(visit);
     sess.Flush();
 }