개정판 757ab2f2
issue #000: mssql db type 추가 확인중
Change-Id: I145dc94db492eeedf55863441b65c26ba6fa43d3
DTI_PID/ID2PSN/Program.cs | ||
---|---|---|
26 | 26 |
// ID2Info info = ID2Info.GetInstance(); |
27 | 27 |
// info.DefaultPath = File.ReadAllLines(path)[0]; |
28 | 28 |
//} |
29 |
//projectTable = DB.GetProject(); |
|
30 | 29 | |
31 |
string[] result = args[0].Split(new string[] { "☆■☆" }, StringSplitOptions.None); |
|
30 |
#if DEBUG |
|
31 |
//info.DefaultPath = @"E:\DOFTECH\10.PSN\REB"; |
|
32 |
//info.DefaultPath = @"E:\DOFTECH\10.PSN\SampleProject_규호"; |
|
33 |
//info.DefaultPath = @"D:\Projects\dd\21100497014_REB"; |
|
34 |
args = new string[1]; |
|
35 |
args[0] = @"E:\DOFTECH\10.PSN\REB☆■☆PSN"; |
|
36 |
|
|
37 |
//args[0] = @"E:\DOFTECH\10.PSN\SampleProject_규호"; |
|
38 |
#endif |
|
32 | 39 | |
33 |
if (result.Length > 0)
|
|
40 |
if (args.Length > 0)
|
|
34 | 41 |
{ |
35 |
info.DefaultPath = result[0]; |
|
36 |
if (result.Length > 1) |
|
37 |
info.ProgramName = result[1]; |
|
38 |
else |
|
39 |
info.ProgramName = "PSN"; |
|
42 |
//이름 변경 |
|
43 |
string[] result = args[0].Split(new string[] { "☆■☆" }, StringSplitOptions.None); |
|
44 |
if (result.Length > 0) |
|
45 |
{ |
|
46 |
info.DefaultPath = result[0]; |
|
47 |
if (result.Length > 1) |
|
48 |
info.ProgramName = result[1]; |
|
49 |
else |
|
50 |
info.ProgramName = "PSN"; |
|
51 |
} |
|
52 | ||
53 |
//DB Type 확인 |
|
54 |
projectTable = DB.GetProject(); |
|
55 |
DataRow dr = projectTable.Select(string.Format("Path = '{0}'", result[0].Replace(@"\", @"/"))).FirstOrDefault(); |
|
56 |
//2는 mssql 1은 sqlite |
|
57 |
if (Convert.ToInt32(dr.Field<long>("DBTypes_UID")) == 1) |
|
58 |
info.ID2DBType = ID2DB_Type.SQLite; |
|
59 |
else if (Convert.ToInt32(dr.Field<long>("DBTypes_UID")) == 2) |
|
60 |
{ |
|
61 |
info.ID2DBType = ID2DB_Type.MSSQL; |
|
62 |
info.ServerIP = dr.Field<string>("Host"); |
|
63 |
//2021-11-03 ID2는 무조건 기본포트 쓴다고 함 |
|
64 |
//info.Port = "3389"; |
|
65 |
info.DBUser = dr.Field<string>("User"); |
|
66 |
info.DBPassword = dr.Field<string>("Password"); |
|
67 |
//info.DefaultPath = dr.Field<string>("Name"); |
|
68 |
} |
|
40 | 69 |
} |
41 |
#if DEBUG |
|
42 |
info.DefaultPath = @"E:\DOFTECH\10.PSN\REB"; |
|
43 |
//info.DefaultPath = @"E:\DOFTECH\10.PSN\SampleProject_규호"; |
|
44 |
|
|
45 |
info.ProgramName = "PNET"; |
|
46 |
//info.DefaultPath = @"D:\Projects\dd\21100497014_REB"; |
|
47 |
#endif |
|
48 | 70 | |
49 | 71 |
if (DB.ConnTestAndCreateTable()) |
50 | 72 |
{ |
내보내기 Unified diff