프로젝트

일반

사용자정보

개정판 482f6326

ID482f6326781d30948db1c6951c3773a12f0a61e8
상위 52dbb0fa
하위 8eee15b4, 709c1971

유성호이(가) 일년 이상 전에 추가함

issue #0000
Login 적용
Documents Model 수정
Login Config 수정
Command Column Defaut Value 추가
Resource 수정(Save, Link)

Change-Id: I089397c91e630da142945f6bf6679fd5ceaee0b3

차이점 보기:

ID2.Manager/ID2.Manager/Main.cs
31 31
            SpreadsheetInfo.SetLicense(Properties.Settings.Default.GemBoxLicense);
32 32

  
33 33
            this.Load += Main_Load;
34
            this.radButtonElementSave.Click += RadButtonElementSave_Click;
34 35
            this.radButtonElementExcelImport.Click += RadButtonElementExcelImport_Click;
35 36
            this.radButtonElementExcelExport.Click += RadButtonElementExcelExport_Click;
36 37
            this.radGridViewDocuments.ViewCellFormatting += RadGridViewDocuments_ViewCellFormatting;
37 38
            this.radGridViewDocuments.CellBeginEdit += RadGridViewDocuments_CellBeginEdit;
38 39
            this.radGridViewDocuments.CommandCellClick += RadGridViewDocuments_CommandCellClick;
39 40

  
41
            this.radGridViewDocuments.MasterView.TableHeaderRow.MinHeight = 36;
42
            this.radGridViewDocuments.TableElement.RowHeaderColumnWidth = 36;
43

  
40 44
            this.InitColumnGroupsViewDefinition(this.radGridViewDocuments);
41 45
        }
42 46

  
47
        private void Main_Load(object sender, EventArgs e)
48
        {
49
            this.GetDocList();
50
        }
51

  
52
        public void GetDocList()
53
        {
54
            IEnumerable<Documents> docList = new DocumentController().GetAllDocuments();
55
            this.radGridViewDocuments.DataSource = docList;
56

  
57
            BeginInvoke(new Action(() =>
58
            {
59
                if (this.radGridViewDocuments.DataSource != null)
60
                    this.radGridViewDocuments.DataSource = null;
61

  
62
                this.radGridViewDocuments.DataSource = docList;
63
            }));
64
        }
65

  
43 66
        private void RadGridViewDocuments_CommandCellClick(object sender, GridViewCellEventArgs e)
44 67
        {
45
            switch (e.Column.Name)
68
            if (e.Row is GridViewNewRowInfo)
46 69
            {
47
                case "AutoCADLink":
48
                    MessageBox.Show($"{e.Column.Name} 실행");
49
                    break;
50
                case "PDFLink":
51
                    MessageBox.Show($"{e.Column.Name} 실행");
52
                    break;
53
                case "MarkupLink":
54
                    MessageBox.Show($"{e.Column.Name} 실행");
55
                    break;
56
                case "AVEVALink":
57
                case "AVEVAConnection":
58
                    MessageBox.Show($"{e.Column.Name} 실행");
59
                    break;
60
                case "ReviewFileName"://일단주석
61
                    MessageBox.Show($"{e.Column.Name} 실행");
62
                    break;
63
                case "SystemLink":
64
                    MessageBox.Show($"{e.Column.Name} 실행");
65
                    break;
66
                case "ToCapturePath":
67
                case "FrCapturePath":
68
                    MessageBox.Show($"{e.Column.Name} 실행");
69
                    break;
70
                case "ID2Connection":
71
                    MessageBox.Show($"{e.Column.Name} 실행");
72
                    break;
70
                
71
            }
72
            else
73
            {
74
                switch (e.Column.Name)
75
                {
76
                    case "AutoCADLink":
77
                        MessageBox.Show($"{e.Column.Name} 실행");
78
                        break;
79
                    case "PDFLink":
80
                        MessageBox.Show($"{e.Column.Name} 실행");
81
                        break;
82
                    case "MarkupLink":
83
                        MessageBox.Show($"{e.Column.Name} 실행");
84
                        break;
85
                    case "AVEVALink":
86
                    case "AVEVAConnection":
87
                        MessageBox.Show($"{e.Column.Name} 실행");
88
                        break;
89
                    case "ReviewFileName"://일단주석
90
                        MessageBox.Show($"{e.Column.Name} 실행");
91
                        break;
92
                    case "SystemLink":
93
                        MessageBox.Show($"{e.Column.Name} 실행");
94
                        break;
95
                    case "ToCapturePath":
96
                    case "FrCapturePath":
97
                        MessageBox.Show($"{e.Column.Name} 실행");
98
                        break;
99
                    case "ID2Connection":
100
                        MessageBox.Show($"{e.Column.Name} 실행");
101
                        break;
102
                }
73 103
            }
74 104
        }
75 105

  
......
105 135
                        break;
106 136
                    case "ProdIsResult":
107 137
                    case "ClientIsResult":
