예제 #1
0
 void Test()
 {
     MedicalHistoryList.Clear();
     for (int i = 0; i < 7; i++)
     {
         CSTreatment item = new CSTreatment();
         item.npcName     = "LongLongName" + i.ToString();
         item.diseaseName = "dis" + i.ToString();
         item.treatName   = "fangan" + i.ToString();
         MedicalHistoryList.Add(item);
     }
 }
        public void AddMedicine()
        {
            Medicine medicine = new Medicine();

            medicine.Name         = MedicineName;
            medicine.StartingDate = MedicineStartDate;
            medicine.EndingDate   = MedicineEndDate;
            ((ResidentPatient)Hospital.Patients[PatientID]).History.Add(medicine.ID, medicine);
            Medicine tempMedicine = ((ResidentPatient)Hospital.Patients[PatientID]).History[medicine.ID];

            MedicalHistoryList.Add(new ComboBoxPairs(medicine.ID, medicine.Name + " - Starting Date: " + medicine.StartingDate.ToShortDateString() + " | " + medicine.EndingDate.ToShortDateString()));
            HospitalDB.InsertMedicine(medicine, Hospital.Patients[PatientID]);
            Home.ViewModel.CloseRootDialog();
        }