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();
     }
 }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.questionType = BasePage.RequestInt32("QuestionType");
     this.questionId   = BasePage.RequestInt32("QuestionID");
     this.surveyId     = BasePage.RequestInt32("SurveyID");
     this.questionInfo = SurveyField.GetFieldInfoById(this.surveyId, this.questionId);
     this.ShowQuestionContent();
     if (DataConverter.CLng(base.Request.QueryString["IsOpen"]) == 1)
     {
         this.DivModify.Visible = false;
     }
 }
 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            = "当前问题:" + this.fieldInfo.QuestionContent;
         this.SmpNavigator.CurrentNode = "当前问卷:" + SurveyManager.GetSurveyById(this.surveyId).SurveyName;
         if ((this.fieldInfo.QuestionType == 2) || (this.fieldInfo.QuestionType == 3))
         {
             this.IsThree = true;
         }
         this.BindData();
     }
     if (!base.IsPostBack)
     {
         this.Pager.PageSize = 10;
     }
 }
Example #4
0
        protected void ModifyInitialize()
        {
            SurveyFieldInfo fieldInfoById = new SurveyFieldInfo();

            fieldInfoById = SurveyField.GetFieldInfoById(this.m_SurveyId, DataConverter.CLng(this.HdnQuestionId.Value));
            if (fieldInfoById.IsNull)
            {
                AdminPage.WriteErrMsg("<li>找不到对应的问卷题目信息</li>");
            }
            else
            {
                SurveyInfo info2  = new SurveyInfo();
                int        isOpen = SurveyManager.GetSurveyById(this.m_SurveyId).IsOpen;
                if (isOpen != 0)
                {
                    this.RadlQuestionType.Enabled = false;
                }
                this.RadlEnableNull.SelectedValue   = fieldInfoById.EnableNull.ToString();
                this.TxtQuestionContent.Text        = fieldInfoById.QuestionContent;
                this.RadlQuestionType.SelectedValue = fieldInfoById.QuestionType.ToString();
                switch (fieldInfoById.QuestionType)
                {
                case 0:
                    this.PnlText.Visible      = true;
                    this.PnlChoice.Visible    = false;
                    this.PnlInputType.Visible = false;
                    break;

                case 1:
                    this.PnlText.Visible      = false;
                    this.PnlChoice.Visible    = false;
                    this.PnlInputType.Visible = false;
                    break;

                case 2:
                    this.PnlText.Visible      = false;
                    this.PnlChoice.Visible    = true;
                    this.PnlInputType.Visible = true;
                    break;

                case 3:
                    this.PnlText.Visible      = false;
                    this.PnlChoice.Visible    = true;
                    this.PnlInputType.Visible = true;
                    break;

                case 4:
                    this.PnlText.Visible      = false;
                    this.PnlChoice.Visible    = true;
                    this.PnlInputType.Visible = false;
                    break;

                case 5:
                    this.PnlText.Visible      = false;
                    this.PnlChoice.Visible    = true;
                    this.PnlInputType.Visible = false;
                    break;

                case 6:
                    this.PnlText.Visible      = false;
                    this.PnlChoice.Visible    = false;
                    this.PnlInputType.Visible = false;
                    break;

                case 7:
                    this.PnlText.Visible      = false;
                    this.PnlChoice.Visible    = false;
                    this.PnlInputType.Visible = false;
                    break;

                case 8:
                    this.PnlText.Visible      = true;
                    this.PnlChoice.Visible    = false;
                    this.PnlInputType.Visible = false;
                    break;

                case 9:
                    this.PnlText.Visible      = true;
                    this.PnlChoice.Visible    = false;
                    this.PnlInputType.Visible = false;
                    break;
                }
                if (this.PnlChoice.Visible)
                {
                    if (fieldInfoById.Settings != null)
                    {
                        StringBuilder builder = new StringBuilder();
                        foreach (string str in fieldInfoById.Settings)
                        {
                            builder.Append(str);
                            builder.Append("\n");
                        }
                        this.TxtSettings.Text = builder.ToString();
                    }
                    if (isOpen != 0)
                    {
                        this.TxtSettings.ReadOnly  = true;
                        this.RadlInputType.Enabled = false;
                    }
                    if (this.PnlInputType.Visible)
                    {
                        this.RadlInputType.SelectedValue = fieldInfoById.InputType.ToString();
                        if (fieldInfoById.InputType == 1)
                        {
                            this.PnlText.Visible = true;
                        }
                    }
                    else
                    {
                        this.PnlText.Visible = false;
                    }
                }
                if (this.PnlText.Visible)
                {
                    this.TxtContentLength.Text = fieldInfoById.ContentLength.ToString();
                }
            }
        }