Esempio n. 1
0
		public FolderViewModel(IAssetService repository, Folder folder)
			: base(repository)
		{
			CurrentFolder = folder;
			EmbeddedHierarchyEntry = this;

			OpenItemCommand = new DelegateCommand(DoOpenFolder);
		}
 private void GetFolders(List<ReportFolder> list, Folder folder)
 {
     list.AddRange(
         _assetRepository.GetChildrenFolders(folder.FolderId)
             .Select(delegate(Folder f)
             {
                 var subFolder = new ReportFolder
                 {
                     FolderName = f.Name,
                     FolderId = f.FolderId,
                     SubFoldersList = new List<ReportFolder>()
                 };
                 GetFolders(subFolder.SubFoldersList as List<ReportFolder>, f);
                 return subFolder;
             })
             .ToList()
         );
 }
 public FolderSearchViewModel(Folder folder, AssetEntitySearchViewModelBase parent)
     : base(parent)
 {
     InnerItem = folder;
     _Type = (Parent is RootSearchViewModel) ? AssetType.Container : AssetType.Folder;
 }