Admin/Goods_Add.aspx.cs

(开头部分) 7KB

这里只显示每个文件的开头 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.Text;
using System.IO;

public partial class Goods_Add : System.Web.UI.Page
{
    protected int GID=0;
    protected void Page_Load(object sender, EventArgs e)
    {
        GID = Convert.ToInt32(Request.QueryString["gid"].ToString().Trim());
		if (!IsPostBack)
        {
            string sql = "select * from sort";
            ClassDB.DDLDataBind(dalei, sql, "sname", "sid");
         
 
            if (GID>0)
            {
                sql="select * from Goods where gid="+GID;

                DataTable dt = ClassDB.GetDataTable(sql);
                if (dt!=null&&dt.Rows.Count>0)
                {
                    this.bianhao.Text = dt.Rows[0]["gbianhao"].ToString();
                    this.mingcheng.Text = dt.Rows[0]["gname"].ToString();
                    this.dalei.SelectedValue = dt.Rows[0]["sid"].ToString();
        
                    //this.tupian.Text = dt.Rows[0]["gpicture"].ToString();
                    this.jiage.Text = dt.Rows[0]["gprice"].ToString();
           
                    this.kucun.Text = dt.Rows[0]["gstock"].ToString();
                    this.memo.Text = dt.Rows[0]["gmemo"].ToString();
                    this.chkGHot.Checked = Convert.ToBoolean(dt.Rows[0]["ghot"].ToString());
                }
            }
        }
    }
    protected void AddGoods()
    {
        //将相关的图片上传到@"uppic\"路径下
        string FileName = "";
        string FileName1;
        string DPath;
        DPath = Server.MapPath("") + @"\";
        DPath = DPath + @"..\uppic\";
        if (this.File1.PostedFile.FileName != "")
        {
            string[] temp = this.File1.PostedFile.FileName.Split('.');
            string strHzm = "." + temp[temp.Length - 1];

            Guid tmp = Guid.NewGuid();
后面还有 165 行代码,购买后查看完整代码

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

AI 解读 AI

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

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