示例#1
0
 //
 private string Delete(HttpContext context)
 {
     try
     {
         int succ = 0;
         int err  = 0;
         SysLogBll.Create("新闻", "删除新闻信息操作", adminUser.AdminName);
         string[] idList = context.Request.QueryString["idList"].Split(',');
         for (int i = 0; i < idList.Length; i++)
         {
             int  id    = int.Parse(idList[i]);
             News model = dal.GetModel(id);
             if (dal.Delete(id))
             {
                 Component.DeleteImg("~/newsImg/min/" + model.NewsImg);
                 Component.DeleteImg("~/newsImg/max/" + model.NewsImg);
                 Component.DeleteImg("~/newsFile/" + model.NewsFile);
                 succ++;
             }
             else
             {
                 err++;
             }
         }
         return("删除操作成功了[" + succ.ToString() + "]条,失败了[" + err.ToString() + "]条!");
     }
     catch (Exception ex)
     {
         SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
         return("错误代码:500 ");
     }
 }
示例#2
0
 //
 private string Delete(HttpContext context)
 {
     try
     {
         SysLogBll.Create("认证会员", "删除认证会员操作", adminUser.AdminName);
         int id = 0;
         try { id = int.Parse(context.Request.QueryString["Id"].ToString()); }
         catch { }
         WebUserVeri webUser = dal.GetModel(id);
         aodal.Delete(id);
         Component.DeleteImg("~/Super/Scan/us/" + webUser.LoginName + "/" + webUser.VeriIDCardScan);
         Component.DeleteImg("~/Super/Scan/us/" + webUser.LoginName + "/" + webUser.VeriCorporateIDCardScan);
         Component.DeleteImg("~/Super/Scan/us/" + webUser.LoginName + "/" + webUser.VeriCreditCodeScan);
         if (dal.Delete(id))
         {
             new AuditOpinionDal().Delete(webUser.Id);
             return("删除操作成功!");
         }
         else
         {
             return("删除失败请重新操作,错误代码:500 ");
         }
     }
     catch (Exception ex)
     {
         SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
         return(string.Empty);
     }
 }
示例#3
0
 //
 private dynamic Delete(HttpContext context)
 {
     try
     {
         SysLogBll.Create("出让/受让方上传附件", "删除出让/受让方上传附件操作", adminUser.AdminName);
         int Id = 0;
         try { Id = int.Parse(context.Request.QueryString["Id"].ToString()); }
         catch { }
         if (dal.Exists(Id))
         {
             LiceTranScan obj = dal.GetModel(Id);
             if (dal.Delete(Id))
             {
                 Component.DeleteImg("~/Super/Scan/lt/" + obj.FK_LiceTranId + "/" + obj.ScanUrl);
                 return("删除成功!");
             }
             else
             {
                 return("删除失败请重新操作! ");
             }
         }
         else
         {
             return("数据已经开始受理中无法删除操作!");
         }
     }
     catch (Exception ex)
     {
         SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
         return("删除失败请重新操作,错误代码:500 ");
     }
 }
示例#4
0
 //
 private dynamic Delete(HttpContext context)
 {
     try
     {
         SysLogBll.Create("友情链接", "删除友情链接操作", adminUser.AdminName);
         int Id = 0;
         try { Id = int.Parse(context.Request.QueryString["Id"].ToString()); }
         catch { }
         dynamic model = dal.GetModel(Id);
         if (dal.Delete(Id))
         {
             Component.DeleteImg("~/linkImg/" + model.LinkImgUrl);
             return("删除成功!");
         }
         else
         {
             return("删除失败请重新操作! ");
         }
     }
     catch (Exception ex)
     {
         SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
         return("删除失败请重新操作,错误代码:500 ");
     }
 }