Пример #1
0
    private void InitArticle(string artid)
    {
        showMode = "art";
        int id = Convert.ToInt32(artid);

        ibll.PlusHitCountByKey(id);
        InfoItem art = ibll.GetArticleByKey(id);

        if (art != null)
        {
            ModelClass cl = cbll.GetClassBySN(art.Infoclass);
            if (cl != null)
            {
                pagePosition += ">>" + cl.GroupTitle + ">><a href='ArticleList.aspx?gr=" + cl.Group + "&cl=" + cl.Sn + "'>" + cl.Title + "</a>>>详细信息";
            }
            lbArticleTitle.Text = art.Title;
            if (art.Happendate > 10000000)
            {
                lbTime.Text = articleConverter.ValueToDateStringConverter(art.Happendate);
            }
            else
            {
                lbTime.Text = DateTime.FromFileTime(art.Credate).ToString("yyyy-MM-dd HH:mm");
            }
            lbHit.Text    = art.Hitcount.ToString();
            lbAuthor.Text = art.Author;
            iframeUrl     = "Article.aspx?id=" + id;
        }
    }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (string.IsNullOrEmpty(Request.QueryString["id"]))
         {
             divContent.InnerHtml = "";
         }
         else
         {
             int      articleid = Convert.ToInt32(Request.QueryString["id"]);
             InfoItem art       = articleBLL.GetArticleByKey(articleid);
             divContent.InnerHtml = art.Content;
         }
     }
 }
Пример #3
0
    private void GetArtById()
    {
        if (Request["id"] == null)
        {
            ErrMsg("参数错误!");
            return;
        }
        int      id  = Convert.ToInt32(Request["id"]);
        InfoItem art = ibll.GetArticleByKey(id);

        if (art != null)
        {
            SucRlt(art);
            return;
        }
        ErrMsg("获取内容失败!");
    }
Пример #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     cls = Request["cl"];
     art = Request["art"];
     if (!string.IsNullOrEmpty(art))
     {
         int clsid = ibll.GetArticleByKey(Convert.ToInt32(art)).Infoclass;
         InitMenu(clsid.ToString());
     }
     else if (!string.IsNullOrEmpty(cls))
     {
         InitMenu(cls);
     }
     else
     {
         Response.Redirect("Default.aspx");
     }
 }
Пример #5
0
    private void bind(int artId)
    {
        InfoItem article = new InfoItem();

        article        = ibll.GetArticleByKey(artId);
        curArtId.Value = article.Infoid.ToString();
        curClsSn.Value = article.Infoclass.ToString();
        curGrpSn.Value = article.Infogroup.ToString();
        tbTitle.Text   = article.Title;
        tbSummary.Text = article.Summary;
        hfEditor.Value = article.Content;
        tbAuthor.Text  = article.Author;
        if (article.Happendate > 0)
        {
            ipNewsDate.Value = articleConverter.ValueToDateStringConverter(article.Happendate);
        }
        tbCreDate.Text           = article.Credate.ToString();
        rblPublish.SelectedValue = article.Infostatus.ToString();
        Session["article"]       = article;
    }