private void ExecuteEditMedication(MedicationDetailsViewModel obj) { if (obj != null) { this.Parent.MedicationUnderConsideration = obj; } }
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; }
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(); }
private void ExecuteRestartMedication(MedicationDetailsViewModel obj) { this.StartDate = DateTime.Now; this.EndDate = DateTime.Now.AddMonths(1); }
private void ExecuteShowMoreInfo(MedicationDetailsViewModel obj) { ToggleDisplay = !ToggleDisplay; }
private void ExecuteStopMedication(MedicationDetailsViewModel obj) { this.EndDate = DateTime.Now; }