コード例 #1
0
 /// <summary>
 /// Raise the AnswerPosted event
 /// </summary>
 void IPostBackDataHandler.RaisePostDataChangedEvent()
 {
     this._isSelectionRequired = this.MinSelectionsRequired(this._questionEventArgs.Answers);
     this._isSelectionOverflow = this.MaxSelectionsReached(this._questionEventArgs.Answers);
     if (this.EnableServerSideValidation)
     {
         if (this.IsSelectionRequired)
         {
             this.OnSelectionRequired(this._questionEventArgs);
         }
         else if (this.IsSelectionOverflow)
         {
             this.OnSelectionOverflow(this._questionEventArgs);
         }
         else if (this.HasInvalidAnswers)
         {
             QuestionItemInvalidAnswersEventArgs e = new QuestionItemInvalidAnswersEventArgs();
             e.InvalidItems = this._invalidAnswerItems;
             this.OnInvalidAnswers(e);
         }
         else if (this._questionEventArgs.Answers.Count > 0)
         {
             this.PostedAnswersHandler(this._questionEventArgs.Answers);
             this.OnAnswersPost(this._questionEventArgs);
         }
     }
     else
     {
         this.PostedAnswersHandler(this._questionEventArgs.Answers);
         this.OnAnswersPost(this._questionEventArgs);
     }
 }
コード例 #2
0
 /// <summary>
 /// Post an event when there are invalid server side checked answers
 /// </summary>
 /// <param name="e">Question's invalid answers args</param>
 protected virtual void OnInvalidAnswers(QuestionItemInvalidAnswersEventArgs e)
 {
     if (this.InvalidAnswers != null)
     {
         this.InvalidAnswers(this, e);
     }
 }
コード例 #3
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 OnInvalidAnswers(object sender, QuestionItemInvalidAnswersEventArgs e)
 {
     if (sender is QuestionItem)
     {
         this._selectionsAreRequired = true;
     }
 }
コード例 #4
0
 /// <summary>
 /// Raise the AnswerPosted event
 /// </summary>
 void IPostBackDataHandler.RaisePostDataChangedEvent()
 {
     this._isSelectionRequired = this.MinSelectionsRequired(this._questionEventArgs.Answers);
     this._isSelectionOverflow = this.MaxSelectionsReached(this._questionEventArgs.Answers);
     if (this.EnableServerSideValidation)
     {
         if (this.IsSelectionRequired)
         {
             this.OnSelectionRequired(this._questionEventArgs);
         }
         else if (this.IsSelectionOverflow)
         {
             this.OnSelectionOverflow(this._questionEventArgs);
         }
         else if (this.HasInvalidAnswers)
         {
             QuestionItemInvalidAnswersEventArgs e = new QuestionItemInvalidAnswersEventArgs();
             e.InvalidItems = this._invalidAnswerItems;
             this.OnInvalidAnswers(e);
         }
         else if (this._questionEventArgs.Answers.Count > 0)
         {
             this.PostedAnswersHandler(this._questionEventArgs.Answers);
             this.OnAnswersPost(this._questionEventArgs);
         }
     }
     else
     {
         this.PostedAnswersHandler(this._questionEventArgs.Answers);
         this.OnAnswersPost(this._questionEventArgs);
     }
 }
コード例 #5
0
 /// <summary>
 /// Post an event when there are invalid server side checked answers
 /// </summary>
 /// <param name="e">Question's invalid answers args</param>
 protected virtual void OnInvalidAnswers(QuestionItemInvalidAnswersEventArgs e)
 {
     if (this.InvalidAnswers != null)
     {
         this.InvalidAnswers(this, e);
     }
 }