Beispiel #1
0
        /// <summary>
        /// Load documents for a Client Document Set
        /// </summary>
        private void loadDocumentList(int w = 16, int h = 16)
        {
            if (elementSourceDataTable != null)
            {
                elementSourceDataTable.Clear();
            }

            DocumentList   dl   = new DocumentList();
            UIDocumentList uidl = new UIDocumentList(dl);

            uidl.ShowDialog();

            if (dl == null)
            {
                return;
            }

            if (dl.documentList == null)
            {
                return;
            }

            if (dl.documentList.Count > 0)
            {
                document = dl.documentList[0];

                txtDocumentID.Text   = document.CUID;
                txtDocumentName.Text = document.Name;
            }

            ListImpact(document, w, h);
        }
Beispiel #2
0
        private void LinkDocument()
        {
            TreeNode tnSelected = new TreeNode();

            tnSelected = tvFileList.SelectedNode;

            TreeNode parentNode = new TreeNode();

            parentNode = tnSelected.Parent;

            if (tnSelected == null)
            {
                return;
            }

            var nodeSelected = (Document)tnSelected.Tag;

            DocumentList docList = new DocumentList();

            UIDocumentList udl = new UIDocumentList(docList);

            udl.ShowDialog();

            foreach (var documentSelected in docList.documentList)
            {
                DocumentSetDocument docfind = new DocumentSetDocument();
                docfind.Find(documentSelected.UID, documentSet.UID, voidRead: 'N');

                if (docfind.UID > 0)
                {
                    continue;
                }

                DocumentSetDocument dsd = new DocumentSetDocument();
                dsd.FKDocumentSetUID = documentSet.UID;
                dsd.FKDocumentUID    = documentSelected.UID;
                dsd.EndDate          = System.DateTime.MaxValue;
                dsd.StartDate        = System.DateTime.Today;
                dsd.UID                    = 0;
                dsd.Location               = documentSelected.Location;
                dsd.SequenceNumber         = tnSelected.Index;
                dsd.IsVoid                 = 'N';
                dsd.FKParentDocumentSetUID = documentSet.UID;
                dsd.FKParentDocumentUID    = nodeSelected.UID;

                dsd.Add();

                TreeNode tnNew = new TreeNode();
                tnNew.Tag = documentSelected;

                tnSelected.Nodes.Add(tnNew);
            }

            // Reset sequence numbers
            ResetAllSequenceNumbers(tvFileList.Nodes[0]);

            SelectIndexChanged();
        }
Beispiel #3
0
        public UIDocumentEdit(UIDocumentList _uidl)
        {
            InitializeComponent();
            uidl = new UIDocumentList();
            uidl = _uidl;

            txtCUID.Enabled  = false;
            txtCUID.ReadOnly = true;
            txtDirectory.Focus();
        }
Beispiel #4
0
        public UIDocumentEdit(
            Form previousForm,
            UIDocumentList _uidl
            )
            : this(previousForm)
        {
            InitializeComponent();
            uidl = new UIDocumentList();
            uidl = _uidl;

            txtCUID.Enabled  = false;
            txtCUID.ReadOnly = true;
            // txtDirectory.Focus();
        }
Beispiel #5
0
        private void menuItem1_Click(object sender, EventArgs e)
        {
            UIDocumentList uid = new UIDocumentList();

            uid.Show();
        }