//Setup initial form private void FillForm(Intervention intervention) { if (intervention.getCallerName() != null) { CallerName.Text = intervention.getCallerName(); } if (intervention.getLocation() != null) { Location.Text = intervention.getLocation(); } if (intervention.getNatureOfCall() != null) { NatureOfCall.Text = intervention.getNatureOfCall(); } if (intervention.getAge() != null) { Age.Text = intervention.getAge(); } if (intervention.getCode() != 0) { Priority.SelectedIndex = intervention.getCode() - 1; } if (intervention.getGender() != null) { int index = -1; foreach (ComboBoxItem cb in Gender.Items) { index++; if (cb.Content.ToString() == intervention.getGender()) { break; } } Gender.SelectedIndex = index; } if (intervention.getChiefComplaint() != null) { int index = -1; foreach (ComboBoxItem cb in Complaint.Items) { index++; if (cb.Content.ToString() == intervention.getChiefComplaint()) { break; } } Complaint.SelectedIndex = index; } if (intervention.getTimeOfCall() != null) { TextBoxHandler.setTime(Callhh, Callmm, intervention.getTimeOfCall().Hour, intervention.getTimeOfCall().Minute); } }
public void InterventionSetAgeTest() { Intervention a = new Intervention(); a.setAge("21"); Assert.AreEqual("21", a.getAge()); }