using System; using System.IO; using System.Web; using System.Text; namespace PowerLeader.Components ...{ /**//// <summary> /// WriteTOHtml 的摘要说明。 /// </summary> public class WriteTOHtml ...{ public WriteTOHtml() ...{ // // TODO: 在此处添加构造函数逻辑 // }
public static void WriteNews(int id) ...{ News news = new News(); News.NewsDetails newsDetails = new PowerLeader.Components.News.NewsDetails(); newsDetails = news.GetNews(id); bool flag; flag = WriteFile(newsDetails); }
public static bool WriteFile(News.NewsDetails newsDetails) ...{ Directory.CreateDirectory(HttpContext.Current.Server.MapPath("/PowerLeader/html/"+newsDetails.addtime.ToString("yyyy")+"/"+newsDetails.addtime.ToString("MM")));