/// <summary> /// Returns the answeritem user's answers /// </summary> protected virtual PostedAnswerDataCollection GetUserAnswers() { PostedAnswerDataCollection datas = new PostedAnswerDataCollection(); if (this.RenderMode == ControlRenderMode.Edit) { if (this._fieldTextBox.Text.Length != 0) { datas.Add(new PostedAnswerData(this, this.AnswerId, base.SectionContainer.SectionNumber, this._fieldTextBox.Text, AnswerTypeMode.Publisher | AnswerTypeMode.Custom)); return(datas); } return(null); } PostedAnswerData postedAnswerData = new PostedAnswerData(this, this.AnswerId, base.SectionContainer.SectionNumber, this.DefaultText, AnswerTypeMode.Publisher | AnswerTypeMode.Custom); datas.Add(postedAnswerData); return(datas); }
/// <summary> /// Returns the check box status to the event subscribers /// once the survey's page get posted /// </summary> protected override PostedAnswerDataCollection GetPostedAnswerData() { PostedAnswerData data; bool flag; PostedAnswerDataCollection postedAnswers = new PostedAnswerDataCollection(); if (this.Context.Request[this._boolCheckBox.UniqueID] != null) { flag = true; data = new PostedAnswerData(this, this.AnswerId, base.SectionContainer.SectionNumber, flag.ToString(), AnswerTypeMode.Publisher | AnswerTypeMode.Custom); } else { flag = false; data = new PostedAnswerData(this, this.AnswerId, base.SectionContainer.SectionNumber, flag.ToString(), AnswerTypeMode.Publisher | AnswerTypeMode.Custom); } postedAnswers.Add(data); this.OnAnswerPublished(new AnswerItemEventArgs(postedAnswers)); return(postedAnswers); }