protected void Page_Load(object sender, EventArgs e)
        {
            //获取要查看的新闻ID
            int id = Convert.ToInt32(Request.QueryString["id"]);

            Msg = ArticleHelper.GetArticle(id);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         int id = Convert.ToInt32(Request.QueryString["id"].ToString());
         article = new Article();
         article = ArticleHelper.GetArticle(id);
     }
     catch
     {
     }
 }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //焦点图
            focus = NewsEventsHelper.GetTopPicNews(0, 5);

            CenterPortal.Model.IPost post = new NewsEventsHelper();
            //新闻
            news = post.GetTopDesc((int)Category.News_and_Events, 8);

            //academic exchange
            post = new ArticleHelper();
            academic = post.GetTopDesc((int)Category.Academic_Exchange, 8);

            //scientific research
            research = post.GetTopDesc((int)Category.Scientific_Research, 8);

            //overview
            overview = ArticleHelper.GetSingleArticle((int)Category.Center_Overviw);
        }
 /// <summary>
 /// 创建新的 Article 对象。
 /// </summary>
 /// <param name="aid">Aid 属性的初始值。</param>
 /// <param name="title">Title 属性的初始值。</param>
 /// <param name="content">Content 属性的初始值。</param>
 /// <param name="postTime">PostTime 属性的初始值。</param>
 public static Article CreateArticle(global::System.Int64 aid, global::System.String title, global::System.String content, global::System.DateTime postTime)
 {
     Article article = new Article();
     article.Aid = aid;
     article.Title = title;
     article.Content = content;
     article.PostTime = postTime;
     return article;
 }
 /// <summary>
 /// 用于向 Articles EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddToArticles(Article article)
 {
     base.AddObject("Articles", article);
 }
Beispiel #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Art = ArticleHelper.GetSingleArticle((int)Category.Center_Overviw);
 }