108
                        //GridViewComboBoxColumn ColResult = this.radGridViewDocuments.Columns[e.Column.Name] as GridViewComboBoxColumn;
109
                        //ColResult.DataSource = informations.ValidationResult;
138
                        GridViewComboBoxColumn ColResult = this.radGridViewDocuments.Columns[e.Column.Name] as GridViewComboBoxColumn;
139
                        ColResult.DataSource = (new string[] { string.Empty }).Union<string>(informations.ValidationResult);
110 140
                        break;
111 141
                }
112 142
            }
......
114 144

  
115 145
        private void RadGridViewDocuments_ViewCellFormatting(object sender, CellFormattingEventArgs e)
116 146
        {
117
            RadButtonElement GetBtnElement(RadElement elem,  string colName)
147
            if (e.CellElement is GridRowHeaderCellElement)
118 148
            {
119
                RadButtonElement btnElem = null;
120
                Bitmap bitmap = null; ;
121

  
122
                switch (colName)
123
                {
124
                    case "AutoCADLink":
125
                        bitmap = new Bitmap(Properties.Resources.cad18);
126
                        break;
127
                    case "PDFLink":
128
                        bitmap = new Bitmap(Properties.Resources.pdf18);
129
                        break;
130
                    case "MarkupLink":
131
                        bitmap = new Bitmap(Properties.Resources.link18_green);
132
                        break;
133
                    case "AVEVALink":
134
                    case "AVEVAConnection":
135
                        bitmap = new Bitmap(Properties.Resources.link18_blue);
136
                        break;
137
                    case "ReviewFileName"://일단주석
138
                        bitmap = new Bitmap(Properties.Resources.pdf18);
139
                        break;
140
                    case "SystemLink":
141
                        bitmap = new Bitmap(Properties.Resources.link18_yellow);
142
                        break;
143
                    case "ToCapturePath":
144
                    case "FrCapturePath":
145
                        bitmap = new Bitmap(Properties.Resources.files18);
146
                        break;
147
                    case "ID2Connection":
148
                        bitmap = new Bitmap(Properties.Resources.link18_purple);
149
                        break;
150
                }
151

  
152
                switch (colName)
149
                e.CellElement.Text = (e.CellElement.RowIndex + 1).ToString();
150
            }
151
            else if (e.Row is GridViewNewRowInfo)
152
            {
153
                switch (e.CellElement.ColumnInfo.Name)
153 154
                {
154 155
                    case "AutoCADLink":
155 156
                    case "PDFLink":
......
161 162
                    case "ToCapturePath":
162 163
                    case "FrCapturePath":
163 164
                    case "ID2Connection":
164
                        btnElem = (RadButtonElement)elem;
165
                        btnElem.Margin = new Padding(0);
166
                        btnElem.Padding = new Padding(0);
167
                        btnElem.BorderElement.Opacity = 0;
168
                        btnElem.Alignment = ContentAlignment.MiddleCenter;
169
                        btnElem.DisplayStyle = DisplayStyle.Image;
170
                        btnElem.Image = bitmap;
171
                        btnElem.ImageAlignment = ContentAlignment.MiddleCenter;
172
                        btnElem.MaxSize = bitmap.Size;
165
                        this.GetCommandColBtnElement(e.CellElement.Children[0], e.CellElement.ColumnInfo.Name);
173 166
                        break;
174 167
                }
175

  
176
                return btnElem;
177
            }
178

  
179
            if (e.CellElement is GridRowHeaderCellElement)
180
            {
181
                e.CellElement.Text = (e.CellElement.RowIndex + 1).ToString();
182 168
            }
183 169
            else
184 170
            {
......
197 183
                        case "ToCapturePath":
198 184
                        case "FrCapturePath":
199 185
                        case "ID2Connection":
200
                            GetBtnElement(e.CellElement.Children[0], e.CellElement.ColumnInfo.Name);
186
                            this.GetCommandColBtnElement(e.CellElement.Children[0], e.CellElement.ColumnInfo.Name);
201 187
                            break;
202 188
                    }
203 189
                }
204 190
            }
205 191
        }
206 192

  
193
        private RadButtonElement GetCommandColBtnElement(RadElement elem, string colName)
