摘要: 调用接口,写个webserver,再调用webserver接口:http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx写webserver: [WebMethod(Description = "获取江门天气预报")] public string[] WeatherOfJiangMen(string citycode) { string[] strWeather = new string[32]; WFIT.BLL.WeatherForecastLog bllWeather = new WFIT.BLL.Weath 阅读全文
posted @ 2012-10-19 11:41 洗耳恭听兼烂笔头 阅读(309) 评论(0) 推荐(0) 编辑
摘要: protected override void OnStart(string[] args) { atimer = new System.Timers.Timer(10000); atimer.Elapsed += new System.Timers.ElapsedEventHandler(OnTimedEvent); atimer.Interval = 1000; atimer.Enabled = true; Console.ReadLine(); } protected override void OnStop() { // TODO: 在此处添加代码以执行停止服务所需的关闭操作。 } . 阅读全文
posted @ 2012-10-19 11:29 洗耳恭听兼烂笔头 阅读(459) 评论(0) 推荐(0) 编辑
摘要: 先上传, 下载 , 再删除服务上的string fileName = "WeekReport" + DateTime.Now.ToString("yyyyMMdd") + ".xls";//客户端保存的文件名string filePath = Server.MapPath("../UserFiles/TempFiles/") + fileName;//保存代码//下载文件DownFile(fileName, filePath);/// <summary> /// 以字符流的形式下载文件 /// < 阅读全文
posted @ 2012-10-19 10:48 洗耳恭听兼烂笔头 阅读(177) 评论(0) 推荐(0) 编辑