public PrescriptionMedicineViewModel(List <MedicineTimes> prescriptionMedicines) { list = new List <PrescriptionMedicineViewModel>(); foreach (var item in prescriptionMedicines) { PrescriptionMedicineViewModel p = new PrescriptionMedicineViewModel(item); list.Add(p); } }
public PatientDetailsViewModel(Patient p, List <MedicineTimes> l) { patient = new PatientViewModel(p); list = new List <PrescriptionMedicineViewModel>(); foreach (var item in l) { PrescriptionMedicineViewModel model = new PrescriptionMedicineViewModel(item); list.Add(model); } }
public PrescriptionViewModel(Patient p, Doctor d, List <MedicineTimes> m) { //this.prescription = r; Patient = new PatientViewModel(p); Doctor = new DoctorViewModel(d); Medicines = new List <PrescriptionMedicineViewModel>(); foreach (var item in m) { PrescriptionMedicineViewModel pr = new PrescriptionMedicineViewModel(item); Medicines.Add(pr); } //foreach (var item in r.Medicines) //{ // PrescriptionMedicineViewModel medicine = new PrescriptionMedicineViewModel(item); // Medicines.Add(medicine); //} }