예제 #1
0
    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);
        }
    }
예제 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            rptModule.DataSource = KnowledgeModuleService.Get_KnowledgeModuleList();
            rptModule.DataBind();

            int       kaid      = Convert.ToInt32(Request.QueryString["kaid"]);
            DataTable dtArticle = KnowledgeArticleService.Get_KnowledgeArticleViewInfo(kaid);
            ViewState["dtArticle"] = dtArticle;
            int kmid = Convert.ToInt32(dtArticle.Rows[0]["KM_ID"]);
            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;
                }
            }
        }
    }