SysManage/ProductOper.aspx.cs

(开头部分) 4KB

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

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

public partial class SysManage_ProductOper : System.Web.UI.Page
{
    string id = string.Empty;
    protected void Page_Load(object sender, EventArgs e)
    {
        id = Request.QueryString["id"];
        if (!IsPostBack)
        {
            DB.Bind_Dropdownlist("select * from ProductClass", productclassname, "ProductClassId", "ProductClassName");
            if (!string.IsNullOrEmpty(id))
            {
                Image1.Visible = true;
                Get_Data();
            }
            else
            {
                Image1.Visible = false;
            }
        }
    }

    void Get_Data()
    {
        try
        {
            DataTable dt = DB.getDataTable("select * from Product where ProductId=" + id);
            if (dt.Rows.Count == 1)
            {
                txtProductName.Text = dt.Rows[0]["ProductName"].ToString();
                productclassname.SelectedValue = dt.Rows[0]["ProductClassId"].ToString();
                pinpai.Text = dt.Rows[0]["pinpai"].ToString();
                guige.Text = dt.Rows[0]["guige"].ToString();
                txtChanDi.Text = dt.Rows[0]["ChanDi"].ToString();
                jiage.Text = dt.Rows[0]["jiage"].ToString();
                shuliang.Text = dt.Rows[0]["shuliang"].ToString();
                txtContent.Value = dt.Rows[0]["jieshao"].ToString();
                Image1.ImageUrl = ".." + dt.Rows[0]["PicAddress"].ToString();
            }
        }
        catch (Exception ex)
        {
            Common.ShowMessage(this.Page, "页面加载时出现异常。", "");
            return;
        }
    }

    /// <summary>
    /// 按钮事件:提交信息
后面还有 48 行代码,购买后查看完整代码

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

AI 解读 AI

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

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