Ejemplo n.º 1
0
    public Books GetBook(Books book)
    {
        #region 获取图书信息
        book.Author             = txtauthor.Text;
        book.ContentDescription = txtcontentdescription.Text;
        book.WordsCount         = Convert.ToInt32(txtcount.Text);
        book.ISBN              = txtISBN.Text;
        book.UnitPrice         = Convert.ToDecimal(txtprice.Text);
        book.PublishDate       = Convert.ToDateTime(txtpublishdate.Text);
        book.EditorComment     = txtrecommand.Text;
        book.Title             = txttitle.Text;
        book.TOC               = ftbtoc.Text;
        book.AuthorDescription = authordescription.Text;
        book.Publishers        = PublisherManager.GetPublishersById(Convert.ToInt32(ddlpublisher.SelectedValue));
        book.Categories        = CategoriesManager.GetCategoriesById(Convert.ToInt32(ddlcategory.SelectedValue));
        return(book);

        #endregion
    }