/// <summary> /// 删除记录 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void LinkButton1_Command(object sender, CommandEventArgs e) { int Id = Convert.ToInt32(e.CommandArgument); bool b = Dcommon.bBuyInfoOfUserName(Convert.ToString(Id)); if (b != true) { string name = casesInfo.PaperExeists(Id); if (name != "") { string[] html = name.Split('/'); string[] cc = html[2].Split('.'); com.DeleteFile(@TZStatic + html[1].ToString() + @"\" + html[2].ToString()); } long info = bll.delete(Convert.ToString(Id)); if (info > 0) { Tz888.Common.MessageBox.Show(this.Page, "删除成功"); } else { Tz888.Common.MessageBox.Show(this.Page, "删除失败"); } this.GetInfoNews(); } else { Tz888.Common.MessageBox.Show(this.Page, "该信息已有用户购买,不能删除"); } }
/// <summary> /// 删除 /// </summary> /// <param name="Id"></param> private void DeleteNws(int Id) { Tz888.BLL.CarveOut.CarveOutInfoManager bllobj = new Tz888.BLL.CarveOut.CarveOutInfoManager(); string name = casesInfo.PaperExeists(Id); if (name != "") { string[] html = name.Split('/'); string[] cc = html[2].Split('.'); compage.DeleteFile(@"F:\topfo\CY\CarveOut\" + html[1].ToString() + @"\" + html[2].ToString()); } long info = bllobj.delete(Convert.ToString(Id)); if (info > 0) { Tz888.Common.MessageBox.Show(this.Page, "删除成功"); } else { Tz888.Common.MessageBox.Show(this.Page, "删除失败"); } this.GetInfoNews(); }
/// <summary> /// 删除 /// </summary> /// <param name="Id">Id</param> private void DeleteNws(int Id) { string name = casesInfo.PaperExeists(Id); if (name != "") { string[] html = name.Split('/'); string[] cc = html[2].Split('.'); com.DeleteFile(@zsStatic + html[1].ToString() + @"\" + html[2].ToString()); } long info = bll.delete(Convert.ToString(Id)); if (info > 0) { Tz888.Common.MessageBox.Show(this.Page, "删除成功"); } else { Tz888.Common.MessageBox.Show(this.Page, "删除失败"); } this.GetInfoNews(); }
/// <summary> /// 删除 /// </summary> /// <param name="TID"></param> private void DelZS(int TID) { string name = casesInfo.PaperExeists(TID); if (name != "") { string[] html = name.Split('/'); string[] cc = html[2].Split('.'); com.DeleteFile(@"F:\topfo\News\Caseshtml\" + html[1].ToString() + "\\" + html[2].ToString()); } long info = casesInfo.delete(TID); if (info > 0) { Tz888.Common.MessageBox.Show(this.Page, "删除成功"); } else { Tz888.Common.MessageBox.Show(this.Page, "删除失败"); } this.SetPagerParameters(); this.Pager1.DataBind(); }