개정판 370bd7a1
issue #0000
informations 에 FindID2LocalPath 추가
Change-Id: I3361ef5a462938e5619906fc8411a1819ab76154
ID2.Manager/ID2.Manager.Common/Informations.cs | ||
---|---|---|
31 | 31 |
public List<UserInfo> UserList { get; set; } = new List<UserInfo>(); |
32 | 32 |
public List<ProjectInfo> ProjectList { get; set; } = new List<ProjectInfo>(); |
33 | 33 |
|
34 |
public string FindID2LocalPath(string ProjectCode) |
|
35 |
{ |
|
36 |
var proj = this.ProjectList.Where(x => |
|
37 |
{ |
|
38 |
return x.Code.Equals(ProjectCode); |
|
39 |
}).FirstOrDefault(); |
|
40 |
|
|
41 |
return proj == null ? string.Empty : proj.ID2Path; |
|
42 |
} |
|
43 |
|
|
34 | 44 |
private readonly List<string> _JobLevel = new List<string>() { "1", "2", "3", "4", "5" }; |
35 | 45 |
public List<string> JobLevel |
36 | 46 |
{ |
ID2.Manager/ID2.Manager.Dapper/Repository/ProjectRepository.cs | ||
---|---|---|
45 | 45 |
from prj |
46 | 46 |
order by [Level], [Name];"; |
47 | 47 |
|
48 |
|
|
49 |
|
|
50 | 48 |
return Query<ProjectInfo>(query); |
51 | 49 |
} |
52 | 50 |
|
ID2.Manager/ID2.Manager/Main.cs | ||
---|---|---|
514 | 514 |
} |
515 | 515 |
else |
516 | 516 |
{ |
517 |
string extension = string.Empty; |
|
518 |
|
|
517 | 519 |
switch (e.Column.Name) |
518 | 520 |
{ |
519 | 521 |
case "AutoCADLink": |
... | ... | |
540 | 542 |
|
541 | 543 |
if (e.Row.DataBoundItem is Documents doc) |
542 | 544 |
{ |
543 |
if (File.Exists(doc.DocFilePath) && viewer != null) viewer.ReadDWG(doc.DocFilePath); |
|
545 |
extension = "dwg"; |
|
546 |
string filePath = Path.Combine(informations.FindID2LocalPath(doc.RefProjectCode), $"{doc.DocumentNo}.{extension}"); |
|
547 |
|
|
548 |
if (File.Exists(filePath) && viewer != null) viewer.ReadDWG(filePath); |
|
544 | 549 |
} |
545 | 550 |
} |
546 | 551 |
break; |
내보내기 Unified diff