개정판 87bcedb4
issue #0000
프로젝트 정보 조회 수정 진행
Change-Id: I56cbbd015a53bfcd939e5eff77d383238caf37c7
ID2.Manager/ID2.Manager.Controller/Controllers/ProjectController.cs | ||
---|---|---|
11 | 11 |
{ |
12 | 12 |
public class ProjectController : BaseController |
13 | 13 |
{ |
14 |
public IEnumerable<ProjectInfo> GetAllProjectList() |
|
15 |
{ |
|
16 |
using (ProjectRepository rep = new ProjectRepository(this._DbConnectionStr)) |
|
17 |
{ |
|
18 |
return rep.GetAllProjectList(); |
|
19 |
} |
|
20 |
} |
|
21 |
|
|
14 | 22 |
public IEnumerable<ProjectInfo> GetProjectGroupList() |
15 | 23 |
{ |
16 | 24 |
using (ProjectRepository rep = new ProjectRepository(this._DbConnectionStr)) |
ID2.Manager/ID2.Manager.Dapper/Repository/ProjectRepository.cs | ||
---|---|---|
12 | 12 |
{ |
13 | 13 |
public ProjectRepository(string connectionStr) : base(connectionStr) { } |
14 | 14 |
|
15 |
public IEnumerable<ProjectInfo> GetAllProjectList() |
|
16 |
{ |
|
17 |
string query = $@" |
|
18 |
;with Prj as |
|
19 |
( |
|
20 |
select ProjectID |
|
21 |
,Code |
|
22 |
,[Name] |
|
23 |
,isnull(Description,'') Description |
|
24 |
,isnull(ID2Path,'') ID2Path |
|
25 |
,isnull(ParentID,'') GroupID |
|
26 |
,convert(varchar(255),'') GroupName |
|
27 |
,1 [Level] |
|
28 |
from dbo.Projects |
|
29 |
where ParentID is null |
|
30 |
|
|
31 |
UNION ALL |
|
32 |
|
|
33 |
select p.ProjectID |
|
34 |
,p.Code |
|
35 |
,p.[Name] |
|
36 |
,p.Description |
|
37 |
,p.ID2Path |
|
38 |
,p.ParentID GroupID |
|
39 |
,pp.[Name] GroupName |
|
40 |
,pp.[Level]+1 [Level] |
|
41 |
FROM dbo.Projects p |
|
42 |
inner join Prj pp ON p.ParentID=pp.ProjectID |
|
43 |
) |
|
44 |
select * |
|
45 |
from prj |
|
46 |
order by [Level], [Name];"; |
|
47 |
|
|
48 |
return Query<ProjectInfo>(query); |
|
49 |
} |
|
50 |
|
|
15 | 51 |
public IEnumerable<ProjectInfo> GetProjectGroupList() |
16 | 52 |
{ |
17 | 53 |
string query = $@" |
ID2.Manager/ID2.Manager.Dapper/Repository/UserRepository.cs | ||
---|---|---|
21 | 21 |
|
22 | 22 |
public UserInfo GetUserInfo(string userId, string userPW) |
23 | 23 |
{ |
24 |
string query = $@" |
|
25 |
select * from dbo.Users where ID=@userId and Password=@userPW"; |
|
24 |
string query = $@"select * from dbo.Users where ID=@userId and Password=@userPW"; |
|
26 | 25 |
|
27 | 26 |
return Query<UserInfo>(query, new { userId, userPW }).FirstOrDefault(); |
28 | 27 |
} |
ID2.Manager/ID2.Manager.Data/Models/UserInfo.cs | ||
---|---|---|
13 | 13 |
{ |
14 | 14 |
[DataMember] |
15 | 15 |
public string UID { get; set; } |
16 |
|
|
17 | 16 |
[DataMember] |
18 | 17 |
public string ID { get; set; } |
19 |
|
|
20 | 18 |
[DataMember] |
21 | 19 |
public string Name { get; set; } |
22 |
|
|
23 | 20 |
[DataMember] |
24 | 21 |
public string Password { get; set; } |
25 |
|
|
26 |
[DataMember] |
|
27 |
public DateTime Registered { get; set; } |
|
28 |
|
|
29 | 22 |
[DataMember] |
30 | 23 |
public string Role { get; set; } |
31 |
|
|
32 |
|
|
33 | 24 |
[DataMember] |
34 |
public string CompanyUID { get; set; } |
|
35 |
|
|
36 |
|
|
25 |
public string RefProjectID { get; set; } |
|
37 | 26 |
[DataMember] |
38 |
public string CompanyName { get; set; } |
|
39 |
|
|
40 |
|
|
27 |
public string Company_UID { get; set; } |
|
41 | 28 |
[DataMember] |
42 |
public string CompanyDescription { get; set; }
|
|
29 |
public DateTime Registered { get; set; }
|
|
43 | 30 |
} |
44 | 31 |
} |
ID2.Manager/ID2.Manager/Controls/OpenProjectView.Designer.cs | ||
---|---|---|
30 | 30 |
{ |
31 | 31 |
Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn1 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); |
32 | 32 |
Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn2 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); |
33 |
Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn3 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); |
|
34 | 33 |
Telerik.WinControls.UI.TableViewDefinition tableViewDefinition1 = new Telerik.WinControls.UI.TableViewDefinition(); |
34 |
Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn3 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); |
|
35 | 35 |
Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn4 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); |
36 |
Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn5 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); |
|
37 | 36 |
Telerik.WinControls.UI.TableViewDefinition tableViewDefinition2 = new Telerik.WinControls.UI.TableViewDefinition(); |
38 | 37 |
this.tableLayoutPanelProject = new System.Windows.Forms.TableLayoutPanel(); |
39 | 38 |
this.radGridViewProjects = new Telerik.WinControls.UI.RadGridView(); |
... | ... | |
41 | 40 |
this.tableLayoutPanelButton = new System.Windows.Forms.TableLayoutPanel(); |
42 | 41 |
this.radButtonOpen = new Telerik.WinControls.UI.RadButton(); |
43 | 42 |
this.radButtonClose = new Telerik.WinControls.UI.RadButton(); |
43 |
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); |
|
44 |
this.radButtonNew = new Telerik.WinControls.UI.RadButton(); |
|
44 | 45 |
this.tableLayoutPanelProject.SuspendLayout(); |
45 | 46 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewProjects)).BeginInit(); |
46 | 47 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewProjects.MasterTemplate)).BeginInit(); |
... | ... | |
49 | 50 |
this.tableLayoutPanelButton.SuspendLayout(); |
50 | 51 |
((System.ComponentModel.ISupportInitialize)(this.radButtonOpen)).BeginInit(); |
51 | 52 |
((System.ComponentModel.ISupportInitialize)(this.radButtonClose)).BeginInit(); |
53 |
this.tableLayoutPanel1.SuspendLayout(); |
|
54 |
((System.ComponentModel.ISupportInitialize)(this.radButtonNew)).BeginInit(); |
|
52 | 55 |
this.SuspendLayout(); |
53 | 56 |
// |
54 | 57 |
// tableLayoutPanelProject |
55 | 58 |
// |
56 | 59 |
this.tableLayoutPanelProject.ColumnCount = 4; |
57 | 60 |
this.tableLayoutPanelProject.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); |
58 |
this.tableLayoutPanelProject.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
|
59 |
this.tableLayoutPanelProject.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
|
61 |
this.tableLayoutPanelProject.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 350F));
|
|
62 |
this.tableLayoutPanelProject.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
|
60 | 63 |
this.tableLayoutPanelProject.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); |
61 |
this.tableLayoutPanelProject.Controls.Add(this.radGridViewProjects, 2, 1); |
|
62 |
this.tableLayoutPanelProject.Controls.Add(this.radGridViewGroup, 1, 1); |
|
63 |
this.tableLayoutPanelProject.Controls.Add(this.tableLayoutPanelButton, 1, 2); |
|
64 |
this.tableLayoutPanelProject.Controls.Add(this.tableLayoutPanel1, 1, 1); |
|
65 |
this.tableLayoutPanelProject.Controls.Add(this.radGridViewProjects, 2, 2); |
|
66 |
this.tableLayoutPanelProject.Controls.Add(this.radGridViewGroup, 1, 2); |
|
67 |
this.tableLayoutPanelProject.Controls.Add(this.tableLayoutPanelButton, 1, 3); |
|
64 | 68 |
this.tableLayoutPanelProject.Location = new System.Drawing.Point(0, 0); |
65 | 69 |
this.tableLayoutPanelProject.Name = "tableLayoutPanelProject"; |
66 |
this.tableLayoutPanelProject.RowCount = 4;
|
|
70 |
this.tableLayoutPanelProject.RowCount = 5;
|
|
67 | 71 |
this.tableLayoutPanelProject.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); |
72 |
this.tableLayoutPanelProject.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F)); |
|
68 | 73 |
this.tableLayoutPanelProject.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); |
69 | 74 |
this.tableLayoutPanelProject.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F)); |
70 | 75 |
this.tableLayoutPanelProject.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); |
71 |
this.tableLayoutPanelProject.Size = new System.Drawing.Size(920, 549);
|
|
76 |
this.tableLayoutPanelProject.Size = new System.Drawing.Size(997, 549);
|
|
72 | 77 |
this.tableLayoutPanelProject.TabIndex = 0; |
73 | 78 |
// |
74 | 79 |
// radGridViewProjects |
75 | 80 |
// |
76 | 81 |
this.radGridViewProjects.Dock = System.Windows.Forms.DockStyle.Fill; |
77 |
this.radGridViewProjects.Location = new System.Drawing.Point(463, 23); |
|
78 |
// |
|
79 |
// |
|
80 |
// |
|
81 |
gridViewTextBoxColumn1.FieldName = "Code"; |
|
82 |
gridViewTextBoxColumn1.HeaderText = "Project Code"; |
|
83 |
gridViewTextBoxColumn1.Name = "Code"; |
|
84 |
gridViewTextBoxColumn1.Width = 100; |
|
85 |
gridViewTextBoxColumn2.FieldName = "Name"; |
|
86 |
gridViewTextBoxColumn2.HeaderText = "Project Name"; |
|
87 |
gridViewTextBoxColumn2.Name = "Name"; |
|
88 |
gridViewTextBoxColumn2.Width = 150; |
|
89 |
gridViewTextBoxColumn3.FieldName = "ID2Path"; |
|
90 |
gridViewTextBoxColumn3.HeaderText = "Path"; |
|
91 |
gridViewTextBoxColumn3.Name = "ID2Path"; |
|
92 |
gridViewTextBoxColumn3.Width = 150; |
|
82 |
this.radGridViewProjects.Location = new System.Drawing.Point(373, 58); |
|
83 |
// |
|
84 |
// |
|
85 |
// |
|
86 |
this.radGridViewProjects.MasterTemplate.AllowAddNewRow = false; |
|
87 |
this.radGridViewProjects.MasterTemplate.AllowDeleteRow = false; |
|
88 |
this.radGridViewProjects.MasterTemplate.AllowEditRow = false; |
|
89 |
gridViewTextBoxColumn1.FieldName = "Name"; |
|
90 |
gridViewTextBoxColumn1.HeaderText = "Area"; |
|
91 |
gridViewTextBoxColumn1.Name = "Name"; |
|
92 |
gridViewTextBoxColumn1.Width = 150; |
|
93 |
gridViewTextBoxColumn2.FieldName = "ID2Path"; |
|
94 |
gridViewTextBoxColumn2.HeaderText = "Path"; |
|
95 |
gridViewTextBoxColumn2.Name = "ID2Path"; |
|
96 |
gridViewTextBoxColumn2.Width = 250; |
|
93 | 97 |
this.radGridViewProjects.MasterTemplate.Columns.AddRange(new Telerik.WinControls.UI.GridViewDataColumn[] { |
94 | 98 |
gridViewTextBoxColumn1, |
95 |
gridViewTextBoxColumn2,
|
|
96 |
gridViewTextBoxColumn3});
|
|
99 |
gridViewTextBoxColumn2});
|
|
100 |
this.radGridViewProjects.MasterTemplate.EnableGrouping = false;
|
|
97 | 101 |
this.radGridViewProjects.MasterTemplate.ViewDefinition = tableViewDefinition1; |
98 | 102 |
this.radGridViewProjects.Name = "radGridViewProjects"; |
99 |
this.radGridViewProjects.Size = new System.Drawing.Size(434, 468);
|
|
103 |
this.radGridViewProjects.Size = new System.Drawing.Size(601, 433);
|
|
100 | 104 |
this.radGridViewProjects.TabIndex = 7; |
101 | 105 |
// |
102 | 106 |
// radGridViewGroup |
103 | 107 |
// |
104 | 108 |
this.radGridViewGroup.Dock = System.Windows.Forms.DockStyle.Fill; |
105 |
this.radGridViewGroup.Location = new System.Drawing.Point(23, 23);
|
|
109 |
this.radGridViewGroup.Location = new System.Drawing.Point(23, 58);
|
|
106 | 110 |
// |
107 | 111 |
// |
108 | 112 |
// |
109 |
gridViewTextBoxColumn4.FieldName = "Code"; |
|
110 |
gridViewTextBoxColumn4.HeaderText = "Project Code"; |
|
111 |
gridViewTextBoxColumn4.Name = "Code"; |
|
112 |
gridViewTextBoxColumn4.Width = 100; |
|
113 |
gridViewTextBoxColumn5.FieldName = "Name"; |
|
114 |
gridViewTextBoxColumn5.HeaderText = "Project Name"; |
|
115 |
gridViewTextBoxColumn5.Name = "Name"; |
|
116 |
gridViewTextBoxColumn5.Width = 200; |
|
113 |
this.radGridViewGroup.MasterTemplate.AllowAddNewRow = false; |
|
114 |
this.radGridViewGroup.MasterTemplate.AllowDeleteRow = false; |
|
115 |
this.radGridViewGroup.MasterTemplate.AllowEditRow = false; |
|
116 |
gridViewTextBoxColumn3.FieldName = "Code"; |
|
117 |
gridViewTextBoxColumn3.HeaderText = "Code"; |
|
118 |
gridViewTextBoxColumn3.Name = "Code"; |
|
119 |
gridViewTextBoxColumn3.Width = 100; |
|
120 |
gridViewTextBoxColumn4.FieldName = "Name"; |
|
121 |
gridViewTextBoxColumn4.HeaderText = "Name"; |
|
122 |
gridViewTextBoxColumn4.Name = "Name"; |
|
123 |
gridViewTextBoxColumn4.Width = 200; |
|
117 | 124 |
this.radGridViewGroup.MasterTemplate.Columns.AddRange(new Telerik.WinControls.UI.GridViewDataColumn[] { |
118 |
gridViewTextBoxColumn4, |
|
119 |
gridViewTextBoxColumn5}); |
|
125 |
gridViewTextBoxColumn3, |
|
126 |
gridViewTextBoxColumn4}); |
|
127 |
this.radGridViewGroup.MasterTemplate.EnableGrouping = false; |
|
120 | 128 |
this.radGridViewGroup.MasterTemplate.ViewDefinition = tableViewDefinition2; |
121 | 129 |
this.radGridViewGroup.Name = "radGridViewGroup"; |
122 |
this.radGridViewGroup.Size = new System.Drawing.Size(434, 468);
|
|
130 |
this.radGridViewGroup.Size = new System.Drawing.Size(344, 433);
|
|
123 | 131 |
this.radGridViewGroup.TabIndex = 0; |
124 | 132 |
// |
125 | 133 |
// tableLayoutPanelButton |
... | ... | |
137 | 145 |
this.tableLayoutPanelButton.RowCount = 1; |
138 | 146 |
this.tableLayoutPanelButton.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); |
139 | 147 |
this.tableLayoutPanelButton.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); |
140 |
this.tableLayoutPanelButton.Size = new System.Drawing.Size(874, 29);
|
|
148 |
this.tableLayoutPanelButton.Size = new System.Drawing.Size(951, 29);
|
|
141 | 149 |
this.tableLayoutPanelButton.TabIndex = 8; |
142 | 150 |
// |
143 | 151 |
// radButtonOpen |
144 | 152 |
// |
145 |
this.radButtonOpen.Location = new System.Drawing.Point(717, 3);
|
|
153 |
this.radButtonOpen.Location = new System.Drawing.Point(794, 3);
|
|
146 | 154 |
this.radButtonOpen.Name = "radButtonOpen"; |
147 | 155 |
this.radButtonOpen.Size = new System.Drawing.Size(74, 23); |
148 | 156 |
this.radButtonOpen.TabIndex = 0; |
... | ... | |
150 | 158 |
// |
151 | 159 |
// radButtonClose |
152 | 160 |
// |
153 |
this.radButtonClose.Location = new System.Drawing.Point(797, 3);
|
|
161 |
this.radButtonClose.Location = new System.Drawing.Point(874, 3);
|
|
154 | 162 |
this.radButtonClose.Name = "radButtonClose"; |
155 | 163 |
this.radButtonClose.Size = new System.Drawing.Size(74, 23); |
156 | 164 |
this.radButtonClose.TabIndex = 1; |
157 | 165 |
this.radButtonClose.Text = "Close"; |
158 | 166 |
// |
167 |
// tableLayoutPanel1 |
|
168 |
// |
|
169 |
this.tableLayoutPanel1.ColumnCount = 3; |
|
170 |
this.tableLayoutPanelProject.SetColumnSpan(this.tableLayoutPanel1, 2); |
|
171 |
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F)); |
|
172 |
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F)); |
|
173 |
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); |
|
174 |
this.tableLayoutPanel1.Controls.Add(this.radButtonNew, 0, 0); |
|
175 |
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; |
|
176 |
this.tableLayoutPanel1.Location = new System.Drawing.Point(23, 23); |
|
177 |
this.tableLayoutPanel1.Name = "tableLayoutPanel1"; |
|
178 |
this.tableLayoutPanel1.RowCount = 1; |
|
179 |
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); |
|
180 |
this.tableLayoutPanel1.Size = new System.Drawing.Size(951, 29); |
|
181 |
this.tableLayoutPanel1.TabIndex = 9; |
|
182 |
// |
|
183 |
// radButtonNew |
|
184 |
// |
|
185 |
this.radButtonNew.Location = new System.Drawing.Point(3, 3); |
|
186 |
this.radButtonNew.Name = "radButtonNew"; |
|
187 |
this.radButtonNew.Size = new System.Drawing.Size(74, 23); |
|
188 |
this.radButtonNew.TabIndex = 0; |
|
189 |
this.radButtonNew.Text = "New"; |
|
190 |
// |
|
159 | 191 |
// OpenProjectView |
160 | 192 |
// |
161 | 193 |
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); |
162 | 194 |
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
163 | 195 |
this.Controls.Add(this.tableLayoutPanelProject); |
164 | 196 |
this.Name = "OpenProjectView"; |
165 |
this.Size = new System.Drawing.Size(920, 549);
|
|
197 |
this.Size = new System.Drawing.Size(1000, 550);
|
|
166 | 198 |
this.tableLayoutPanelProject.ResumeLayout(false); |
167 | 199 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewProjects.MasterTemplate)).EndInit(); |
168 | 200 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewProjects)).EndInit(); |
... | ... | |
171 | 203 |
this.tableLayoutPanelButton.ResumeLayout(false); |
172 | 204 |
((System.ComponentModel.ISupportInitialize)(this.radButtonOpen)).EndInit(); |
173 | 205 |
((System.ComponentModel.ISupportInitialize)(this.radButtonClose)).EndInit(); |
206 |
this.tableLayoutPanel1.ResumeLayout(false); |
|
207 |
((System.ComponentModel.ISupportInitialize)(this.radButtonNew)).EndInit(); |
|
174 | 208 |
this.ResumeLayout(false); |
175 | 209 |
|
176 | 210 |
} |
... | ... | |
183 | 217 |
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelButton; |
184 | 218 |
private Telerik.WinControls.UI.RadButton radButtonOpen; |
185 | 219 |
private Telerik.WinControls.UI.RadButton radButtonClose; |
220 |
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; |
|
221 |
private Telerik.WinControls.UI.RadButton radButtonNew; |
|
186 | 222 |
} |
187 | 223 |
} |
ID2.Manager/ID2.Manager/Controls/OpenProjectView.cs | ||
---|---|---|
8 | 8 |
using System.Threading.Tasks; |
9 | 9 |
using System.Windows.Forms; |
10 | 10 |
|
11 |
using ID2.Manager.Forms; |
|
11 | 12 |
using ID2.Manager.Data.Models; |
12 | 13 |
using ID2.Manager.Controller.Controllers; |
13 | 14 |
|
15 |
using Telerik.WinControls; |
|
16 |
using Telerik.WinControls.UI; |
|
17 |
|
|
14 | 18 |
namespace ID2.Manager.Controls |
15 | 19 |
{ |
16 | 20 |
public partial class OpenProjectView : UserControl |
17 | 21 |
{ |
18 |
ProjectInfo ProjectGroup = null; |
|
19 | 22 |
List<ProjectInfo> Projects = new List<ProjectInfo>(); |
20 | 23 |
public event EventHandler OpenProjectClick; |
21 | 24 |
|
... | ... | |
25 | 28 |
|
26 | 29 |
this.Load += OpenProjectView_Load; |
27 | 30 |
this.radGridViewGroup.SelectionChanged += RadGridViewGroup_SelectionChanged; |
31 |
this.radButtonNew.Click += RadButtonNew_Click; |
|
28 | 32 |
this.radButtonOpen.Click += RadButtonOpen_Click; |
29 | 33 |
} |
30 | 34 |
|
35 |
private void RadButtonNew_Click(object sender, EventArgs e) |
|
36 |
{ |
|
37 |
using (var frm = new SetupProject()) |
|
38 |
{ |
|
39 |
frm.ShowDialog(this); |
|
40 |
} |
|
41 |
} |
|
42 |
|
|
31 | 43 |
private void OpenProjectView_Load(object sender, EventArgs e) |
32 | 44 |
{ |
45 |
this.Projects = new ProjectController().GetAllProjectList().ToList(); |
|
46 |
|
|
33 | 47 |
this.GetProjectGroups(); |
34 | 48 |
} |
35 | 49 |
|
36 | 50 |
public void GetProjectGroups() |
37 | 51 |
{ |
38 |
var projects = new ProjectController().GetProjectGroupList(); |
|
39 |
|
|
40 |
this.radGridViewGroup.DataSource = projects; |
|
52 |
this.radGridViewGroup.DataSource = this.Projects.Where(x => x.Level.Equals(1)); |
|
41 | 53 |
} |
42 | 54 |
|
43 | 55 |
private void RadGridViewGroup_SelectionChanged(object sender, EventArgs e) |
44 | 56 |
{ |
45 | 57 |
if (this.radGridViewGroup.SelectedRows.Count == 0) return; |
46 | 58 |
|
47 |
this.ProjectGroup = this.radGridViewGroup.SelectedRows[0].DataBoundItem as ProjectInfo;
|
|
59 |
var projectGroup = this.radGridViewGroup.SelectedRows[0].DataBoundItem as ProjectInfo;
|
|
48 | 60 |
|
49 | 61 |
if (this.radGridViewProjects.DataSource != null) |
50 | 62 |
{ |
51 | 63 |
this.radGridViewProjects.DataSource = null; |
52 | 64 |
} |
53 |
|
|
54 |
this.Projects = new ProjectController().GetProjectList(this.ProjectGroup.ProjectID, false).ToList(); |
|
55 |
this.radGridViewProjects.DataSource = this.Projects; |
|
65 |
this.radGridViewProjects.DataSource = this.Projects.Where(x => x.Level.Equals(2) && x.GroupID.Equals(projectGroup.ProjectID)); |
|
56 | 66 |
} |
57 | 67 |
|
58 | 68 |
private void RadButtonOpen_Click(object sender, EventArgs e) |
59 | 69 |
{ |
60 | 70 |
//OpenProjectClick(this, new CaseEventArgs(this.SelectedProject, this.SelectedCase)); |
61 |
OpenProjectClick?.Invoke(this, new ProjectEventArgs(this.ProjectGroup, this.Projects)); |
|
71 |
|
|
72 |
if (this.radGridViewGroup.SelectedRows.Count == 0) |
|
73 |
{ |
|
74 |
RadMessageBox.Show("Please select a project.", "Error", MessageBoxButtons.OK, RadMessageIcon.Info); |
|
75 |
return; |
|
76 |
} |
|
77 |
|
|
78 |
var projectGroup = this.radGridViewGroup.SelectedRows[0].DataBoundItem as ProjectInfo; |
|
79 |
|
|
80 |
OpenProjectClick?.Invoke(this, new ProjectEventArgs(projectGroup, this.Projects)); |
|
62 | 81 |
} |
63 | 82 |
} |
64 | 83 |
|
ID2.Manager/ID2.Manager/Forms/SetupProject.Designer.cs | ||
---|---|---|
29 | 29 |
/// </summary> |
30 | 30 |
private void InitializeComponent() |
31 | 31 |
{ |
32 |
Telerik.WinControls.UI.TableViewDefinition tableViewDefinition1 = new Telerik.WinControls.UI.TableViewDefinition(); |
|
33 |
Telerik.WinControls.UI.TableViewDefinition tableViewDefinition2 = new Telerik.WinControls.UI.TableViewDefinition(); |
|
32 |
Telerik.WinControls.UI.GridViewCheckBoxColumn gridViewCheckBoxColumn3 = new Telerik.WinControls.UI.GridViewCheckBoxColumn(); |
|
33 |
Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn7 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); |
|
34 |
Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn8 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); |
|
35 |
Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn9 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); |
|
36 |
Telerik.WinControls.UI.TableViewDefinition tableViewDefinition3 = new Telerik.WinControls.UI.TableViewDefinition(); |
|
34 | 37 |
this.tableLayoutPanelWrap = new System.Windows.Forms.TableLayoutPanel(); |
35 |
this.radSplitContainer1 = new Telerik.WinControls.UI.RadSplitContainer(); |
|
36 |
this.splitPanelProject = new Telerik.WinControls.UI.SplitPanel(); |
|
37 |
this.splitPanelID2Project = new Telerik.WinControls.UI.SplitPanel(); |
|
38 |
this.radGridViewProject = new Telerik.WinControls.UI.RadGridView(); |
|
38 |
this.radThemeManager1 = new Telerik.WinControls.RadThemeManager(); |
|
39 |
this.radLabelProjectCode = new Telerik.WinControls.UI.RadLabel(); |
|
40 |
this.radLabelProjectName = new Telerik.WinControls.UI.RadLabel(); |
|
41 |
this.radTextBoxProjectCode = new Telerik.WinControls.UI.RadTextBox(); |
|
42 |
this.radTextBoxProjectName = new Telerik.WinControls.UI.RadTextBox(); |
|
39 | 43 |
this.radGridViewID2Project = new Telerik.WinControls.UI.RadGridView(); |
44 |
this.radLabelDescription = new Telerik.WinControls.UI.RadLabel(); |
|
45 |
this.radGroupBoxID2 = new Telerik.WinControls.UI.RadGroupBox(); |
|
46 |
this.radTextBoxDescription = new Telerik.WinControls.UI.RadTextBox(); |
|
47 |
this.radButtonSave = new Telerik.WinControls.UI.RadButton(); |
|
40 | 48 |
this.tableLayoutPanelWrap.SuspendLayout(); |
41 |
((System.ComponentModel.ISupportInitialize)(this.radSplitContainer1)).BeginInit(); |
|
42 |
this.radSplitContainer1.SuspendLayout(); |
|
43 |
((System.ComponentModel.ISupportInitialize)(this.splitPanelProject)).BeginInit(); |
|
44 |
this.splitPanelProject.SuspendLayout(); |
|
45 |
((System.ComponentModel.ISupportInitialize)(this.splitPanelID2Project)).BeginInit(); |
|
46 |
this.splitPanelID2Project.SuspendLayout(); |
|
47 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewProject)).BeginInit(); |
|
48 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewProject.MasterTemplate)).BeginInit(); |
|
49 |
((System.ComponentModel.ISupportInitialize)(this.radLabelProjectCode)).BeginInit(); |
|
50 |
((System.ComponentModel.ISupportInitialize)(this.radLabelProjectName)).BeginInit(); |
|
51 |
((System.ComponentModel.ISupportInitialize)(this.radTextBoxProjectCode)).BeginInit(); |
|
52 |
((System.ComponentModel.ISupportInitialize)(this.radTextBoxProjectName)).BeginInit(); |
|
49 | 53 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewID2Project)).BeginInit(); |
50 | 54 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewID2Project.MasterTemplate)).BeginInit(); |
55 |
((System.ComponentModel.ISupportInitialize)(this.radLabelDescription)).BeginInit(); |
|
56 |
((System.ComponentModel.ISupportInitialize)(this.radGroupBoxID2)).BeginInit(); |
|
57 |
this.radGroupBoxID2.SuspendLayout(); |
|
58 |
((System.ComponentModel.ISupportInitialize)(this.radTextBoxDescription)).BeginInit(); |
|
59 |
((System.ComponentModel.ISupportInitialize)(this.radButtonSave)).BeginInit(); |
|
60 |
((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); |
|
51 | 61 |
this.SuspendLayout(); |
52 | 62 |
// |
53 | 63 |
// tableLayoutPanelWrap |
54 | 64 |
// |
55 |
this.tableLayoutPanelWrap.ColumnCount = 3;
|
|
65 |
this.tableLayoutPanelWrap.ColumnCount = 5;
|
|
56 | 66 |
this.tableLayoutPanelWrap.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); |
67 |
this.tableLayoutPanelWrap.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F)); |
|
68 |
this.tableLayoutPanelWrap.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 200F)); |
|
57 | 69 |
this.tableLayoutPanelWrap.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); |
58 | 70 |
this.tableLayoutPanelWrap.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); |
59 |
this.tableLayoutPanelWrap.Controls.Add(this.radSplitContainer1, 1, 1); |
|
71 |
this.tableLayoutPanelWrap.Controls.Add(this.radLabelProjectCode, 1, 2); |
|
72 |
this.tableLayoutPanelWrap.Controls.Add(this.radLabelProjectName, 1, 3); |
|
73 |
this.tableLayoutPanelWrap.Controls.Add(this.radTextBoxProjectCode, 2, 2); |
|
74 |
this.tableLayoutPanelWrap.Controls.Add(this.radTextBoxProjectName, 2, 3); |
|
75 |
this.tableLayoutPanelWrap.Controls.Add(this.radLabelDescription, 1, 4); |
|
76 |
this.tableLayoutPanelWrap.Controls.Add(this.radGroupBoxID2, 3, 2); |
|
77 |
this.tableLayoutPanelWrap.Controls.Add(this.radTextBoxDescription, 2, 4); |
|
78 |
this.tableLayoutPanelWrap.Controls.Add(this.radButtonSave, 1, 1); |
|
60 | 79 |
this.tableLayoutPanelWrap.Dock = System.Windows.Forms.DockStyle.Fill; |
61 | 80 |
this.tableLayoutPanelWrap.Location = new System.Drawing.Point(0, 0); |
62 | 81 |
this.tableLayoutPanelWrap.Name = "tableLayoutPanelWrap"; |
63 |
this.tableLayoutPanelWrap.RowCount = 3;
|
|
82 |
this.tableLayoutPanelWrap.RowCount = 7;
|
|
64 | 83 |
this.tableLayoutPanelWrap.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); |
84 |
this.tableLayoutPanelWrap.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F)); |
|
85 |
this.tableLayoutPanelWrap.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F)); |
|
86 |
this.tableLayoutPanelWrap.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F)); |
|
87 |
this.tableLayoutPanelWrap.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F)); |
|
65 | 88 |
this.tableLayoutPanelWrap.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); |
66 | 89 |
this.tableLayoutPanelWrap.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); |
67 | 90 |
this.tableLayoutPanelWrap.Size = new System.Drawing.Size(800, 450); |
68 | 91 |
this.tableLayoutPanelWrap.TabIndex = 0; |
69 | 92 |
// |
70 |
// radSplitContainer1
|
|
93 |
// radLabelProjectCode
|
|
71 | 94 |
// |
72 |
this.radSplitContainer1.Controls.Add(this.splitPanelProject); |
|
73 |
this.radSplitContainer1.Controls.Add(this.splitPanelID2Project); |
|
74 |
this.radSplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; |
|
75 |
this.radSplitContainer1.Location = new System.Drawing.Point(20, 20); |
|
76 |
this.radSplitContainer1.Name = "radSplitContainer1"; |
|
95 |
this.radLabelProjectCode.Anchor = System.Windows.Forms.AnchorStyles.Left; |
|
96 |
this.radLabelProjectCode.Location = new System.Drawing.Point(23, 63); |
|
97 |
this.radLabelProjectCode.Name = "radLabelProjectCode"; |
|
98 |
this.radLabelProjectCode.Size = new System.Drawing.Size(70, 18); |
|
99 |
this.radLabelProjectCode.TabIndex = 0; |
|
100 |
this.radLabelProjectCode.Text = "Project Code"; |
|
77 | 101 |
// |
102 |
// radLabelProjectName |
|
78 | 103 |
// |
104 |
this.radLabelProjectName.Anchor = System.Windows.Forms.AnchorStyles.Left; |
|
105 |
this.radLabelProjectName.Location = new System.Drawing.Point(23, 98); |
|
106 |
this.radLabelProjectName.Name = "radLabelProjectName"; |
|
107 |
this.radLabelProjectName.Size = new System.Drawing.Size(74, 18); |
|
108 |
this.radLabelProjectName.TabIndex = 1; |
|
109 |
this.radLabelProjectName.Text = "Project Name"; |
|
79 | 110 |
// |
80 |
this.radSplitContainer1.RootElement.MinSize = new System.Drawing.Size(25, 25); |
|
81 |
this.radSplitContainer1.Size = new System.Drawing.Size(760, 410); |
|
82 |
this.radSplitContainer1.TabIndex = 0; |
|
83 |
this.radSplitContainer1.TabStop = false; |
|
111 |
// radTextBoxProjectCode |
|
84 | 112 |
// |
85 |
// splitPanelProject |
|
113 |
this.radTextBoxProjectCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); |
|
114 |
this.radTextBoxProjectCode.Location = new System.Drawing.Point(123, 62); |
|
115 |
this.radTextBoxProjectCode.Name = "radTextBoxProjectCode"; |
|
116 |
this.radTextBoxProjectCode.Size = new System.Drawing.Size(194, 20); |
|
117 |
this.radTextBoxProjectCode.TabIndex = 2; |
|
86 | 118 |
// |
87 |
this.splitPanelProject.Controls.Add(this.radGridViewProject); |
|
88 |
this.splitPanelProject.Location = new System.Drawing.Point(0, 0); |
|
89 |
this.splitPanelProject.Name = "splitPanelProject"; |
|
119 |
// radTextBoxProjectName |
|
90 | 120 |
// |
121 |
this.radTextBoxProjectName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); |
|
122 |
this.radTextBoxProjectName.Location = new System.Drawing.Point(123, 97); |
|
123 |
this.radTextBoxProjectName.Name = "radTextBoxProjectName"; |
|
124 |
this.radTextBoxProjectName.Size = new System.Drawing.Size(194, 20); |
|
125 |
this.radTextBoxProjectName.TabIndex = 3; |
|
91 | 126 |
// |
127 |
// radGridViewID2Project |
|
92 | 128 |
// |
93 |
this.splitPanelProject.RootElement.MinSize = new System.Drawing.Size(25, 25); |
|
94 |
this.splitPanelProject.Size = new System.Drawing.Size(378, 410); |
|
95 |
this.splitPanelProject.TabIndex = 0; |
|
96 |
this.splitPanelProject.TabStop = false; |
|
97 |
// |
|
98 |
// splitPanelID2Project |
|
99 |
// |
|
100 |
this.splitPanelID2Project.Controls.Add(this.radGridViewID2Project); |
|
101 |
this.splitPanelID2Project.Location = new System.Drawing.Point(382, 0); |
|
102 |
this.splitPanelID2Project.Name = "splitPanelID2Project"; |
|
103 |
// |
|
104 |
// |
|
129 |
this.radGridViewID2Project.Dock = System.Windows.Forms.DockStyle.Fill; |
|
130 |
this.radGridViewID2Project.Location = new System.Drawing.Point(2, 18); |
|
131 |
// |
|
132 |
// |
|
133 |
// |
|
134 |
this.radGridViewID2Project.MasterTemplate.AllowAddNewRow = false; |
|
135 |
this.radGridViewID2Project.MasterTemplate.AllowDeleteRow = false; |
|
136 |
gridViewCheckBoxColumn3.HeaderText = "√"; |
|
137 |
gridViewCheckBoxColumn3.Name = "Checked"; |
|
138 |
gridViewCheckBoxColumn3.Width = 30; |
|
139 |
gridViewTextBoxColumn7.FieldName = "ProjectNo"; |
|
140 |
gridViewTextBoxColumn7.HeaderText = "Project No"; |
|
141 |
gridViewTextBoxColumn7.Name = "ProjectNo"; |
|
142 |
gridViewTextBoxColumn7.ReadOnly = true; |
|
143 |
gridViewTextBoxColumn7.Width = 80; |
|
144 |
gridViewTextBoxColumn8.FieldName = "Name"; |
|
145 |
gridViewTextBoxColumn8.HeaderText = "Name"; |
|
146 |
gridViewTextBoxColumn8.Name = "Name"; |
|
147 |
gridViewTextBoxColumn8.ReadOnly = true; |
|
148 |
gridViewTextBoxColumn8.Width = 80; |
|
149 |
gridViewTextBoxColumn9.FieldName = "Path"; |
|
150 |
gridViewTextBoxColumn9.HeaderText = "Path"; |
|
151 |
gridViewTextBoxColumn9.Name = "Path"; |
|
152 |
gridViewTextBoxColumn9.ReadOnly = true; |
|
153 |
gridViewTextBoxColumn9.Width = 260; |
|
154 |
this.radGridViewID2Project.MasterTemplate.Columns.AddRange(new Telerik.WinControls.UI.GridViewDataColumn[] { |
|
155 |
gridViewCheckBoxColumn3, |
|
156 |
gridViewTextBoxColumn7, |
|
157 |
gridViewTextBoxColumn8, |
|
158 |
gridViewTextBoxColumn9}); |
|
159 |
this.radGridViewID2Project.MasterTemplate.ViewDefinition = tableViewDefinition3; |
|
160 |
this.radGridViewID2Project.Name = "radGridViewID2Project"; |
|
161 |
this.radGridViewID2Project.Size = new System.Drawing.Size(450, 349); |
|
162 |
this.radGridViewID2Project.TabIndex = 4; |
|
105 | 163 |
// |
106 |
this.splitPanelID2Project.RootElement.MinSize = new System.Drawing.Size(25, 25); |
|
107 |
this.splitPanelID2Project.Size = new System.Drawing.Size(378, 410); |
|
108 |
this.splitPanelID2Project.TabIndex = 1; |
|
109 |
this.splitPanelID2Project.TabStop = false; |
|
164 |
// radLabelDescription |
|
110 | 165 |
// |
111 |
// radGridViewProject |
|
166 |
this.radLabelDescription.Anchor = System.Windows.Forms.AnchorStyles.Left; |
|
167 |
this.radLabelDescription.Location = new System.Drawing.Point(23, 133); |
|
168 |
this.radLabelDescription.Name = "radLabelDescription"; |
|
169 |
this.radLabelDescription.Size = new System.Drawing.Size(63, 18); |
|
170 |
this.radLabelDescription.TabIndex = 6; |
|
171 |
this.radLabelDescription.Text = "Description"; |
|
112 | 172 |
// |
113 |
this.radGridViewProject.Dock = System.Windows.Forms.DockStyle.Fill; |
|
114 |
this.radGridViewProject.Location = new System.Drawing.Point(0, 0); |
|
173 |
// radGroupBoxID2 |
|
115 | 174 |
// |
175 |
this.radGroupBoxID2.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; |
|
176 |
this.radGroupBoxID2.Controls.Add(this.radGridViewID2Project); |
|
177 |
this.radGroupBoxID2.Dock = System.Windows.Forms.DockStyle.Fill; |
|
178 |
this.radGroupBoxID2.HeaderText = "ID2 List"; |
|
179 |
this.radGroupBoxID2.Location = new System.Drawing.Point(323, 58); |
|
180 |
this.radGroupBoxID2.Name = "radGroupBoxID2"; |
|
181 |
this.tableLayoutPanelWrap.SetRowSpan(this.radGroupBoxID2, 4); |
|
182 |
this.radGroupBoxID2.Size = new System.Drawing.Size(454, 369); |
|
183 |
this.radGroupBoxID2.TabIndex = 7; |
|
184 |
this.radGroupBoxID2.Text = "ID2 List"; |
|
116 | 185 |
// |
186 |
// radTextBoxDescription |
|
117 | 187 |
// |
118 |
this.radGridViewProject.MasterTemplate.ViewDefinition = tableViewDefinition1;
|
|
119 |
this.radGridViewProject.Name = "radGridViewProject";
|
|
120 |
this.radGridViewProject.Size = new System.Drawing.Size(378, 410);
|
|
121 |
this.radGridViewProject.TabIndex = 0;
|
|
188 |
this.radTextBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill;
|
|
189 |
this.radTextBoxDescription.Location = new System.Drawing.Point(123, 128);
|
|
190 |
this.radTextBoxDescription.Multiline = true;
|
|
191 |
this.radTextBoxDescription.Name = "radTextBoxDescription";
|
|
122 | 192 |
// |
123 |
// radGridViewID2Project |
|
124 | 193 |
// |
125 |
this.radGridViewID2Project.Dock = System.Windows.Forms.DockStyle.Fill; |
|
126 |
this.radGridViewID2Project.Location = new System.Drawing.Point(0, 0); |
|
127 | 194 |
// |
195 |
this.radTextBoxDescription.RootElement.StretchVertically = true; |
|
196 |
this.tableLayoutPanelWrap.SetRowSpan(this.radTextBoxDescription, 2); |
|
197 |
this.radTextBoxDescription.Size = new System.Drawing.Size(194, 299); |
|
198 |
this.radTextBoxDescription.TabIndex = 8; |
|
128 | 199 |
// |
200 |
// radButtonSave |
|
129 | 201 |
// |
130 |
this.radGridViewID2Project.MasterTemplate.ViewDefinition = tableViewDefinition2; |
|
131 |
this.radGridViewID2Project.Name = "radGridViewID2Project"; |
|
132 |
this.radGridViewID2Project.Size = new System.Drawing.Size(378, 410); |
|
133 |
this.radGridViewID2Project.TabIndex = 1; |
|
202 |
this.radButtonSave.Location = new System.Drawing.Point(23, 23); |
|
203 |
this.radButtonSave.Name = "radButtonSave"; |
|
204 |
this.radButtonSave.Size = new System.Drawing.Size(74, 23); |
|
205 |
this.radButtonSave.TabIndex = 9; |
|
206 |
this.radButtonSave.Text = "Save"; |
|
134 | 207 |
// |
135 | 208 |
// SetupProject |
136 | 209 |
// |
... | ... | |
139 | 212 |
this.ClientSize = new System.Drawing.Size(800, 450); |
140 | 213 |
this.Controls.Add(this.tableLayoutPanelWrap); |
141 | 214 |
this.Name = "SetupProject"; |
142 |
this.Text = "SetupProject"; |
|
215 |
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; |
|
216 |
this.Text = "Project Setup"; |
|
143 | 217 |
this.tableLayoutPanelWrap.ResumeLayout(false); |
144 |
((System.ComponentModel.ISupportInitialize)(this.radSplitContainer1)).EndInit(); |
|
145 |
this.radSplitContainer1.ResumeLayout(false); |
|
146 |
((System.ComponentModel.ISupportInitialize)(this.splitPanelProject)).EndInit(); |
|
147 |
this.splitPanelProject.ResumeLayout(false); |
|
148 |
((System.ComponentModel.ISupportInitialize)(this.splitPanelID2Project)).EndInit(); |
|
149 |
this.splitPanelID2Project.ResumeLayout(false); |
|
150 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewProject.MasterTemplate)).EndInit(); |
|
151 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewProject)).EndInit(); |
|
218 |
this.tableLayoutPanelWrap.PerformLayout(); |
|
219 |
((System.ComponentModel.ISupportInitialize)(this.radLabelProjectCode)).EndInit(); |
|
220 |
((System.ComponentModel.ISupportInitialize)(this.radLabelProjectName)).EndInit(); |
|
221 |
((System.ComponentModel.ISupportInitialize)(this.radTextBoxProjectCode)).EndInit(); |
|
222 |
((System.ComponentModel.ISupportInitialize)(this.radTextBoxProjectName)).EndInit(); |
|
152 | 223 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewID2Project.MasterTemplate)).EndInit(); |
153 | 224 |
((System.ComponentModel.ISupportInitialize)(this.radGridViewID2Project)).EndInit(); |
225 |
((System.ComponentModel.ISupportInitialize)(this.radLabelDescription)).EndInit(); |
|
226 |
((System.ComponentModel.ISupportInitialize)(this.radGroupBoxID2)).EndInit(); |
|
227 |
this.radGroupBoxID2.ResumeLayout(false); |
|
228 |
((System.ComponentModel.ISupportInitialize)(this.radTextBoxDescription)).EndInit(); |
|
229 |
((System.ComponentModel.ISupportInitialize)(this.radButtonSave)).EndInit(); |
|
230 |
((System.ComponentModel.ISupportInitialize)(this)).EndInit(); |
|
154 | 231 |
this.ResumeLayout(false); |
155 | 232 |
|
156 | 233 |
} |
... | ... | |
158 | 235 |
#endregion |
159 | 236 |
|
160 | 237 |
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelWrap; |
161 |
private Telerik.WinControls.UI.RadSplitContainer radSplitContainer1; |
|
162 |
private Telerik.WinControls.UI.SplitPanel splitPanelProject; |
|
163 |
private Telerik.WinControls.UI.SplitPanel splitPanelID2Project; |
|
164 |
private Telerik.WinControls.UI.RadGridView radGridViewProject; |
|
238 |
private Telerik.WinControls.RadThemeManager radThemeManager1; |
|
239 |
private Telerik.WinControls.UI.RadLabel radLabelProjectCode; |
|
240 |
private Telerik.WinControls.UI.RadLabel radLabelProjectName; |
|
241 |
private Telerik.WinControls.UI.RadTextBox radTextBoxProjectCode; |
|
242 |
private Telerik.WinControls.UI.RadTextBox radTextBoxProjectName; |
|
165 | 243 |
private Telerik.WinControls.UI.RadGridView radGridViewID2Project; |
244 |
private Telerik.WinControls.UI.RadLabel radLabelDescription; |
|
245 |
private Telerik.WinControls.UI.RadGroupBox radGroupBoxID2; |
|
246 |
private Telerik.WinControls.UI.RadTextBox radTextBoxDescription; |
|
247 |
private Telerik.WinControls.UI.RadButton radButtonSave; |
|
166 | 248 |
} |
167 | 249 |
} |
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.Data.Models; |
|
11 | 12 |
using ID2.Manager.Controller.Controllers; |
12 | 13 |
|
13 | 14 |
using Telerik.WinControls; |
... | ... | |
17 | 18 |
{ |
18 | 19 |
public partial class SetupProject : RadForm |
19 | 20 |
{ |
21 |
ProjectInfo ProjectInfo = null; |
|
22 |
|
|
20 | 23 |
public SetupProject() |
21 | 24 |
{ |
22 | 25 |
InitializeComponent(); |
... | ... | |
24 | 27 |
this.Load += SetupProject_Load; |
25 | 28 |
} |
26 | 29 |
|
30 |
public SetupProject(ProjectInfo projectInfo) |
|
31 |
{ |
|
32 |
InitializeComponent(); |
|
33 |
|
|
34 |
this.ProjectInfo = projectInfo; |
|
35 |
|
|
36 |
this.Load += SetupProject_Load; |
|
37 |
} |
|
38 |
|
|
27 | 39 |
private void SetupProject_Load(object sender, EventArgs e) |
28 | 40 |
{ |
29 | 41 |
this.GetProjectList(); |
... | ... | |
31 | 43 |
|
32 | 44 |
public void GetProjectList() |
33 | 45 |
{ |
34 |
var id2 = new ID2Controller().GetID2ProjectList().ToList(); |
|
46 |
//if (!string.IsNullOrEmpty(this.ProjectID)) |
|
47 |
//{ |
|
48 |
// var test = new ProjectController().GetProjectInfo(this.ProjectID); |
|
49 |
//} |
|
50 |
|
|
51 |
var id2Project = new ID2Controller().GetID2ProjectList().ToList(); |
|
52 |
|
|
53 |
|
|
35 | 54 |
|
36 |
this.radGridViewID2Project.DataSource = id2; |
|
55 |
//this.radGridViewID2Project.DataSource = id2;
|
|
37 | 56 |
} |
38 | 57 |
} |
39 | 58 |
} |
ID2.Manager/ID2.Manager/Forms/SetupProject.resx | ||
---|---|---|
117 | 117 |
<resheader name="writer"> |
118 | 118 |
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
119 | 119 |
</resheader> |
120 |
<metadata name="radThemeManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
|
121 |
<value>17, 17</value> |
|
122 |
</metadata> |
|
120 | 123 |
</root> |
ID2.Manager/ID2.Manager/Main.cs | ||
---|---|---|
240 | 240 |
|
241 | 241 |
//Project List |
242 | 242 |
if (this.radDropDownListProject.Items.Count > 0) |
243 |
this.radDropDownListProject.Items.Clear(); |
|
244 |
informations.ProjectList.ForEach(x => |
|
245 |
{ |
|
246 |
this.radDropDownListProject.Items.Add(new RadListDataItem(x.Name, x.ProjectID)); |
|
247 |
}); |
|
243 |
this.radDropDownListProject.Items.Clear(); |
|
244 |
informations.ProjectList.Where(x => x.GroupID.Equals(informations.ActiveProject.ProjectID)).ToList() |
|
245 |
.ForEach(x => |
|
246 |
{ |
|
247 |
this.radDropDownListProject.Items.Add(new RadListDataItem(x.Name, x.ProjectID)); |
|
248 |
}); |
|
248 | 249 |
var allProject = new RadListDataItem("== 전체 ==", string.Empty); |
249 | 250 |
this.radDropDownListProject.Items.Insert(0, allProject); |
250 | 251 |
allProject.Selected = true; |
내보내기 Unified diff