Web/books/Edit.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

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_Edit : PageBase
{
    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)
        {
            chushi();
        }
    }

   /// <summary>
    /// 初始化
    /// </summary>
    protected void chushi()
    {
        DataSet ds = bll2.GetAllList();
            ddltid.DataSource = ds;
            ddltid.DataTextField = "tname";
            ddltid.DataValueField = "tid";
            ddltid.DataBind();



       BS.Model.books model=bll.GetModel(Request.QueryString["id"]);

        txt_bno.Text =model.bno;
        txt_bname.Text =model.bname;
        ddltid.SelectedValue=model.tid.ToString();
        txt_author.Text =model.author;
        Labelpic.Text = model.pic;
        if (Labelpic.Text != "" && Labelpic.Text.Length > 3)
        {
            Imagepic.ImageUrl = "../uploads/" + Labelpic.Text;
            Imagepic.Visible = true;
        }
        txt_pub.Text =model.pub;
        txt_pubdate.Text =model.pubdate;
        txt_price.Text =model.price.ToString();
        Textarea1.Value = model.memo;
        txt_addr.Text =model.addr;
        txt_quantity.Text =model.quantity.ToString();
    }

    /// <summary>
    /// 编辑
后面还有 38 行代码,购买后查看完整代码

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

AI 解读 AI

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

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