Beispiel #1
0
        /*
         * Book metoder
         */

        public BooksList GetBooks()
        {
            BooksList bl = new BooksList();//BooksList er en Wrapper model klasse der indpakker en List<Book> liste
            APIGetJSON <List <Book> > authlist = new APIGetJSON <List <Book> >(this.fullservicepath + "Books");

            bl.Books = authlist.data;
            return(bl);
        }
        /*
         * Bookmetoder Get
         * http://bookserviceaseece.azurewebsites.net:/api/Books
         */

        /// <summary>
        /// DTO der modtages fra server er Array!
        /// BookList er en Wrapper model klasse der indpakker en List<Book> liste.
        /// </summary>
        /// <returns></returns>
        public BookList GetBooks()
        {
            BookList bl = new BookList();
            APIGetJSON <List <Book> > booklist = new APIGetJSON <List <Book> >(fullservicepath + "Books");

            bl.books = booklist.data;
            return(bl);
        }
Beispiel #3
0
        /*
         * Author metoder
         */
        public AuthorsList GetAuthors()
        {
            AuthorsList al = new AuthorsList(); //AuthorsList er en Wrapper model klasse der indpakker en List<Author> liste
            APIGetJSON <List <Author> > authlist = new APIGetJSON <List <Author> >(fullservicepath + "Authors");

            al.Authors = authlist.data;
            return(al);
        }
        public Book GetBook(String ID)
        {
            APIGetJSON <Book> book = new APIGetJSON <Book>(fullservicepath + "Books/" + ID);

            return(book.data);
        }
        public List <Book> GetBooksList()
        {
            APIGetJSON <List <Book> > booklist = new APIGetJSON <List <Book> >(fullservicepath + "Books");

            return(booklist.data);
        }
Beispiel #6
0
        public List <ReadingRootobject> getAllReadings() //Use Case 7
        {
            APIGetJSON <List <ReadingRootobject> > getevents = new APIGetJSON <List <ReadingRootobject> >(_fullservicepath);

            return(getevents.data);
        }
Beispiel #7
0
        //public Venue PostVenue(Venue venue) //Case 1
        //{
        //    APIPostJSON<Venue> venuepost = new APIPostJSON<Venue>(hostname, servicepath + "Venues", venue);
        //    return venuepost.data;
        //}

        //public Venue PutVenue(Venue venue) //Case 2
        //{
        //    APIPutJSON<Venue> venueput = new APIPutJSON<Venue>(hostname, servicepath + "Venues/" + venue.Id, venue);
        //    return venueput.data;
        //}

        //public void DeleteEvent(Commingevent ev) //Case 3
        //{
        //    APIDeleteJSON<Commingevent> eventdel = new APIDeleteJSON<Commingevent>(hostname, servicepath + "Events/" + ev.Id, ev);
        //    //ingen return data da event er slettet
        //}

        //public Commingevent PutEvent(Commingevent ev) //Case 4
        //{
        //    APIPutJSON<Commingevent> eventput = new APIPutJSON<Commingevent>(hostname, servicepath + "Events/" + ev.Id, ev);
        //    return eventput.data;
        //}

        //public void DeleteVenue(Venue venue) //Use Case 5
        //{
        //    APIDeleteJSON<Venue> deletevenue = new APIDeleteJSON<Venue>(hostname, servicepath + "Venues/" + venue.Id, venue);
        //}

        //public Venue getVenue(Venue venue) //Use Case 6
        //{
        //    APIGetJSON<Venue> getvenue = new APIGetJSON<Venue>(fullservicepath + "Venues/" + venue.Id);
        //    return getvenue.data;
        //}

        public List <LTBloodGlucoseReport> getAllLTBGRep() //Use Case 7
        {
            APIGetJSON <List <LTBloodGlucoseReport> > getltbgr = new APIGetJSON <List <LTBloodGlucoseReport> >(fullservicepath + "LTBloodGlucoseReports");

            return(getltbgr.data);
        }
Beispiel #8
0
        public List <Commingevent> getAllEvent() //Use Case 7
        {
            APIGetJSON <List <Commingevent> > getevents = new APIGetJSON <List <Commingevent> >(fullservicepath + "Events");

            return(getevents.data);
        }
Beispiel #9
0
        public Venue getVenue(Venue venue) //Use Case 6
        {
            APIGetJSON <Venue> getvenue = new APIGetJSON <Venue>(fullservicepath + "Venues/" + venue.Id);

            return(getvenue.data);
        }
Beispiel #10
0
        public Book GetBook(Book book)
        {
            APIGetJSON <Book> b = new APIGetJSON <Book>(this.fullservicepath + "Books/" + book.Id);

            return(b.data);
        }
Beispiel #11
0
        public Author GetAuthor(Author author)
        {
            APIGetJSON <Author> auth = new APIGetJSON <Author>(fullservicepath + "Authors/" + author.Id);

            return(auth.data);
        }