개정판 0d8062b2
dev issue #000 : move file
Change-Id: Icf2076ae45b5e6248ee99116a265ef98d42eebc9
DTI_PID/SPPIDConverter_AutoModeling/ConverterForm.cs | ||
---|---|---|
24 | 24 |
{ |
25 | 25 |
public partial class ConverterForm : DevExpress.XtraBars.Ribbon.RibbonForm |
26 | 26 |
{ |
27 |
private Dictionary<string, Document> _DicDocuments = new Dictionary<string, Document>(); |
|
27 | 28 |
private DataTable converterDT = new DataTable(); |
28 | 29 |
private RepositoryItemComboBox templateComboBox; |
29 | 30 |
|
... | ... | |
46 | 47 |
|
47 | 48 |
DataColumn col = converterDT.Columns.Add("colDrawingFileName"); |
48 | 49 |
col.Caption = "Drawing File Name"; |
50 |
col = converterDT.Columns.Add("colDrawingFilePath"); |
|
51 |
col.Caption = "DrawingFilePath"; |
|
49 | 52 |
col = converterDT.Columns.Add("colUnit"); |
50 | 53 |
col.Caption = "Unit"; |
51 | 54 |
col = converterDT.Columns.Add("colTemplate"); |
... | ... | |
73 | 76 |
gridViewConverter.Columns["colDrawingFileName"].OptionsColumn.AllowEdit = false; |
74 | 77 |
gridViewConverter.Columns["colUnit"].OptionsColumn.ReadOnly = true; |
75 | 78 |
gridViewConverter.Columns["colStatus"].OptionsColumn.AllowEdit = false; |
79 |
gridViewConverter.Columns["colDrawingFilePath"].Visible = false; |
|
76 | 80 |
gridViewConverter.Columns["colUID"].Visible = false; |
77 | 81 |
|
78 | 82 |
gridViewConverter.BestFitColumns(); |
... | ... | |
205 | 209 |
foreach (string fileName in xtraOpenFileDialog.FileNames) |
206 | 210 |
{ |
207 | 211 |
Document document = new Document(fileName); |
212 |
DataRow[] rows = converterDT.Select(string.Format("colDrawingFilePath = '{0}'", fileName)); |
|
213 |
DataRow row; |
|
214 |
if (rows.Length == 0) |
|
215 |
{ |
|
216 |
row = converterDT.NewRow(); |
|
217 |
row["colDrawingFileName"] = Path.GetFileNameWithoutExtension(fileName); |
|
218 |
row["colDrawingFilePath"] = fileName; |
|
219 |
row["colDrawingNumber"] = document.DWGNAME; |
|
220 |
row["colDrawingName"] = document.DWGNAME; |
|
221 |
if (document.Enable) |
|
222 |
row["colStatus"] = "Ready"; |
|
223 |
else |
|
224 |
row["colStatus"] = "Error"; |
|
225 |
row["colUID"] = ""; |
|
226 |
converterDT.Rows.Add(row); |
|
227 |
} |
|
228 |
if (!_DicDocuments.ContainsKey(fileName)) |
|
229 |
_DicDocuments.Add(fileName, null); |
|
230 |
|
|
231 |
_DicDocuments[fileName] = document; |
|
208 | 232 |
} |
209 | 233 |
} |
210 | 234 |
} |
내보내기 Unified diff