protected void RptShowCountData_ItemDataBound(object sender, RepeaterItemEventArgs e) { this.rowCount++; if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem)) { SurveyFieldInfo dataItem = e.Item.DataItem as SurveyFieldInfo; Label label = e.Item.FindControl("LblQuestionContent") as Label; HyperLink link = e.Item.FindControl("LnkListAnswer") as HyperLink; PlaceHolder ph = e.Item.FindControl("PlhQuestion") as PlaceHolder; this.m_QuestionType = dataItem.QuestionType; label.Text = " " + this.rowCount.ToString() + "、(" + SurveyField.GetQuestionType(dataItem.QuestionType) + ")"; link.NavigateUrl = "AnswerList.aspx?SurveyID=" + this.HdnSurveyId.Value + "&QuestionID=" + dataItem.QuestionId.ToString(); link.Text = dataItem.QuestionContent; link.ToolTip = "[" + dataItem.QuestionContent + "]回答详情"; if (((dataItem.QuestionType == 0) || (dataItem.QuestionType == 1)) || (((dataItem.QuestionType == 6) || (dataItem.QuestionType == 8)) || (dataItem.QuestionType == 9))) { Literal child = new Literal(); child.Text = "<div class='border tdbg' style='width:99%; padding:5px 0 5px 0;'><a href='AnswerList.aspx?SurveyID=" + this.HdnSurveyId.Value + "&QuestionID=" + dataItem.QuestionId.ToString() + "'> 内容</a></div>"; ph.Controls.Add(child); } else { this.Show(dataItem.Settings, ph, dataItem.QuestionId); } } }
protected void EgvQuestionDetail_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { SurveyFieldInfo dataItem = e.Row.DataItem as SurveyFieldInfo; e.Row.Cells[0].Text = Convert.ToString((int)(((this.EgvQuestionDetail.PageIndex * this.EgvQuestionDetail.PageCount) + e.Row.RowIndex) + 1)); e.Row.Cells[2].Text = SurveyField.GetQuestionType(dataItem.QuestionType); e.Row.Cells[3].Text = BasePage.RequestString("SurveyName"); } }
protected void EgvQuestion_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { SurveyFieldInfo dataItem = e.Row.DataItem as SurveyFieldInfo; if (this.EgvQuestion.AutoGenerateCheckBoxColumn) { e.Row.Cells[2].Text = SurveyField.GetQuestionType(dataItem.QuestionType); } else { e.Row.Cells[1].Text = SurveyField.GetQuestionType(dataItem.QuestionType); } } }