| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Text.RegularExpressions;
- using System.Text;
- using System.Data;
- public partial class Knowledge_KnowledgeView : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!this.IsPostBack)
- {
-
- if (!string.IsNullOrEmpty(Request.QueryString["id"]))
- {
- int sid = int.Parse(Request.QueryString["id"].ToString());
- ShowInfo(sid);
- }
-
-
- }
- }
- public string changeClass(string classid)
- {
- string sql = "F_ID=" + classid;
- XYFDRQ.BLL.T_KnowledgeClass bll = new XYFDRQ.BLL.T_KnowledgeClass();
- DataTable table = bll.GetList(sql).Tables[0];
- if (table.Rows.Count > 0)
- {
- return table.Rows[0]["F_Name"].ToString();
- }
- else
- {
- return "";
- }
- }
- private void ShowInfo(int sid)
- {
- XYFDRQ.Model.T_Knowledge model = new XYFDRQ.Model.T_Knowledge();
- XYFDRQ.BLL.T_Knowledge bll = new XYFDRQ.BLL.T_Knowledge();
- model = bll.GetModel(sid);
- lblTitle.Text = model.F_Title;
- if (model.F_Class.ToString() != "")
- {
- lblFL.Text = changeClass(model.F_Class.ToString());
- }
- FCKeditor1.Value = model.F_Content;
- }
- }
|