Ejemplo n.º 1
0
    protected void BindData(Int64 nsid)
    {
        XYECOM.Business.News ns = new XYECOM.Business.News();
        string strWhere = " where NS_ID="+nsid.ToString();
        string newsname = ns.GetNewsName(nsid);
        if(string.IsNullOrEmpty(newsname))
              this.caption.InnerHtml ="对《" + newsname + "》新闻的评论";

        this.Page1.RecTotal = Function.GetRows("n_NewsDiscuss", "ND_ID", strWhere);
        DataTable dt = Function.GetPages(this.Page1.PageSize, this.Page1.CurPage, strWhere, " Order by ND_ID DESC", "n_NewsDiscuss", "ND_ID,U_ID,U_Name,NS_ID,ND_Content,ND_AddTime,ND_IsShow", "ND_ID");

        if (dt.Rows.Count > 0)
        {
            this.gvlist.DataSource = dt;
            this.gvlist.DataBind();
        }
        else
        {
            this.gvlist.DataBind();
            this.lblMessage.Text = "没有任何评论!";
        }
    }
Ejemplo n.º 2
0
    private void BindData(Int64 nd, Int64 ns)
    {
        XYECOM.Business.News ne = new XYECOM.Business.News();
        nsname = ne.GetNewsName(ns);
        this.caption.InnerHtml = nsname;

        ndinfo = ndis.GetItem(nd);

        if (ndinfo.U_ID.ToString() == "0")
            this.lbname.Text = ndinfo.U_Name+"(游客)";
        else
            this.lbname.Text = ndinfo.U_Name+"(会员)";
        this.lbtime.Text = ndinfo.ND_AddTime.ToString();
        this.tbcontent.Text = ndinfo.ND_Content.Replace("</n>", "</br>");
        if (ndinfo.ND_IsShow == true)
        {
            this.rbisshowtrue.Checked = true;
        }
        else
        {
            this.rbisshowfalse.Checked = true;
        }
    }
Ejemplo n.º 3
0
    /// <summary>
    /// 获取新闻标题
    /// </summary>
    /// <param name="nsid">新闻的编号</param>
    /// <returns>该新闻的标题</returns>
    private string GetNewsTitle(Int64 nsid)
    {
        XYECOM.Business.News ne = new XYECOM.Business.News();
        if (nsid <= 0)
            Alert("该新闻有误,无法设置,请从新选择", backURL);

        return ne.GetNewsName(nsid);
    }