示例#1
0
 private void ExecuteEditMedication(MedicationDetailsViewModel obj)
 {
     if (obj != null)
     {
         this.Parent.MedicationUnderConsideration = obj;
     }
 }
示例#2
0
 public void CopyFrom(MedicationDetailsViewModel model)
 {
     this.Dosage       = model.Dosage;
     this.EndDate      = model.EndDate;
     this.StartDate    = model.StartDate;
     this.Note         = model.Note;
     this.MedicineName = model.MedicineName;
     this.Frequency    = model.Frequency;
 }
示例#3
0
 private void ExecuteAddMedication(MedicationDetailsViewModel obj)
 {
     if (this.MedicationUnderConsideration.ID == Guid.Empty)
     {
         this.Medications.Add(this.MedicationUnderConsideration);
     }
     else
     {
         if (this.Medications.Contains(this.MedicationUnderConsideration))
         {
             for (int i = 0; i < this.Medications.Count; i++)
             {
                 if (this.Medications[i].ID == this.MedicationUnderConsideration.ID)
                 {
                     this.Medications[i].CopyFrom(this.MedicationUnderConsideration);
                 }
             }
             GetDefaultDetailsModel();
         }
     }
     this.MedicationUnderConsideration = GetDefaultDetailsModel();
 }
示例#4
0
 private void ExecuteRestartMedication(MedicationDetailsViewModel obj)
 {
     this.StartDate = DateTime.Now;
     this.EndDate   = DateTime.Now.AddMonths(1);
 }
示例#5
0
 private void ExecuteShowMoreInfo(MedicationDetailsViewModel obj)
 {
     ToggleDisplay = !ToggleDisplay;
 }
示例#6
0
 private void ExecuteStopMedication(MedicationDetailsViewModel obj)
 {
     this.EndDate = DateTime.Now;
 }