计算机毕业设计介绍:
4.3.8图书展示模块
首页的图书展示部分,数据库中的数据向浏览器输出这一功能在本设计中多次用到,其原理都相同。下面是图书展示的关键代码:
SqlDataReader Rd = DBSQL.MOleDbDataReader(DBSQL.MCon, "select * from Book_Mes where Book_id=" + Mid, CommandType.Text, null);
if (Rd.Read())
{
this.BookName.InnerHtml = Rd["Book_Name"].ToString();
this.BookCompany.InnerHtml = Rd["Book_Company"].ToString();
this.BookCost.InnerHtml = Rd["Book_Cost"].ToString();
this.BookDiscount.InnerHtml = Rd["Book_Discount"].ToString();
this.BookEdit.InnerHtml = Rd["Book_Edit"].ToString();
this.BookImg.Src = "BookImg/" + Rd["Book_Img"].ToString();
this.BookMemo.InnerHtml = Rd["Book_Memo"].ToString();
this.BookBasic.InnerHtml = Rd["Book_Basic"].ToString();
this.Booklist.InnerHtml = Rd["Book_list"].ToString();
this.BookSID.InnerHtml = typeselect(Rd["Book_SID"].ToString(),1);
this.BookBID.InnerHtml = typeselect(Rd["Book_BID"].ToString(),2);
this.Page.Title = Rd["Book_Name"].ToString()+"|" + Application["MyWebTitle"].ToString();
}
else
{
Page.Title = "图书未找到! |" + Application["MyWebTitle"].ToString();
BookName.InnerHtml = "此书,可能以被删除!";
}
〖资料来源:计算机毕业论文 www.xiaoniu168.com〗
第11页为计算机毕业论文部分......