コード例 #1
0
 /// <summary>
 /// Post an event when there is a missing
 /// answer
 /// </summary>
 /// <param name="e">Question's answer if any was answered</param>
 protected virtual void OnSelectionRequired(QuestionItemAnswersEventArgs e)
 {
     if (this.SelectionRequired != null)
     {
         this.SelectionRequired(this, e);
     }
 }
コード例 #2
0
 /// <summary>
 /// Post an event when there are too many selections
 /// </summary>
 /// <param name="e">Question's answers</param>
 protected virtual void OnSelectionOverflow(QuestionItemAnswersEventArgs e)
 {
     if (this.SelectionOverflow != null)
     {
         this.SelectionOverflow(this, e);
     }
 }
コード例 #3
0
 /// <summary>
 /// Post an event when all answers have been
 /// collected and grouped.
 /// </summary>
 /// <param name="e">The question's answers</param>
 protected virtual void OnAnswersPost(QuestionItemAnswersEventArgs e)
 {
     if (this.AnswerPosted != null)
     {
         this.AnswerPosted(this, e);
     }
 }
コード例 #4
0
 /// <summary>
 /// Store the answers received in a 
 /// temporary storage
 /// </summary>
 /// <param name="sender">The question that raised the event</param>
 /// <param name="e">Answers posted with the question</param>
 protected virtual void OnAnswerPost(object sender, QuestionItemAnswersEventArgs e)
 {
     int voterId = this.VoterAnswers.Voters[0].VoterId;
     foreach (PostedAnswerData data in e.Answers)
     {
         VoterAnswersData.VotersAnswersRow row = this.currentVisitorAnswerSet.VotersAnswers.NewVotersAnswersRow();
         row.VoterId = voterId;
         row.AnswerId = data.AnswerId;
         row.QuestionId = data.Item.QuestionId;
         row.AnswerText = data.FieldText;
         row.SectionNumber = data.SectionNumber;
         row.TypeMode = (int)data.TypeMode;
         this.currentVisitorAnswerSet.EnforceConstraints = false;
         this.currentVisitorAnswerSet.VotersAnswers.AddVotersAnswersRow(row);
     }
 }
コード例 #5
0
 /// <summary>
 /// Set the control SelectionsAreRequired flag to true
 /// and stores the sender for futher processing
 /// </summary>
 /// <param name="sender">The question that raised the event</param>
 /// <param name="e">Answers, if any, posted with the question</param>
 protected virtual void OnSelectionRequired(object sender, QuestionItemAnswersEventArgs e)
 {
     if (sender is QuestionItem)
     {
         this._selectionsAreRequired = true;
     }
 }
コード例 #6
0
		/// <summary>
		/// Store the answers received in a 
		/// temporary storage
		/// </summary>
		/// <param name="sender">The question that raised the event</param>
		/// <param name="e">Answers posted with the question</param>
		protected virtual void OnAnswerPost(Object sender, QuestionItemAnswersEventArgs e)
		{
			int voterId = _voterAnswers.Voters[0].VoterId;
			foreach (PostedAnswerData postedAnswer in e.Answers)
			{
				VoterAnswersData.VotersAnswersRow voterAnswer = updatedAnswerSet.VotersAnswers.NewVotersAnswersRow(); 
				voterAnswer.VoterId = voterId;
				voterAnswer.AnswerId = postedAnswer.AnswerId;
				voterAnswer.QuestionId = postedAnswer.Item.QuestionId;
				voterAnswer.AnswerText = postedAnswer.FieldText;
				voterAnswer.SectionNumber = postedAnswer.SectionNumber;
				updatedAnswerSet.EnforceConstraints = false;
				updatedAnswerSet.VotersAnswers.AddVotersAnswersRow(voterAnswer);
			}
		}
コード例 #7
0
 /// <summary>
 /// Post an event when there is a missing
 /// answer
 /// </summary>
 /// <param name="e">Question's answer if any was answered</param>
 protected virtual void OnSelectionRequired(QuestionItemAnswersEventArgs e)
 {
     if (this.SelectionRequired != null)
     {
         this.SelectionRequired(this, e);
     }
 }
コード例 #8
0
 /// <summary>
 /// Post an event when there are too many selections
 /// </summary>
 /// <param name="e">Question's answers</param>
 protected virtual void OnSelectionOverflow(QuestionItemAnswersEventArgs e)
 {
     if (this.SelectionOverflow != null)
     {
         this.SelectionOverflow(this, e);
     }
 }
コード例 #9
0
 /// <summary>
 /// Post an event when all answers have been
 /// collected and grouped.
 /// </summary>
 /// <param name="e">The question's answers</param>
 protected virtual void OnAnswersPost(QuestionItemAnswersEventArgs e)
 {
     if (this.AnswerPosted != null)
     {
         this.AnswerPosted(this, e);
     }
 }