示例#1
0
 public void Del(int d)
 {
     Tunnel.BLL.Tunnel_MingXing tmx = new Tunnel.BLL.Tunnel_MingXing();
     if (File.Exists(Server.MapPath(tmx.GetModel(d).m_img)))
     {
         File.Delete(Server.MapPath(tmx.GetModel(d).m_img));
     }
     tmx.Delete(d);
 }
示例#2
0
 public void Del(int d)
 {
     try
     {
         Tunnel.BLL.Tunnel_MingXing tmx = new Tunnel.BLL.Tunnel_MingXing();
         if (File.Exists(Server.MapPath(tmx.GetModel(d).m_img)))
         {
             File.Delete(Server.MapPath(tmx.GetModel(d).m_img));
         }
         tmx.Delete(d);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }