개정판 61004277
issue #000: report edit
Change-Id: I770c6d96f5850b1099b636e3d606489abc685b46
DTI_PID/POSCO_Report/DB.cs | ||
---|---|---|
7 | 7 |
using System.Globalization; |
8 | 8 |
using System.Data; |
9 | 9 |
using System.Windows.Forms; |
10 |
using System.IO; |
|
10 | 11 |
|
11 | 12 |
namespace POSCO_Report |
12 | 13 |
{ |
... | ... | |
88 | 89 |
{ |
89 | 90 |
using (SQLiteCommand cmd = connection.CreateCommand()) |
90 | 91 |
{ |
91 |
cmd.CommandText = string.Format("SELECT s.UID, s.Name, st.Type, s.BaseSymbol FROM {0} s LEFT JOIN {1} st on s.SymbolType_UID = st.UID", Symbol, SymbolType); |
|
92 |
cmd.CommandText = string.Format("SELECT s.UID, s.Name, st.Type, s.BaseSymbol FROM {0} s LEFT JOIN {1} st on s.SymbolType_UID = st.UID WHERE s.BaseSymbol IS NOT NULL", Symbol, SymbolType);
|
|
92 | 93 |
using (SQLiteDataReader dr = cmd.ExecuteReader()) |
93 | 94 |
dt.Load(dr); |
94 | 95 |
} |
... | ... | |
106 | 107 |
{ |
107 | 108 |
MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error); |
108 | 109 |
} |
109 |
return dt; |
|
110 |
|
|
111 |
dt.DefaultView.Sort = "Name"; |
|
112 |
dt = dt.DefaultView.ToTable(); |
|
113 |
|
|
114 |
return dt; |
|
110 | 115 |
} |
111 | 116 |
public static DataTable GetSymbolAttributeTable() |
112 | 117 |
{ |
... | ... | |
127 | 132 |
using (SQLiteDataReader dr = cmd.ExecuteReader()) |
128 | 133 |
dt.Load(dr); |
129 | 134 |
} |
130 |
|
|
131 | 135 |
} |
132 | 136 |
connection.Close(); |
133 | 137 |
} |
... | ... | |
141 | 145 |
{ |
142 | 146 |
MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error); |
143 | 147 |
} |
144 |
return dt; |
|
148 |
|
|
149 |
dt.DefaultView.Sort = "Attribute"; |
|
150 |
dt = dt.DefaultView.ToTable(); |
|
151 |
|
|
152 |
return dt; |
|
145 | 153 |
} |
146 | 154 |
public static DataTable GetHMBCaseDataTable() |
147 | 155 |
{ |
... | ... | |
371 | 379 |
{ |
372 | 380 |
MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error); |
373 | 381 |
} |
374 |
return dt; |
|
382 |
|
|
383 |
foreach (DataRow row in dt.Rows) |
|
384 |
{ |
|
385 |
string projectDir = row["FilePath"].ToString(); |
|
386 |
|
|
387 |
FileInfo fileInfo = new FileInfo(projectDir); |
|
388 |
if (fileInfo.Exists == false) |
|
389 |
{ |
|
390 |
row.Delete(); |
|
391 |
} |
|
392 |
} |
|
393 |
dt.AcceptChanges(); |
|
394 |
dt.DefaultView.Sort = "Name"; |
|
395 |
dt = dt.DefaultView.ToTable(); |
|
396 |
|
|
397 |
return dt; |
|
375 | 398 |
} |
376 | 399 |
|
377 | 400 |
|
DTI_PID/POSCO_Report/MainForm.cs | ||
---|---|---|
29 | 29 |
{ |
30 | 30 |
projectTable = DB.GetProject(); |
31 | 31 |
|
32 |
gridLookUpEditProject.Properties.DataSource = projectTable;
|
|
32 |
gridLookUpEditProject.Properties.DataSource = projectTable;
|
|
33 | 33 |
gridLookUpEditProject.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; |
34 | 34 |
gridLookUpEditProject.Properties.DisplayMember = "Name"; |
35 | 35 |
gridLookUpEditProject.Properties.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup; |
... | ... | |
50 | 50 |
|
51 | 51 |
private void InitLookUpEdit() |
52 | 52 |
{ |
53 |
DataTable dt = DB.GetSymbolAttributeTable(); |
|
53 |
gridLookUpEditStreamNo.EditValueChanged -= LookUpEdit_EditValueChanged; |
|
54 |
gridLookUpEditItemAttribute.EditValueChanged -= LookUpEdit_EditValueChanged; |
|
55 |
|
|
56 |
DataTable dt = DB.GetSymbolAttributeTable(); |
|
54 | 57 |
|
55 | 58 |
SetLookUpEditProperties(gridLookUpEditStreamNo, dt); |
56 | 59 |
SetLookUpEditProperties(gridLookUpEditItemAttribute, dt); |
DTI_PID/POSCO_Report/SymbolForm.cs | ||
---|---|---|
26 | 26 |
{ |
27 | 27 |
DataTable dt = DB.GetSymbolTable(); |
28 | 28 |
|
29 |
gridViewSymbol.BeginUpdate();
|
|
29 |
gridViewSymbol.BeginUpdate();
|
|
30 | 30 |
|
31 | 31 |
gridControlSymbol.DataSource = dt; |
32 | 32 |
gridViewSymbol.Columns["UID"].Visible = false; |
내보내기 Unified diff