Example #1
0
        protected void Bind()
        {
            try
            {
                Json getJson = new Json();
                JObject file = JObject.Parse(getJson.GetJsonByUrl(_bookUrl));

                this.labelBook.Text = "《" + file["title"].ToString().Trim() + "》";
                this.labAuthor.Text = file["author"].ToString().Trim() == "[]" ? file["author"].ToString().Trim() : file["author"][0].ToString().Trim();
                this.labPublisher.Text = file["publisher"].ToString().Trim();
                this.labPubDate.Text = file["pubdate"].ToString().Trim();
                this.labPage.Text = file["pages"].ToString().Trim();
                this.labISBN.Text = file["isbn10"].ToString().Trim();
                this.labPrice.Text = file["price"].ToString().Trim();
                this.pictureBox.ImageLocation = file["image"].ToString().Trim();
                this.textContent.Text = file["summary"].ToString().Trim();
            }
            catch (Exception)
            {
            }
        }