예제 #1
0
        public ClientDocument ListClientDocumentsByFolder(int clientUID, int clientDocumentSetUID)
        {
            ClientDocument listofdocuments = new ClientDocument();

            listofdocuments.clientDocumentList  = new List <ClientDocument>();
            listofdocuments.clientDocSetDocLink = new List <scClientDocSetDocLink>();

            listofdocuments.FKClientUID            = clientUID;
            listofdocuments.clientDocumentSet.UID  = clientDocumentSetUID;
            listofdocuments.FKClientDocumentSetUID = clientDocumentSetUID;

            // 1 - Get list of documents

            var clientDocumentListRequest = new BUSClientDocument.ClientDocumentListRequest();

            clientDocumentListRequest.clientDocumentSetUID = clientDocumentSetUID;
            clientDocumentListRequest.clientUID            = clientUID;

            var clientDocumentListResponse = BUSClientDocument.List(clientDocumentListRequest);

            // 2 - Move into a tree to order
            TreeView tvFileList = new TreeView();

            tvFileList.Nodes.Clear();
            ListInTree(tvFileList, "CLIENT", clientDocumentListResponse.clientList);

            if (tvFileList.Nodes.Count > 0)
            {
                tvFileList.Nodes[0].Expand();
            }

            // 3 - Move to an ordered list
            foreach (TreeNode documentNode in tvFileList.Nodes)
            {
                var docnode = (scClientDocSetDocLink)documentNode.Tag;

                listofdocuments.clientDocSetDocLink.Add(docnode);

                // If there are inner nodes
                //
                if (documentNode.Nodes.Count > 0)
                {
                    ListInOrder(documentNode, listofdocuments.clientDocSetDocLink);
                }
            }

            // 4 - Return list
            return(listofdocuments);
        }
예제 #2
0
        // ----------------------------------------------------------------------
        // List documents available for selection in list box tvListOfDocuments
        // ----------------------------------------------------------------------
        public void loadDocumentList()
        {
            // Image list
            //
            ImageList imageList = ControllerUtils.GetImageList();

            // Binding
            tvListOfDocuments.ImageList = imageList;

            // Clear nodes
            tvListOfDocuments.Nodes.Clear();

            var docoList = new ClientDocument();

            // docoList.List(Utils.ClientID, Utils.ClientSetID);

            var cdlr = new BUSClientDocument.ClientDocumentListRequest();

            cdlr.clientUID            = Utils.ClientID;
            cdlr.clientDocumentSetUID = Utils.ClientSetID;

            var response = BUSClientDocument.List(cdlr);

            // Load document in the treeview
            //
            // docoList.ListInTree(tvListOfDocuments);
            Document root = new Document();

            root.CUID       = "ROOT";
            root.RecordType = FCMConstant.RecordType.FOLDER;
            root.UID        = 0;
            // root.Read();

            // root = RepDocument.Read(false, 0, "ROOT");
            root = BUSDocument.GetRootDocument();

            // docoList.ListInTree(tvListOfDocuments, "CLIENT");

            BUSClientDocument.ListInTree(docoList, tvListOfDocuments, "CLIENT");

            tvListOfDocuments.ExpandAll();
        }
예제 #3
0
        // -------------------------------------------------------
        //  Populate combo box with list of client Documents
        // -------------------------------------------------------
        private void PopulateDocumentCombo(char ProjectPlan)
        {
            // List documents
            // -------------------------------------------------------
            var documentSetList = new ClientDocument();

            // documentSetList.List(Utils.ClientID, Utils.ClientSetID);

            var cdlr = new BUSClientDocument.ClientDocumentListRequest();

            cdlr.clientUID            = Utils.ClientID;
            cdlr.clientDocumentSetUID = Utils.ClientSetID;
            var response = BUSClientDocument.List(cdlr);

            documentSetList.clientDocSetDocLink = response.clientList;

            cbxDocument.Items.Clear();
            cbxDocument.SelectedText = "";

            int i = 0;

            foreach (var doco in documentSetList.clientDocSetDocLink)
            {
                string item = doco.document.UID + ";" + doco.document.CUID + ";" + doco.document.Name;
                cbxDocument.Items.Add(item);

                if (i == 0)
                {
                    cbxDocument.ResetText();
                    cbxDocument.SelectedText = item;
                }

                if (i == 0)
                {
                    cbxDocument.Text = item;
                }
                i++;
            }
        }
예제 #4
0
파일: UIGoogleDocs.cs 프로젝트: DR2010/FCM2
        //
        // Load documents for a Client Document Set
        //
        private void loadDocumentList()
        {
            // List client document list
            //
            var documentSetList = new ClientDocument();
            //documentSetList.List( Utils.ClientID, Utils.ClientSetID );

            var request = new BUSClientDocument.ClientDocumentListRequest();

            request.clientDocumentSetUID = Utils.ClientSetID;
            request.clientUID            = Utils.ClientID;

            BUSClientDocument.List(request);

            tvFileList.Nodes.Clear();
            // documentSetList.ListInTree( tvFileList, "CLIENT" );

            BUSClientDocument.ListInTree(documentSetList, tvFileList, "CLIENT");

            if (tvFileList.Nodes.Count > 0)
            {
                tvFileList.Nodes[0].Expand();
            }
        }