Ejemplo n.º 1
0
        private void SearchAll()
        {
            LBItemList.DataContext      = null;
            GridItemDetails.DataContext = null;
            ComboBoxItem typeItem = (ComboBoxItem)CBCategory.SelectedItem;
            string       type     = typeItem.Content.ToString();

            if (type == T3.Content.ToString()) //Books
            {
                BookProcessor book = new BookProcessor();
                Item = book.GetAllBooks(ReferenceList.Token);
                LBItemList.DataContext = Item;
            }
            else
            if (type == T4.Content.ToString()) //Newspapers
            {
                NewspaperProcessor newspaper = new NewspaperProcessor();
                Item = newspaper.GetAllNewspapers(ReferenceList.Token);
                LBItemList.DataContext = Item;
            }
            else
            if (type == T5.Content.ToString()) //Journals
            {
                JournalProcessor journal = new JournalProcessor();
                Item = journal.GetAllJournals(ReferenceList.Token);
                LBItemList.DataContext = Item;
            }
            else
            if (type == T6.Content.ToString()) //Magazines
            {
                MagazineProcessor magazine = new MagazineProcessor();
                Item = magazine.GetAllMagazines(ReferenceList.Token);
                LBItemList.DataContext = Item;
            }
            else
            if (type == T7.Content.ToString()) //Manuscripts
            {
                ManuscriptProcessor manuscript = new ManuscriptProcessor();
                Item = manuscript.GetAllManuscripts(ReferenceList.Token);
                LBItemList.DataContext = Item;
            }
        }
Ejemplo n.º 2
0
 public IEnumerable <ItemModel> GetAllJournals(string token)
 {
     return(JournalProcessor.GetAllJournals(token));
 }