public void Bindabout() { using (Article a = new Article()) { if (a.Fill(Query <string>("id"))) { View.Set("txtTitle", a.Title); string b = ArticleBody.Get(a.ID); if (Query <string>("id") == "3") { using (Photo p = new Photo()) { p.Select("CateID=" + Query <string>("id")).Bind(View, "photomsg"); } } else if (Query <string>("id") == "2") { using (Photo p = new Photo()) { p.Select("CateID=" + Query <string>("id")).Bind(View, "photoenvioronment"); } } else { View.Set("txtBody", ArticleBody.Get(a.ID)); } View.Set("title", "您现在的位置:首页 > " + a.Title); } } }
public void Bindnewsdetail() { using (News a = new News()) { if (a.Fill(Query <string>("id"))) { View.Set("txtTitle", a.Title); View.Set("txtBody", ArticleBody.Get(a.ID)); View.Set("title", a.Title); } } }