コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.surveyId = BasePage.RequestInt32("SurveyID");
     if (!base.IsPostBack)
     {
         if (this.surveyId == 0)
         {
             AdminPage.WriteErrMsg("<li>请指定问卷ID</li>", "SurveyManage.aspx");
         }
         else if (!SurveyManager.SurveyIdOfPassedExists(this.surveyId))
         {
             AdminPage.WriteErrMsg("<li>该问卷未启用,不能查看报表!</li>");
         }
         else
         {
             SurveyInfo surveyById = SurveyManager.GetSurveyById(this.surveyId);
             if (!surveyById.IsNull)
             {
                 this.LblSurveyName.Text   = surveyById.SurveyName;
                 this.LblDescription.Text  = surveyById.Description;
                 this.LblTitle.Text        = "[" + surveyById.SurveyName + "]问卷报表";
                 this.LblSurveyNumber.Text = SurveyRecord.GetTotalOfSurveyRecord(this.surveyId).ToString();
                 this.LblDate.Text         = surveyById.CreateDate.ToString() + "/" + surveyById.EndTime.ToString();
             }
             else
             {
                 AdminPage.WriteErrMsg("<li>未找到对应的问卷信息</li>");
             }
         }
         this.BtnReport.Attributes.Add("onclick", "javascript:window.print();return false;");
     }
 }
コード例 #2
0
 private void BindData()
 {
     this.RptAnswerList.DataSource = SurveyRecord.GetList((this.Pager.CurrentPageIndex - 1) * this.Pager.PageSize, this.Pager.PageSize, this.surveyId, 0);
     this.RptAnswerList.DataBind();
     this.Pager.RecordCount = SurveyRecord.GetTotalOfSurveyRecord();
 }
コード例 #3
0
 private void BindData()
 {
     this.RptShowCountList.DataSource = SurveyRecord.GetList((this.Pager.CurrentPageIndex - 1) * this.Pager.PageSize, this.Pager.PageSize, this.m_SurveyId, this.m_RecordId);
     this.RptShowCountList.DataBind();
     this.Pager.RecordCount = SurveyRecord.GetTotalOfSurveyRecord();
 }