Example #1
0
 public String AddBookList(string id, int tag, string title, string description, ImageSource image, byte[] imagebyte, string date)
 {
     Models.BookList item = new Models.BookList(id, tag, title, description, image, imagebyte, date);
     DBModels.DBListViewModels.InsertDatabase(item);
     this.allItems.Add(item);
     return(item.id);
 }
Example #2
0
        public String RemoveBookList(string id)
        {
            String str = this.selectedItem.id;

            this.allItems.Remove(this.selectedItem);
            // set selectedItem to null after remove
            this.selectedItem = null;
            return(str);
        }
Example #3
0
        public String RemoveBookList(string id)
        {
            String str = this.selectedItem.id;

            this.allItems.Remove(this.selectedItem);
            DBModels.DBListViewModels.DeleteDatabase(str);
            // set selectedItem to null after remove
            this.selectedItem = null;
            return(str);
        }
Example #4
0
        public String UpdateBookList(string id, int tag, string title, string description)
        {
            this.selectedItem.id          = id;
            this.selectedItem.tag         = tag;
            this.selectedItem.title       = title;
            this.selectedItem.description = description;
            //this.selectedItem.cover = s;

            // set selectedItem to null after update
            this.selectedItem = null;
            return(id);
        }
Example #5
0
 public String UpdateBookList(string id, int tag, string title, string description, ImageSource image, byte[] imagebyte, string date)
 {
     this.selectedItem.id          = id;
     this.selectedItem.tag         = tag;
     this.selectedItem.title       = title;
     this.selectedItem.description = description;
     this.selectedItem.cover       = image;
     this.selectedItem.imagebyte   = imagebyte;
     this.selectedItem.date        = date;
     DBListViewModels.UpdateDatabase(this.selectedItem);
     // set selectedItem to null after update
     this.selectedItem = null;
     return(id);
 }
Example #6
0
 public String AddBookList(int tag, string title, string description)
 {
     Models.BookList item = new Models.BookList(tag, title, description);
     this.allItems.Add(item);
     return(item.id);
 }