Exemple #1
0
        private void tsbSave_Click(object sender, EventArgs e)
        {
            foreach (TreeNode tn in tvLinkedDocuments.Nodes[0].Nodes)
            {
                var nodeType = tn.Tag.GetType().Name;
                if (nodeType == "DocumentLink")
                {
                    DocumentSetDocumentLink doc = new DocumentSetDocumentLink();
                    doc = (DocumentSetDocumentLink)tn.Tag;

                    DocumentSetDocumentLink.LinkDocuments(
                        documentSetUID,
                        SelectedParentDocumentUID,
                        doc.FKChildDocumentUID,
                        cbxLinkType.Text);
                }

                if (nodeType == "Document")
                {
                    Document doc = new Document();
                    doc = (Document)tn.Tag;

                    DocumentSetDocumentLink.LinkDocuments(
                        documentSetUID,
                        SelectedParentDocumentUID,
                        doc.UID,
                        cbxLinkType.Text);
                }
            }
            MessageBox.Show("Saved successfully.");
        }