Beispiel #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;
        }
    }
Beispiel #2
0
 private void ToArt(ref List <uniart> list, List <InfoItem> arts)
 {
     for (int i = 0; i < arts.Count; i++)
     {
         uniart art = new uniart();
         art.id      = arts[i].Infoid.ToString();
         art.gr      = arts[i].Infogroup.ToString();
         art.cl      = arts[i].Infoclass.ToString();
         art.title   = arts[i].Title;
         art.content = arts[i].Content;
         art.date    = arts[i].Happendate > 0 ? articleConverter.ValueToDateStringConverter(arts[i].Happendate) : articleConverter.ValueToDateConverter(arts[i].Credate);
         list.Add(art);
     }
 }
Beispiel #3
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;
    }