Ejemplo n.º 1
0
        /// <summary>
        /// 删除图片
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button8_Click(object sender, EventArgs e)
        {
            if (ViewState["mod"] != null)
            {
                int id = Convert.ToInt32(ViewState["mod"]);
                if (System.IO.File.Exists(Server.MapPath(lblUrl3.Text)))
                {
                    System.IO.File.Delete(Server.MapPath(lblUrl3.Text));
                }

                if (ProductTypeService.DeleteTypeImg(id, 3))
                {
                    Jscript.Alert("操作成功");
                }
            }
            sp.InitBindData(repInfo, this.pager1, "ProductType", "id", sear());
        }