public override void UpdateView() { if (fTask == null) { fView.Priority.SelectedIndex = -1; fView.StartDate.Text = ""; fView.StopDate.Text = ""; fView.GoalType.SelectedIndex = 0; fView.Goal.Text = ""; } else { fView.Priority.SelectedIndex = (sbyte)fTask.Priority; fView.StartDate.Text = fTask.StartDate.GetDisplayString(DateFormat.dfDD_MM_YYYY); fView.StopDate.Text = fTask.StopDate.GetDisplayString(DateFormat.dfDD_MM_YYYY); var goal = fTask.GetTaskGoal(); fTempRec = goal.GoalRec; fView.GoalType.SelectedIndex = (sbyte)goal.GoalType; switch (goal.GoalType) { case GDMGoalType.gtIndividual: case GDMGoalType.gtFamily: case GDMGoalType.gtSource: fView.Goal.Text = GKUtils.GetGoalStr(goal.GoalType, fTempRec); break; case GDMGoalType.gtOther: fView.Goal.Text = fTask.Goal; break; } } fView.NotesList.ListModel.DataOwner = fTask; ChangeGoalType(); }