194
        {
195
            RadButtonElement btnElem = null;
196
            Bitmap bitmap = null; ;
197

  
198
            switch (colName)
199
            {
200
                case "AutoCADLink":
201
                    bitmap = new Bitmap(Properties.Resources.cad18);
202
                    break;
203
                case "PDFLink":
204
                    bitmap = new Bitmap(Properties.Resources.pdf18);
205
                    break;
206
                case "MarkupLink":
207
                    bitmap = new Bitmap(Properties.Resources.link18_green);
208
                    break;
209
                case "AVEVALink":
210
                case "AVEVAConnection":
211
                    bitmap = new Bitmap(Properties.Resources.link18_blue);
212
                    break;
213
                case "ReviewFileName"://일단주석
214
                    bitmap = new Bitmap(Properties.Resources.pdf18);
215
                    break;
216
                case "SystemLink":
217
                    bitmap = new Bitmap(Properties.Resources.link18_yellow);
218
                    break;
219
                case "ToCapturePath":
220
                case "FrCapturePath":
221
                    bitmap = new Bitmap(Properties.Resources.files18);
222
                    break;
223
                case "ID2Connection":
224
                    bitmap = new Bitmap(Properties.Resources.link18_purple);
225
                    break;
226
            }
227

  
228
            switch (colName)
229
            {
230
                case "AutoCADLink":
231
                case "PDFLink":
232
                case "MarkupLink":
233
                case "AVEVALink":
234
                case "AVEVAConnection":
235
                case "ReviewFileName"://일단주석
236
                case "SystemLink":
237
                case "ToCapturePath":
238
                case "FrCapturePath":
239
                case "ID2Connection":
240
                    btnElem = (RadButtonElement)elem;
241
                    btnElem.Margin = new Padding(0);
242
                    btnElem.Padding = new Padding(0);
243
                    btnElem.BorderElement.Opacity = 0;
244
                    btnElem.Alignment = ContentAlignment.MiddleCenter;
245
                    btnElem.DisplayStyle = DisplayStyle.Image;
246
                    btnElem.Image = bitmap;
247
                    btnElem.ImageAlignment = ContentAlignment.MiddleCenter;
248
                    btnElem.MaxSize = bitmap.Size;
249
                    break;
250
            }
251

  
252
            return btnElem;
253
        }
254

  
207 255
        #region Excel
208 256
        private void RadButtonElementExcelImport_Click(object sender, EventArgs e)
209 257
        {
......
229 277
                    int columnCount = ws.CalculateMaxUsedColumns();
230 278

  
231 279
                    #region Excel 유효성검사
232
                    if (rowCount <= 4 || columnCount != 6)
280
                    if (rowCount <= 10 || columnCount != 45)
233 281
                    {
234 282
                        RadMessageBox.Show("Please, check the excel.\n", "Information", System.Windows.Forms.MessageBoxButtons.OK, RadMessageIcon.Info);
235 283
                        return;
236 284
                    }
237 285

  
238
                    ws.Rows.SelectMany(row => row.AllocatedCells).Where(col => col.Column.Index > 0 && col.Row.Index > 4 && col.Value == null).ToList().ForEach(p => sbErrMsg.Append(", " + p.Column.Name + p.Row.Name));
286
                    ws.Rows.SelectMany(row => row.AllocatedCells).Where(col => col.Column.Index > 4 && col.Row.Index > 11 && col.Value == null).ToList().ForEach(p => sbErrMsg.Append(", " + p.Column.Name + p.Row.Name));
239 287
                    if (sbErrMsg.Length > 0)
240 288
                    {
241 289
                        RadMessageBox.Show("Please, check null value in excel.\n" + sbErrMsg.ToString().Substring(2), "Information", System.Windows.Forms.MessageBoxButtons.OK, RadMessageIcon.Info);
......
243 291
                    }
244 292

  
245 293
                    ws.Rows.SelectMany(row => row.AllocatedCells)
246
                                                 .Where(col => col.Column.Index > 0 && col.Row.Index > 4)
294
                                                 .Where(col => col.Column.Index > 4 && col.Row.Index > 11)
247 295
                                                 .GroupBy(g => g.Row.Index)
248 296
                                                 .Select(p => new {
249 297
                                                     rIndex = p.Key,
......
370 418
        }
371 419
        #endregion
372 420

  
373
        private void Main_Load(object sender, EventArgs e)
421
        private void RadButtonElementSave_Click(object sender, EventArgs e)
374 422
        {
375
            this.GetDocList();
423
            //저장
376 424
        }
377 425

  
378
        public void GetDocList()
379
        {
380
            IEnumerable<Documents> docList = new DocumentController().GetAllDocuments();
381
            this.radGridViewDocuments.DataSource = docList;
382

  
383
            BeginInvoke(new Action(() =>
384
            {
385
                this.radGridViewDocuments.DataSource = null;
386
                this.radGridViewDocuments.DataSource = docList;
387
            }));
388
    }
389

  
390 426
        #region ColumnGroup
391 427
        private void InitColumnGroupsViewDefinition(RadGridView gridView)
392 428
        {
......
404 440
            List<string> valCntColNames = new List<string>() { "ClientReviewer", "ClientIsResult", "ClientRemarks" };
405 441
            List<string> dtColNames = new List<string>() { "DTIsGateWay", "DTIsImport", "DTIsRegSystem", "DTRemarks" };
406 442

  
407

  
408 443
            //도면
409 444
            GridViewColumnGroup docColGrp = new GridViewColumnGroup("도면");
410 445
            GridViewColumnGroup docLinkColGrp = new GridViewColumnGroup("파일링크");

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)