Web/books/Show.aspx.cs

(完整代码) 1KB

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Text;
using System.Data.SqlClient;

public partial class books_Show : PageBase
{
    string id = string.Empty;
    BS.BLL.books bll = new BS.BLL.books();
    BS.BLL.bookType bll2 = new BS.BLL.bookType();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ShowInfo();
        }
    }

    //初始化
    private void ShowInfo()
    {
        if (Request.QueryString["id"] != null)
        {
            id = Request.QueryString["id"];
            //绑定数据源
            BS.Model.books model = bll.GetModel(Request.QueryString["id"]);
            lblbno.Text = model.bno;
            lblbname.Text = model.bname;

            lblauthor.Text = model.author;
            if (model.pic.ToString() != "" && model.pic.ToString().Length > 3)
            {
                imgpic.ImageUrl = "../uploads/" + model.pic;
            }
            lblpub.Text = model.pub;
            lblpubdate.Text = model.pubdate;
            lblprice.Text = model.price.ToString();
            lblmemo.Text = model.memo;
            lbladdr.Text = model.addr;
            lblquantity.Text = model.quantity.ToString();
            lbladdtime.Text = model.addtime.ToString();

            BS.Model.bookType model2 = bll2.GetModel(int.Parse(model.tid.ToString()));
            lbltid.Text = model2.ToString();

            Label2.Text = new BS.BLL.records().GetRecordCount(" bno='" + id + "' and flag='预约' and ( by2 is null) ").ToString();
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。