Пример #1
0
        protected virtual void OnSelectedRecordChanged()
        {
            SelectedRecordChangedArgs args;

            if (SelectedRecordChanged != null)
            {
                args        = new SelectedRecordChangedArgs();
                args.Record = _activeRecord;
                SelectedRecordChanged(this, args);
            }
        }
Пример #2
0
        private void HandleRecordChange(object sender, SelectedRecordChangedArgs e)
        {
            Record newRecord = e.Record;

            if (newRecord != null)
            {
                //match up the answers with the questions
                foreach (Answer answer in newRecord.Answers)
                {
                    foreach (Question question in this.Questions)
                    {
                        if (question.QuestionID == answer.QuestionID)
                        {
                            question.Answer = answer;
                        }
                    }
                }
            }
        }