private void WriteLineToRoSDOld(TreeNode tn, WordNet._Document oDoc, WordNet.Table oTable, string prefix = "", string parent = "", int seqnum = 0) { if (tn.Tag == null || tn.Tag.GetType().Name != "scClientDocSetDocLink") { // still need to check subnodes } else { int x = 0; foreach (TreeNode node in tn.Nodes) { x++; row++; scClientDocSetDocLink documentClient = (scClientDocSetDocLink)node.Tag; // First column string currentParent = ""; if (string.IsNullOrEmpty(parent)) { currentParent = x.ToString(); } else { currentParent = parent + "." + x.ToString(); } oTable.Cell(row, 1).Width = 30; oTable.Cell(row, 1).Range.Text = currentParent; oTable.Cell(row, 2).Width = 30; System.Drawing.Bitmap bitmap1 = Properties.Resources.FolderIcon; if (documentClient.document.RecordType.Trim() == FCMConstant.RecordType.FOLDER) { bitmap1 = Properties.Resources.FolderIcon; } else { bitmap1 = Properties.Resources.WordIcon; if (documentClient.document.DocumentType == MackkadoITFramework.Helper.Utils.DocumentType.EXCEL) { bitmap1 = Properties.Resources.ExcelIcon; } if (documentClient.document.DocumentType == MackkadoITFramework.Helper.Utils.DocumentType.PDF) { bitmap1 = Properties.Resources.PDFIcon; } } Clipboard.SetImage(bitmap1); oTable.Cell(row, 2).Range.Paste(); oTable.Cell(row, 3).Width = 60; oTable.Cell(row, 3).Range.Text = prefix + documentClient.document.CUID; oTable.Cell(row, 4).Width = 50; oTable.Cell(row, 4).Range.Text = prefix + documentClient.document.IssueNumber.ToString("000"); oTable.Cell(row, 5).Width = 300; oTable.Cell(row, 5).Range.Text = prefix + documentClient.document.Name; oTable.Cell(row, 6).Width = 100; oTable.Cell(row, 6).Range.Text = "???"; if (uioutput != null) { uioutput.AddOutputMessage(documentClient.document.Name, "", ""); } if (node.Nodes.Count > 0) { WriteLineToRoSD(node, oDoc, oTable, prefix: "", parent: currentParent, seqnum: x); } } } }
private void WriteLineToRoSD(TreeNode tn, WordNet._Document oDoc, WordNet.Table oTable, string prefix = "", string parent = "", int seqnum = 0) { if (tn.Tag == null || tn.Tag.GetType().Name != "scClientDocSetDocLink") { // still need to check subnodes } else { int x = 0; foreach (TreeNode node in tn.Nodes) { x++; row++; scClientDocSetDocLink documentClient = (scClientDocSetDocLink)node.Tag; string currentParent = ""; if (string.IsNullOrEmpty(parent)) { currentParent = x.ToString(); } else { currentParent = parent + "." + x.ToString(); } // First column oTable.Cell(row, 1).Width = 200; if (documentClient.document.RecordType == "FOLDER") { oTable.Cell(row, 1).Range.Text = documentClient.document.Name; } else { oTable.Cell(row, 1).Range.Text = ""; } oTable.Cell(row, 2).Width = 60; oTable.Cell(row, 2).Range.Text = ""; // Sub Directory oTable.Cell(row, 3).Width = 80; if (documentClient.document.RecordType == "DOCUMENT") { oTable.Cell(row, 3).Range.Text = prefix + documentClient.document.CUID; } else { oTable.Cell(row, 3).Range.Text = ""; } oTable.Cell(row, 4).Width = 30; oTable.Cell(row, 4).Range.Text = ""; // Sml oTable.Cell(row, 5).Width = 40; oTable.Cell(row, 5).Range.Text = ""; // Med oTable.Cell(row, 6).Width = 30; oTable.Cell(row, 6).Range.Text = ""; // Lrg oTable.Cell(row, 7).Width = 50; if (documentClient.document.RecordType == "DOCUMENT") { oTable.Cell(row, 7).Range.Text = prefix + documentClient.document.IssueNumber.ToString("000"); } else { oTable.Cell(row, 7).Range.Text = ""; } oTable.Cell(row, 8).Width = 200; if (documentClient.document.RecordType == "DOCUMENT") { oTable.Cell(row, 8).Range.Text = prefix + documentClient.document.SimpleFileName; } else { oTable.Cell(row, 8).Range.Text = ""; } if (uioutput != null) { uioutput.AddOutputMessage(documentClient.document.Name, "", ""); } if (node.Nodes.Count > 0) { WriteLineToRoSD(node, oDoc, oTable, prefix: "", parent: currentParent, seqnum: x); } } } }