private void reFriend_ItemCommand(object sender, System.Web.UI.WebControls.RepeaterCommandEventArgs e) { if (e.CommandName == "Del") { if (ProductCommentHelper.DeleteFriendExtension(int.Parse(e.CommandArgument.ToString())) > 0) { this.BindData(); this.ShowMsg("删除成功", true); System.Web.UI.WebControls.Literal literal = (System.Web.UI.WebControls.Literal)e.Item.FindControl("Literal1"); string text = literal.Text; if (!string.IsNullOrEmpty(text)) { string[] array = text.Split(new char[] { '|' }); for (int i = 0; i < array.Length; i++) { string str2 = array[i]; string path = str2; path = base.Server.MapPath(path); if (System.IO.File.Exists(path)) { System.IO.File.Delete(path); } } } } else { this.ShowMsg("删除失败", false); } } }
private void reFriend_ItemCommand(object sender, RepeaterCommandEventArgs e) { if (e.CommandName == "Del") { if (ProductCommentHelper.DeleteFriendExtension(int.Parse(e.CommandArgument.ToString())) > 0) { this.BindData(); this.ShowMsg("删除成功", true); Literal literal = (Literal)e.Item.FindControl("Literal1"); string text = literal.Text; if (!string.IsNullOrEmpty(text)) { foreach (string str2 in text.Split(new char[] { '|' })) { string path = str2; path = base.Server.MapPath(path); if (File.Exists(path)) { File.Delete(path); } } } } else { this.ShowMsg("删除失败", false); } } }