public void ResultSaveTest() { string symptoms = GenString(_r.Next(9, 15)); string diagnosis = GenString(_r.Next(9, 15)); string medication = GenString(_r.Next(9, 15)); OpenConnection(); Results res = new Results(appointmentService.FindAll()[0].Id, DateTime.Now, symptoms, diagnosis, medication); Assert.IsInstanceOfType(resultService.Save(res), typeof(int)); CloseConnection(); }
public DoctorAppointmentsPage() { InitializeComponent(); _patientService = new PatientService(); _appoitmentService = new AppointmentService(); List<Appointment> list = _appoitmentService.FindAll();//GetNextAppointmentsByDoctorId(SessionData.UserSessionData.CurrentUserId); Dictionary<int, Patient> patientList = GetDictionary(_patientService.FindAll()); List<object> dataSet = null; if (list != null) { dataSet = new List<object>(); foreach (Appointment app in list) { Patient p = patientList[app.IdPacient]; dataSet.Add(new { AppointmentId = app.Id, Patient = p.FirstName + " " + p.LastName, Date = app.ScheduledDate.ToString(), Time = app.Time.ToString(), Symtoms = app.Symptoms.ToString() }); } this._cview = new PagingCollectionView(dataSet, 20); this.DataContext = this._cview; } else { buttonPrevious.IsEnabled = false; buttonNext.IsEnabled = false; } }
public DoctorAppointmentsPage() { InitializeComponent(); _patientService = new PatientService(); _appoitmentService = new AppointmentService(); List <Appointment> list = _appoitmentService.FindAll();//GetNextAppointmentsByDoctorId(SessionData.UserSessionData.CurrentUserId); Dictionary <int, Patient> patientList = GetDictionary(_patientService.FindAll()); List <object> dataSet = null; if (list != null) { dataSet = new List <object>(); foreach (Appointment app in list) { Patient p = patientList[app.IdPacient]; dataSet.Add(new { AppointmentId = app.Id, Patient = p.FirstName + " " + p.LastName, Date = app.ScheduledDate.ToString(), Time = app.Time.ToString(), Symtoms = app.Symptoms.ToString() }); } this._cview = new PagingCollectionView(dataSet, 20); this.DataContext = this._cview; } else { buttonPrevious.IsEnabled = false; buttonNext.IsEnabled = false; } }