Exemplo n.º 1
0
        public DetailPage(string x)
        {
            InitializeComponent();

            Isbn = x;

            if (UserModel.isbnSelect(x) != null)
            {
                var query = UserModel.isbnSelect(x);

                foreach (var book in query)
                {
                    title     = book.Title;
                    Date      = book.SalesDate;
                    type      = book.Type;
                    publisher = book.Publisher;
                    category  = book.booksGenreId;
                    bluebook  = book.BlueBook;
                    redstar   = book.RedStar;
                    read      = book.Read;
                    if (book.ItemCaption != null)
                    {
                        itemcaption = book.ItemCaption;
                    }

                    /*bluebook = book.BlueBook;
                     * redstar = book.RedStar;*/
                }
            }
            else
            {
                DisplayAlert("表なし", "表なし", "OK");
            }

            title2.Text       = title;
            Type2.Text        = "タイプ:" + type;
            SalesDate2.Text   = "発売日:" + Date;
            Publisher2.Text   = "出版社:" + publisher;
            ItemCaption2.Text = "説明:" + itemcaption;
            if (bluebook == 1)
            {
                this.image1.Image = "blue_book_72.png";
            }

            else
            {
                this.image1.Image = "gray_book_72.png";
            }

            if (redstar == 1)
            {
                this.image2.Image = "red_star_72.png";
            }

            else
            {
                this.image2.Image = "gray_star_72.png";
            }

            if (read == 0)
            {
                this.unread2.Text = "未読";
                unread1.IsToggled = false;
            }

            if (read == 1)
            {
                this.unread2.Text = "既読";
                unread1.IsToggled = true;
            }
        }