protected void Page_Load(object sender, EventArgs e) { // if (!LJH.Rank.IsModuleRank(1406)) /// { // Response.Write("<div style='width:100%;margin-top:200px;text-align:center;color:red;'>您没有本模块的操作权限! 请与管理员联系!</div>"); // Response.End(); // } if (!IsPostBack) { if (Request["del"] != null) { LinkService.DeleteLink(int.Parse(Request["del"])); string backurl = BackPage(pds(), Request["reUrl"].Replace("|", "&"), "link_manage.aspx?page=" + (pds().CurrentPageIndex - 1).ToString() + getcanshu()); Response.Redirect(backurl); } else if (Request["flag"] != null && Request["id"] != null) { LinkService.SetFlag(Request["flag"] == "1"?true:false, int.Parse(Request["id"])); Response.Redirect("link_manage.aspx"); } else { getdata(); } } }
protected void btDel_Click(object sender, EventArgs e) { if (Request["sel"] != null) { string[] a = Request["sel"].Split(','); for (int i = 0; i < a.Length; i++) { LinkService.DeleteLink(int.Parse(a[i])); } } string backurl = BackPage(pds(), Request.Url.ToString(), "link_manage.aspx?page=" + (pds().CurrentPageIndex - 1).ToString() + getcanshu()); Response.Redirect(backurl); }
public ActionResult Delete(int id) { ls.DeleteLink(id); return(RedirectToAction("Index")); }
/// <summary> /// ajax删除 /// </summary> protected void DeleteLink() { LinkService.DeleteLink(Convert.ToInt32(Request["id"])); Response.Write("success"); Response.End(); }