Admin/SPXXEdit.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.IO;

public partial class Admin_SPXXEdit : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        // 在此处放置用户代码以初始化页面
        if (!Page.IsPostBack)
        {
            //绑定类别列表
            this.DrLBDM.DataTextField = "类别名称";
            this.DrLBDM.DataValueField = "代码";
            this.DrLBDM.DataSource = DataBase.Get_Table("select * from 服装类别");
            this.DrLBDM.DataBind();
            Session.Remove("imgname");
            if (Request.QueryString["ID"] != null)
            {
                //显示当前的服装信息
                DataTable tmpda = new DataTable();
                tmpda = DataBase.Get_Table("select * from 服装信息 where 代码=" + Request.QueryString["ID"]);
                if (tmpda.Rows.Count > 0)
                {
                    this.txtMC.Text = tmpda.Rows[0]["名称"].ToString();
                    this.txtMS.Text = tmpda.Rows[0]["描述"].ToString();
                    Image1.ImageUrl = "../image/" + tmpda.Rows[0]["图片"].ToString();
                    Session["imgname"] = tmpda.Rows[0]["图片"].ToString();
                    this.txtJLDW.Text = tmpda.Rows[0]["计量单位"].ToString();
                    this.txtGG.Text = tmpda.Rows[0]["规格"].ToString();
                    this.txtTM.Text = tmpda.Rows[0]["条码"].ToString();
                    this.txtJG.Text = tmpda.Rows[0]["价格"].ToString();
                    this.DrLBDM.SelectedValue = tmpda.Rows[0]["类别代码"].ToString();
                    this.RadioButtonList1.SelectedValue = tmpda.Rows[0]["类别"].ToString();
                }
            }
        }

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        //判断信息是否正确
        if (this.txtMC.Text.Trim() == "")
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "info", "<script>alert('服装名称不能为空!');</script>");            
            return;
        }

        //将相关的图片上传到@"Image\"路径下
        string FileName = "";
        string FileName1;
        string DPath;
后面还有 45 行代码,购买后查看完整代码

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

AI 解读 AI

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

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