개정판 ee3bae46
issue #0000
Project List 조회 시점 변경
Change-Id: I9c3d93b3688d3b4b8fc86ce2fd2f55c1b349a4fc
ID2.Manager/ID2.Manager/Controls/OpenProjectView.cs | ||
---|---|---|
20 | 20 |
{ |
21 | 21 |
public partial class OpenProjectView : UserControl |
22 | 22 |
{ |
23 |
public List<ProjectInfo> Projects = new List<ProjectInfo>();
|
|
23 |
readonly Informations informations = Informations.Instance;
|
|
24 | 24 |
public event EventHandler OpenProjectClick; |
25 | 25 |
|
26 | 26 |
public OpenProjectView() |
... | ... | |
42 | 42 |
|
43 | 43 |
public void GetProjectGroups() |
44 | 44 |
{ |
45 |
this.Projects = new ProjectController().GetAllProjectList().ToList(); |
|
46 |
|
|
47 | 45 |
if (this.radGridViewGroup.DataSource != null) |
48 | 46 |
{ |
49 | 47 |
this.radGridViewGroup.DataSource = null; |
50 | 48 |
} |
51 |
this.radGridViewGroup.DataSource = this.Projects.Where(x => x.Level.Equals(1));
|
|
49 |
this.radGridViewGroup.DataSource = informations.ProjectList.Where(x => x.Level.Equals(1));
|
|
52 | 50 |
} |
53 | 51 |
|
54 | 52 |
private void RadGridViewGroup_SelectionChanged(object sender, EventArgs e) |
... | ... | |
62 | 60 |
|
63 | 61 |
var projectGroup = this.radGridViewGroup.SelectedRows[0].DataBoundItem as ProjectInfo; |
64 | 62 |
|
65 |
this.radGridViewProjects.DataSource = this.Projects.Where(x => x.Level.Equals(2) && x.GroupID.Equals(projectGroup.ProjectID));
|
|
63 |
this.radGridViewProjects.DataSource = informations.ProjectList.Where(x => x.Level.Equals(2) && x.GroupID.Equals(projectGroup.ProjectID));
|
|
66 | 64 |
} |
67 | 65 |
|
68 | 66 |
private void RadGridViewGroup_CellDoubleClick(object sender, GridViewCellEventArgs e) |
69 | 67 |
{ |
70 | 68 |
if (this.radGridViewGroup.SelectedRows.Count == 0) return; |
71 | 69 |
|
72 |
var projectGroup = this.radGridViewGroup.SelectedRows[0].DataBoundItem as ProjectInfo;
|
|
70 |
var selectedProjectGroup = this.radGridViewGroup.SelectedRows[0].DataBoundItem as ProjectInfo;
|
|
73 | 71 |
|
74 |
using (var frm = new SetupProject(this.Projects, projectGroup))
|
|
72 |
using (var frm = new SetupProject(selectedProjectGroup))
|
|
75 | 73 |
{ |
76 | 74 |
if (frm.ShowDialog(this) == DialogResult.OK) |
77 | 75 |
{ |
... | ... | |
82 | 80 |
|
83 | 81 |
private void RadButtonNew_Click(object sender, EventArgs e) |
84 | 82 |
{ |
85 |
using (var frm = new SetupProject(this.Projects))
|
|
83 |
using (var frm = new SetupProject()) |
|
86 | 84 |
{ |
87 | 85 |
if (frm.ShowDialog(this) == DialogResult.OK) |
88 | 86 |
{ |
... | ... | |
125 | 123 |
|
126 | 124 |
var projectGroup = this.radGridViewGroup.SelectedRows[0].DataBoundItem as ProjectInfo; |
127 | 125 |
|
128 |
OpenProjectClick?.Invoke(this, new ProjectEventArgs(projectGroup, this.Projects));
|
|
126 |
OpenProjectClick?.Invoke(this, new ProjectEventArgs(projectGroup)); |
|
129 | 127 |
} |
130 | 128 |
} |
131 | 129 |
|
... | ... | |
137 | 135 |
get { return _ProjectInfo; } |
138 | 136 |
} |
139 | 137 |
|
140 |
private List<ProjectInfo> _ProjectList = null; |
|
141 |
public List<ProjectInfo> ProjectList |
|
142 |
{ |
|
143 |
get { return _ProjectList; } |
|
144 |
} |
|
145 |
|
|
146 |
public ProjectEventArgs(ProjectInfo projectInfo, List<ProjectInfo> projectList) |
|
138 |
public ProjectEventArgs(ProjectInfo projectInfo) |
|
147 | 139 |
{ |
148 | 140 |
this._ProjectInfo = projectInfo; |
149 |
this._ProjectList = projectList; |
|
150 | 141 |
} |
151 | 142 |
} |
152 | 143 |
} |
ID2.Manager/ID2.Manager/Forms/Login.cs | ||
---|---|---|
94 | 94 |
|
95 | 95 |
//체크완료 시 로그인 |
96 | 96 |
Program.informations.ActiveUser = userInfo; |
97 |
IEnumerable<UserInfo> allUserList = new UserController().GetAllUserInfo(); |
|
98 |
allUserList.ToList().ForEach(x => Program.informations.UserList.Add(x.DeepCopy(x))); |
|
99 |
Program.informations.ProjectList = new ProjectController().GetAllProjectList().ToList(); |
|
97 | 100 |
|
98 | 101 |
SaveConfig(userInfo); |
99 | 102 |
|
ID2.Manager/ID2.Manager/Forms/SetupProject.cs | ||
---|---|---|
8 | 8 |
using System.Threading.Tasks; |
9 | 9 |
using System.Windows.Forms; |
10 | 10 |
|
11 |
using ID2.Manager.Common; |
|
11 | 12 |
using ID2.Manager.Data.Models; |
12 | 13 |
using ID2.Manager.Controller.Controllers; |
13 | 14 |
|
... | ... | |
18 | 19 |
{ |
19 | 20 |
public partial class SetupProject : RadForm |
20 | 21 |
{ |
21 |
List<ProjectInfo> Projects = null;
|
|
22 |
readonly Informations informations = Informations.Instance;
|
|
22 | 23 |
ProjectInfo ProjectInfo = null; |
23 | 24 |
|
24 |
public SetupProject(List<ProjectInfo> allProjs)
|
|
25 |
public SetupProject() |
|
25 | 26 |
{ |
26 | 27 |
InitializeComponent(); |
27 | 28 |
|
28 | 29 |
this.Initialize(); |
29 |
|
|
30 |
this.Projects = allProjs; |
|
31 | 30 |
} |
32 | 31 |
|
33 |
public SetupProject(List<ProjectInfo> allProjs, ProjectInfo projectInfo)
|
|
32 |
public SetupProject(ProjectInfo projectInfo) |
|
34 | 33 |
{ |
35 | 34 |
InitializeComponent(); |
36 | 35 |
|
37 | 36 |
this.Initialize(); |
38 | 37 |
|
39 |
this.Projects = allProjs; |
|
40 | 38 |
this.ProjectInfo = projectInfo; |
41 | 39 |
} |
42 | 40 |
|
... | ... | |
54 | 52 |
public void GetProjectList() |
55 | 53 |
{ |
56 | 54 |
var id2Project = new ID2Controller().GetID2ProjectList().ToList(); |
57 |
List<ProjectInfo> prjs = this.Projects.Where(x => x.Level.Equals(2)).ToList();
|
|
55 |
List<ProjectInfo> prjs = informations.ProjectList.Where(x => x.Level.Equals(2)).ToList();
|
|
58 | 56 |
|
59 | 57 |
if (this.ProjectInfo != null) |
60 | 58 |
{ |
ID2.Manager/ID2.Manager/Forms/SetupUser.cs | ||
---|---|---|
11 | 11 |
using ID2.Manager.Common; |
12 | 12 |
using ID2.Manager.Data.Models; |
13 | 13 |
|
14 |
using Telerik.WinControls; |
|
15 |
using Telerik.WinControls.UI; |
|
16 |
|
|
14 | 17 |
namespace ID2.Manager.Forms |
15 | 18 |
{ |
16 |
public partial class SetupUser : Form |
|
19 |
public partial class SetupUser : RadForm
|
|
17 | 20 |
{ |
18 | 21 |
readonly Informations informations = Informations.Instance; |
19 | 22 |
|
ID2.Manager/ID2.Manager/Main.cs | ||
---|---|---|
159 | 159 |
#region Init, Load |
160 | 160 |
private void Initialize() |
161 | 161 |
{ |
162 |
IEnumerable<UserInfo> allUserList = new UserController().GetAllUserInfo(); |
|
163 |
allUserList.ToList().ForEach(x => informations.UserList.Add(x.DeepCopy(x))); |
|
164 |
|
|
165 | 162 |
this.radLabelElementUser.Text = $"{informations.ActiveUser.ID} {informations.ActiveUser.Name}"; |
166 | 163 |
|
167 | 164 |
if ((new string[] { "Manager", "User" }).Contains(informations.ActiveUser.Role) && string.IsNullOrEmpty(informations.ActiveUser.RefProjectID)) |
... | ... | |
359 | 356 |
var prjArgs = this.radRibbonBarBackstageViewID2Manager.Tag as ProjectEventArgs; |
360 | 357 |
|
361 | 358 |
informations.ActiveProject = prjArgs.ProjectInfo; |
362 |
informations.ProjectList = prjArgs.ProjectList; |
|
363 | 359 |
|
364 | 360 |
this.radRibbonBarBackstageViewID2Manager.Tag = null; |
365 | 361 |
|
내보내기 Unified diff