GetServiceVersion.cs
1.7 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
using System;
using System.Collections.Generic;
using System.Text;
using Comm;
using BizFacade;
namespace App
{
/// <summary>
/// GetServiceVersion 的摘要说明。
/// </summary>
public class GetServiceVersion
{
private string _AllowWebServiceVersion = Const.AllowWebServiceVersion;
private string _CurrentWebServiceVersion;
private bool _CanCheckClientVersion = false;
private bool _CanCheckWebServiceVersion = true;
public GetServiceVersion()
{
try
{
string f_TemString;
BaseSystem f_BaseSystem = new BaseSystem();
f_TemString = f_BaseSystem.GetServiceVersion();
f_TemString = f_TemString.Substring(0, f_TemString.LastIndexOf(@"."));
f_TemString = f_TemString.Substring(0, f_TemString.LastIndexOf(@"."));
this._CurrentWebServiceVersion = f_TemString;
}
catch (Exception ex)
{
this._CurrentWebServiceVersion = "";
this._CanCheckWebServiceVersion = false;
}
}
public bool CompareWebServiceVersion()
{
if (this._AllowWebServiceVersion == this._CurrentWebServiceVersion)
{
return true;
}
else
{
return false;
}
}
public string CurrentWebServiceVersion
{
get
{
return _CurrentWebServiceVersion;
}
}
public bool CanCheckWebServiceVersion
{
get
{
return _CanCheckWebServiceVersion;
}
}
}
}