ASP.NET手机销售电子商务网站(7)

来源:xiaoniu168.com 作者:本站原创 添加时间:2011-11-25 点击数:27395

计算机毕业设计手机维护功能介绍:

(3)手机类别维护界面设计(如图所示)

计算机毕业论文

以下是引用片段:

其关键代码实现如下:
string Key = this.GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Value.ToString();
        if (e.CommandName == "Mod")
        {
            //传递修改的标志 跳转页面
            Response.SpxxEdit.aspx?Flag=Edit&ID=" + Key);
        }
        else if (e.CommandName == "Del")
        {
            //判断信息是否正确
            if (DataBase.Get_Table("select * from GWC where smbh=" + Key ).Rows.Count > 0)
            {
                this.Terr.购物车中存在此手机产品信息,不能删除>";
                return;
            }
            if (DataBase.Get_Table("select * from DDNR where smbh=" + Key).Rows.Count > 0)
            {
                this.Terr.订单中有此手机产品信息,不能删除>";
                return;
            }
            //获取服务器相对路径
            string DPath;
            if (Server.MapPath("").Substring(Server.MapPath("").Length - 1, 1) == @"\")
            {
                DPath = Server.MapPath("");
            }
            else
            {
                DPath = Server.MapPath("") + @"\";
            }
            DPath = DPath + @"Pic\Spxx\";
            //删除关联的图片文件
            string PicName = DataBase.Get_Table("select Tpwjm from SMXX where  smbh=" + Key + "").Rows[0][0].ToString();
            if (File.Exists(DPath + PicName))
            {
                File.Delete(DPath + PicName);
            }
            //删除图片信息记录
            DataBase.ExecSql("delete from SMXX where smbh=" + Key );
            initDg();
        }
    }

〖资料来源:计算机毕业论文 www.xiaoniu168.com

第8页为计算机毕业论文新增手机部分介绍......

【联系方式】

【本站信誉】

用心做计算机毕业设计论文网