protected void Dels_Btn_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request.Form["idchk"])) { pubBll.DelByIDS(Request.Form["idchk"]); } MyBind(); }
public ContentResult Pub_API() { string action = RequestEx["action"]; string ids = RequestEx["ids"]; switch (action) { case "del": { pubBll.DelByIDS(ids); } break; case "copy": { int id = DataConvert.CLng(ids); if (id < 1) { return(Content(Failed.ToString())); } M_Pub pubMod = pubBll.SelReturnModel(id); pubMod.Pubid = 0; pubMod.PubCreateTime = DateTime.Now; pubMod.PubName = pubMod.PubName + "_copy"; pubBll.insert(pubMod); } break; case "modelname": //模型名ajax检测 { string name = DataConverter.CStr(Request.Form["value"]); string result = DBHelper.Table_IsExist(B_Pub.PREFIX + name).ToString().ToLower(); return(Content(result)); //return "<font color=blue>数据表已存在! 可重复使用!</font>"; //return "<font color=green>数据表不存在,系统将自动创建!</font>"; } case "recover": { pubBll.RecyleByIDS(ids, 1); } break; } return(Content(Success.ToString())); }
//批量删除 protected void Clear_Btn_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request.Form["idchk"])) { if (pubBll.DelByIDS(Request.Form["idchk"])) { Response.Write("<script language=javascript>alert('" + Resources.L.除成功 + "!');location.href='PubRecycler.aspx'</script>"); } else { Response.Write("<script language=javascript>alert(" + Resources.L.除失败 + "'!');location.href='PubRecycler.aspx'</script>"); } } else { function.Script(this, "alert('" + Resources.L.批量删除失败 + "');"); } DataBind(); }