개정판 d71b4688
issue #660: SmartUpdate 수정
Change-Id: Icc4c9bd2702624bd8d235127b8d375a1962f6a48
KCOM_API/ServiceDeepView.svc.cs | ||
---|---|---|
35 | 35 |
public string GetVersionData(bool is64BitProcess, string markusVer) |
36 | 36 |
{ |
37 | 37 |
string url = null; |
38 |
int[] markusVersion = Array.ConvertAll<string, int>(markusVer.Split('.'), int.Parse); |
|
39 |
|
|
38 | 40 |
try |
39 | 41 |
{ |
40 | 42 |
using (KCOMEntities uc = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString())) |
41 |
{ |
|
42 |
|
|
43 |
{ |
|
43 | 44 |
if (is64BitProcess) //64 bit machine |
44 | 45 |
{ |
45 |
url = uc.PROPERTIES.Where(data => data.TYPE == "Update_x64" |
|
46 |
&& data.PROPERTY != markusVer).FirstOrDefault().VALUE; |
|
46 |
var versionData = uc.PROPERTIES.Where(data => data.TYPE == "Update_x64").FirstOrDefault(); |
|
47 |
int[] dbversion = Array.ConvertAll<string, int>(versionData.PROPERTY.Split('.'), int.Parse); |
|
48 |
if (dbversion[0] > markusVersion[0] || dbversion[1] > markusVersion[1] || dbversion[2] > markusVersion[2] || dbversion[3] > markusVersion[3]) |
|
49 |
{ |
|
50 |
url = versionData.VALUE; |
|
51 |
} |
|
47 | 52 |
} |
48 | 53 |
else |
49 | 54 |
{ |
50 |
url = uc.PROPERTIES.Where(data => data.TYPE == "Update_x84" |
|
51 |
&& data.PROPERTY != markusVer).FirstOrDefault().VALUE; |
|
52 |
} |
|
53 |
|
|
55 |
var versionData = uc.PROPERTIES.Where(data => data.TYPE == "Update_x84").FirstOrDefault(); |
|
56 |
int[] dbversion = Array.ConvertAll<string, int>(versionData.PROPERTY.Split('.'), int.Parse); |
|
57 |
if (dbversion[0] > markusVersion[0] || dbversion[1] > markusVersion[1] || dbversion[2] > markusVersion[2] || dbversion[3] > markusVersion[3]) |
|
58 |
{ |
|
59 |
url = versionData.VALUE; |
|
60 |
} |
|
61 |
} |
|
54 | 62 |
} |
55 | 63 |
} |
56 | 64 |
catch (Exception) |
내보내기 Unified diff