UpdateSystem.cs
1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//修改:为Cookies增加new修饰词 by 倪豪 2007-08-27
using System;
using System.ComponentModel;
using System.Data;
using Comm;
namespace BizFacade
{
public class UpdateSystem : BaseSystem
{
//protected System.Net.CookieContainer Cookies;
new protected System.Net.CookieContainer Cookies;
private string WebServiceUrl = "";
public UpdateSystem()
{
}
public UpdateSystem(string Url)
{
WebServiceUrl = Url;
}
private UpdateSvc.UpdateSvc m_wsUpdateSvc;
private UpdateSvc.UpdateSvc NewUpdateSvc()
{
if (m_wsUpdateSvc == null)
{
m_wsUpdateSvc = new UpdateSvc.UpdateSvc();
SetCookiesUriHaveCookie(m_wsUpdateSvc);
}
return m_wsUpdateSvc;
}
/// <summary>
/// 获得最新客户端的版本信息
/// </summary>
/// <returns></returns>
public string GetClientVersion()
{
return NewUpdateSvc().GetClientVersion();
}
public DataSet GetClientFileList()
{
return NewUpdateSvc().GetClientFileList();
}
public byte[] GetClientFile(string FileName)
{
return NewUpdateSvc().GetClientFile(FileName);
}
public string GetUpdateUrl()
{
UpdateSvc.UpdateSvc usws = new UpdateSvc.UpdateSvc();
return usws.Url;
}
public string GetUpdateSwitch()
{
UpdateSvc.UpdateSvc usws = new UpdateSvc.UpdateSvc();
return usws.GetUpdateSwitch();
}
}
}