コード例 #1
0
        private void ShowDocumentsWithoutAN()
        {
            if (InfoDetailsVM == null)
            {
                InfoDetailsVM = new PresentDetailVM(this, settings.presentation);
            }

            InfoDetailsVM.Documents = InfoDetailsVM.ConvertDocumentToDocumentVM(DocumentService.ReadDocuments(true));
        }
コード例 #2
0
 private void Init(PresentationEnum present, List <string> nodesList)
 {
     this.settings = new PresentTreeSettings()
     {
         presentation = present
     };
     DisplayName        = settings.presentation.GetName();
     NodeVMs            = ConvertToNodes(nodesList, 1);
     DetailsVM          = new PresentDetailVM(this, settings.presentation);
     DocumentCreationVM = new DocumentCreationVM(this);
     DetailsInfoVM      = new DetailsInfoVM();
 }
コード例 #3
0
        private async void SearchDocument()
        {
            string searchQuery = await MessagesService.GetInput("ПОИСК", "Введите текст для поиска:");

            if (!string.IsNullOrEmpty(searchQuery))
            {
                var foundedDocuments = DocumentService.SearchDocuments(searchQuery);
                var foundedInTS      = DocumentService.SearchDocumentsInTS(searchQuery);

                if (foundedInTS != null && foundedInTS.Count > 0)
                {
                    foundedDocuments.AddRange(foundedInTS);
                }

                if (foundedDocuments != null && foundedDocuments.Count > 0)
                {
                    if (InfoDetailsVM == null)
                    {
                        InfoDetailsVM = new PresentDetailVM(this, settings.presentation);
                    }

                    InfoDetailsVM.Documents.Clear();

                    var filteredDocuments = foundedDocuments; //.Where(f => f.serialNumber == null).ToList();

                    //var documentsWith = foundedDocuments.Where(f => f.serialNumber != null).ToList();

                    //if (filteredDocuments != null && documentsWith != null) filteredDocuments.AddRange(documentsWith);
                    //else if (filteredDocuments == null && documentsWith != null) filteredDocuments = documentsWith;

                    //if (documentsWith != null && documentsWith.Count > 0) DetailsVM.Documents = new ObservableCollection<DocumentVM>(DetailsVM.ConvertDocumentToDocumentVM(foundedDocuments));

                    if (filteredDocuments != null && filteredDocuments.Count > 0)
                    {
                        InfoDetailsVM.Documents = new ObservableCollection <DocumentVM>(InfoDetailsVM.ConvertDocumentToDocumentVM(filteredDocuments));
                    }
                }
                else
                {
                    MessagesService.Show("ПОИСК ДОКУМЕНТОВ", "Результатов нет");
                }
            }
        }