개정판 1abdd7c3
issue #0000
프로젝트 정보 수정
ID2Path 는 로컬의 Id2 DB에서 가져오도록 수정
Change-Id: I92a2876b06b0d5e04f92013850601c0def98ce20
ID2.Manager/ID2.Manager.Controller/Controllers/ProjectController.cs | ||
---|---|---|
15 | 15 |
{ |
16 | 16 |
using (ProjectRepository rep = new ProjectRepository(this._DbConnectionStr)) |
17 | 17 |
{ |
18 |
return rep.GetAllProjectList(); |
|
19 |
} |
|
20 |
} |
|
18 |
var id2Project = new ID2Controller().GetID2ProjectList(); |
|
19 |
var allProject = rep.GetAllProjectList(); |
|
21 | 20 |
|
22 |
public IEnumerable<ProjectInfo> GetProjectGroupList() |
|
23 |
{ |
|
24 |
using (ProjectRepository rep = new ProjectRepository(this._DbConnectionStr)) |
|
25 |
{ |
|
26 |
return rep.GetProjectGroupList(); |
|
27 |
} |
|
28 |
} |
|
29 |
|
|
30 |
public IEnumerable<ProjectInfo> GetProjectList(string ProjectID, bool IsGroup) |
|
31 |
{ |
|
32 |
using (ProjectRepository rep = new ProjectRepository(this._DbConnectionStr)) |
|
33 |
{ |
|
34 |
return rep.GetProjectList(ProjectID, IsGroup); |
|
21 |
return from mg in allProject |
|
22 |
join id2 in id2Project on mg.Code equals id2.Name into gj |
|
23 |
from prjs in gj.DefaultIfEmpty() |
|
24 |
select new ProjectInfo() |
|
25 |
{ |
|
26 |
ProjectID = mg.ProjectID, |
|
27 |
Code = mg.Code, |
|
28 |
Name = mg.Name, |
|
29 |
Description = mg.Description, |
|
30 |
ID2Path = prjs?.Path ?? null, |
|
31 |
GroupID = mg.GroupID, |
|
32 |
GroupName = mg.GroupName, |
|
33 |
Level = mg.Level |
|
34 |
}; |
|
35 | 35 |
} |
36 | 36 |
} |
37 | 37 |
|
... | ... | |
39 | 39 |
{ |
40 | 40 |
using (ProjectRepository rep = new ProjectRepository(this._DbConnectionStr)) |
41 | 41 |
{ |
42 |
var id2Project = new ID2Controller().GetID2ProjectList(); |
|
43 |
var project = rep.GetProjectInfo(ProjectID); |
|
44 |
|
|
45 |
var id2 = id2Project.Where(x => x.Name.Equals(project.Code)).FirstOrDefault(); |
|
46 |
if (id2 != null) |
|
47 |
{ |
|
48 |
project.ID2Path = id2.Path; |
|
49 |
} |
|
50 |
|
|
42 | 51 |
return rep.GetProjectInfo(ProjectID); |
43 | 52 |
} |
44 | 53 |
} |
내보내기 Unified diff