protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { rptModule.DataSource = KnowledgeModuleService.Get_KnowledgeModuleList(); rptModule.DataBind(); int kmid = Convert.ToInt32(Request.QueryString["kmid"]); foreach (RepeaterItem item in rptModule.Items) { LinkButton btn = (LinkButton)item.FindControl("btnModule"); if (Convert.ToInt32(btn.CommandArgument) == kmid) { btn.ForeColor = Color.Red; btn.Font.Bold = true; } else { btn.ForeColor = Color.Black; btn.Font.Bold = false; } } DataTable dtModule = KnowledgeModuleService.Get_KnowledgeModuleInfo(kmid); lblModule.Text = PubClass.Tool.SubString(dtModule.Rows[0]["KM_Name"].ToString(), 25); ViewState["kmid"] = kmid; binddata(kmid); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { CommonFunction.isLoginCheck(); int kmid = Convert.ToInt32(Request.QueryString["kmid"]); DataTable dtModule = KnowledgeModuleService.Get_KnowledgeModuleInfo(kmid); ViewState["dtModule"] = dtModule; binddata(kmid); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { CommonFunction.isLoginCheck(); ViewState["action"] = Request.QueryString["action"].ToString(); int kmid = Convert.ToInt32(Request.QueryString["kmid"]); ViewState["dtModule"] = KnowledgeModuleService.Get_KnowledgeModuleInfo(kmid); if (Request.QueryString["kaid"] != null) { int kaid = Convert.ToInt32(Request.QueryString["kaid"]); DataTable dt = KnowledgeArticleService.Get_KnowledgeArticleViewInfo(kaid); ViewState["kaid"] = kaid; txtTitle.Text = dt.Rows[0]["KA_Title"].ToString(); txtTime.Text = Convert.ToDateTime(dt.Rows[0]["KA_CreateDate"].ToString()).ToShortDateString(); ViewState["strContent"] = dt.Rows[0]["KA_Content"].ToString(); } else { txtTime.Text = DateTime.Now.ToShortDateString(); } } }