123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using CB.Data;
- using CB.Entity;
- namespace CB.TVUCenter.Web
- {
- public partial class install : System.Web.UI.Page
- {
- protected StringBuilder TvQuestion = new StringBuilder();
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- InitData();
- }
- }
- /// <summary>
- /// 生成常见问题
- /// </summary>
- private void InitData()
- {
- int Record = 0;
- List<TopicInfo> lists = TopicService.ToPaging("207", 10, 1, out Record, "Tid ASC").ToList();
- if (lists == null) return;
- for (int i = 0; i < lists.Count; i++)
- {
- string question = @"<li " + ((i > 3) ? "style='display:none;'" : "") + @">
- <strong class='faq-question'>" + (i+1).ToString()+"、"+lists[i].Title + @"</strong>
- <div class='faq-answer' " + (i == 0 ? "style='display:block;'" : "") + @">
- <p>" + lists[i].Context + "</p></div></li>";
- TvQuestion.Append(question);
- }
- }
- }
- }
|