private static DocumentTreeModels CreateDocumentsNoSubItems2()
        {
            //a combination of top level documents (parent ID of 0) and documents with a parent that is NOT 0
            DocumentTreeModels result   = new DocumentTreeModels();
            DocumentTreeModel  document = new DocumentTreeModel
            {
                Id         = 1,
                Name       = "Development Strategy.docx",
                IsDocument = true,
                ParentId   = 99
            };

            result.Documents.Add(document);
            document = new DocumentTreeModel
            {
                Id         = 2,
                Name       = "Coding standards.docx",
                IsDocument = true,
                ParentId   = 99
            };
            result.Documents.Add(document);
            document = new DocumentTreeModel
            {
                Id         = 3,
                Name       = "Testing Strategy.docx",
                IsDocument = true,
                ParentId   = 0
            };
            result.Documents.Add(document);
            return(result);
        }
        private static DocumentTreeModels CreateDocumentsNoSubItems()
        {
            // all the documents are top level documents with a parent ID of 0

            DocumentTreeModels result   = new DocumentTreeModels();
            DocumentTreeModel  document = new DocumentTreeModel
            {
                Id         = 1,
                Name       = "Development Strategy.docx",
                IsDocument = true,
                ParentId   = 0
            };

            result.Documents.Add(document);
            document = new DocumentTreeModel
            {
                Id         = 2,
                Name       = "Coding standards.docx",
                IsDocument = true,
                ParentId   = 0
            };
            result.Documents.Add(document);
            document = new DocumentTreeModel
            {
                Id         = 3,
                Name       = "Testing Strategy.docx",
                IsDocument = true,
                ParentId   = 0
            };
            result.Documents.Add(document);
            return(result);
        }
Exemple #3
0
        private DocumentTreeModel GetModel()
        {
            var model = new DocumentTreeModel();

            model.RenderMode       = this.RenderMode;
            model.ExpandLevelDepth = this.ExpandLevelDepth;
            model.Nodes.AddRange(this.SetTreeNodeDocumentLibrariesAndFolders());
            return(model);
        }
        private static DocumentTreeModels CreateDocuments2()
        {
            DocumentTreeModels result   = new DocumentTreeModels();
            DocumentTreeModel  document = new DocumentTreeModel
            {
                Id         = 1,
                Name       = "Development",
                IsDocument = false,
                ParentId   = 0
            };

            result.Documents.Add(document);
            document = new DocumentTreeModel
            {
                Id         = 2,
                Name       = "Coding standards.docx",
                IsDocument = true,
                ParentId   = 1
            };
            result.Documents.Add(document);
            document = new DocumentTreeModel
            {
                Id         = 3,
                Name       = "Testing document.docx",
                IsDocument = true,
                ParentId   = 99
            };
            result.Documents.Add(document);
            document = new DocumentTreeModel
            {
                Id         = 4,
                Name       = "Testing strategy.docx",
                IsDocument = true,
                ParentId   = 101
            };
            result.Documents.Add(document);
            return(result);
        }
Exemple #5
0
 private static TreeViewItemModel CreateKendoTreeViewModel(DocumentTreeModel document)
 {
     return(new TreeViewItemModel {
         Text = document.Name, Id = document.Id.ToString(), Items = new List <TreeViewItemModel>()
     });
 }
        private static DocumentTreeModels CreateDocuments()
        {
            DocumentTreeModels result   = new DocumentTreeModels();
            DocumentTreeModel  document = new DocumentTreeModel
            {
                Id         = 1,
                Name       = "Development",
                IsDocument = false,
                ParentId   = 0
            };

            result.Documents.Add(document);
            document = new DocumentTreeModel
            {
                Id         = 2,
                Name       = "Coding standards.docx",
                IsDocument = true,
                ParentId   = 1
            };
            result.Documents.Add(document);
            document = new DocumentTreeModel
            {
                Id         = 3,
                Name       = "Testing",
                IsDocument = false,
                ParentId   = 1
            };
            result.Documents.Add(document);
            document = new DocumentTreeModel
            {
                Id         = 4,
                Name       = "Testing strategy.docx",
                IsDocument = true,
                ParentId   = 3
            };
            result.Documents.Add(document);
            document = new DocumentTreeModel
            {
                Id         = 5,
                Name       = "Customers",
                IsDocument = false,
                ParentId   = 0
            };
            result.Documents.Add(document);
            document = new DocumentTreeModel
            {
                Id         = 6,
                Name       = "Spirax",
                IsDocument = false,
                ParentId   = 5
            };
            result.Documents.Add(document);
            document = new DocumentTreeModel
            {
                Id         = 7,
                Name       = "Contract.docx",
                IsDocument = true,
                ParentId   = 6
            };
            result.Documents.Add(document);
            document = new DocumentTreeModel
            {
                Id         = 8,
                Name       = "Terms and conditions.docx",
                IsDocument = true,
                ParentId   = 6
            };
            result.Documents.Add(document);
            document = new DocumentTreeModel
            {
                Id         = 9,
                Name       = "Unit Testing",
                IsDocument = false,
                ParentId   = 3
            };
            result.Documents.Add(document);
            document = new DocumentTreeModel
            {
                Id         = 10,
                Name       = "Unit Testing.docx",
                IsDocument = false,
                ParentId   = 9
            };
            result.Documents.Add(document);
            return(result);
        }
Exemple #7
0
        public ActionResult Index()
        {
            DocumentTreeModel model = GetModel();

            return(View("Default", model));
        }