Ejemplo n.º 1
0
        /// <summary>
        /// 获取指定商品的信息,并将其显示在界面上
        /// </summary>
        public void GetGoodsInfo()
        {
            string    str     = "'" + Request["id"].Trim() + "'";
            DataTable dsTable = book.GetList("ISBN=" + str).Tables[0];

            this.txtCategory.Text       = categ.GetList("Id=" + dsTable.Rows[0]["categoryId"].ToString()).Tables[0].Rows[0]["Name"].ToString();
            this.txtName.Text           = dsTable.Rows[0]["bookTitle"].ToString();
            this.txtAuthor.Text         = dsTable.Rows[0]["author"].ToString();
            this.txtCompany.Text        = press.GetList("pressNo=" + dsTable.Rows[0]["pressNo"].ToString()).Tables[0].Rows[0]["pressName"].ToString();
            this.txtMarketPrice.Text    = dsTable.Rows[0]["Price"].ToString();
            this.txtHotPrice.Text       = dsTable.Rows[0]["salePrice"].ToString();
            this.catalog.Text           = dsTable.Rows[0]["catalog"].ToString();
            this.ImageMapPhoto.ImageUrl = "../Images/ftp/9221944.jpg";
            this.cbxCommend.Checked     = true;
            this.cbxHot.Checked         = true;
            this.cbxDiscount.Checked    = true;
            this.txtShortDesc.Text      = dsTable.Rows[0]["introduction"].ToString();
        }
Ejemplo n.º 2
0
    /// <summary>
    /// 商品类别菜单栏
    /// </summary>
    /// <param name="dlName">绑定商品类别名的DataList控件</param>
    public void DLClassBind(DataList dlName)
    {
        DataTable dt = categ.GetList(10, "", "").Tables[0];

        dlBind(dlName, dt);
    }