private void Open() { try { using (WaitCursor wc = new WaitCursor()) { int id = SelectedId; if (id != 0) { Observation observation = null; using (GmConnection conn = App.CreateConnection()) { observation = Observation.GetObservation(conn, id); } if (observation != null) { // string observationTypeName = (string)SelectedRow["ObservationTypeName"]; ObservationForm form = new ObservationForm(observation, patientName); if (form.ShowDialog() == DialogResult.OK) { UpdateRow(SelectedRow, observation); } } } } } catch (Exception ex) { Log.Exception(ex); } }