⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 answerlist.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
字号:
namespace PowerEasy.WebSite.Survey
{
    using PowerEasy.Model.Survey;
    using PowerEasy.Survey;
    using PowerEasy.Web.UI;
    using System;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class AnswerList : AdminPage
    {
        protected SurveyFieldInfo fieldInfo;
        protected HtmlForm form1;
        protected Label LblTitle;
        protected int questionId;
        protected Repeater RptAnswerList;
        protected int surveyId;

        private void BindData()
        {
            this.RptAnswerList.DataSource = SurveyRecord.GetQuestionAnswer(this.surveyId, "Q" + this.questionId.ToString());
            this.RptAnswerList.DataBind();
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            this.surveyId = BasePage.RequestInt32("SurveyID");
            this.questionId = BasePage.RequestInt32("QuestionID");
            if ((this.surveyId != 0) && (this.questionId != 0))
            {
                this.fieldInfo = SurveyField.GetFieldInfoById(this.surveyId, this.questionId);
                this.LblTitle.Text = "当前问卷:" + SurveyManager.GetSurveyById(this.surveyId).SurveyName + " / 当前问题:" + this.fieldInfo.QuestionContent;
                this.BindData();
            }
        }

        protected void RptAnswerList_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if ((e.Item.ItemType == ListItemType.AlternatingItem) || (e.Item.ItemType == ListItemType.Item))
            {
                Literal literal = e.Item.FindControl("LtrAnswerList") as Literal;
                string dataItem = e.Item.DataItem as string;
                if (!string.IsNullOrEmpty(dataItem))
                {
                    literal.Text = "<td style='height:20px;'>" + dataItem + "</td>";
                }
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -