/// <summary> /// 删除会员 /// </summary> public void User_Del() { if (!EX_Admin.Power("user_del", "删除会员")) { AjaxNoPower(); return; } string id = RequestTool.RequestString("ids"); if (id == "") { Response.Write("{\"msg\":\"" + Tag("请选择要删除的信息") + "\"}"); return; } if (RequestTool.GetConfigKey("IsDelFalse").ToLower() == "true") { List <Lebi_User> users = B_Lebi_User.GetList("id in (lbsql{" + id + "})", ""); foreach (var u in users) { u.IsDel = 1; B_Lebi_User.Update(u); } } else { List <Lebi_Order> modellist = B_Lebi_Order.GetList("User_id in (lbsql{" + id + "})", ""); foreach (Lebi_Order model in modellist) { B_Lebi_Order.Delete("id = " + model.id + ""); B_Lebi_Order_Log.Delete("Order_id = " + model.id + ""); B_Lebi_Order_Product.Delete("Order_id = " + model.id + ""); } B_Lebi_User.Delete("id in (lbsql{" + id + "})"); B_Lebi_Message.Delete("User_id_To in (lbsql{" + id + "})"); B_Lebi_User_Answer.Delete("User_id in (lbsql{" + id + "})"); B_Lebi_User_Answer.Delete("User_id in (lbsql{" + id + "})"); B_Lebi_User_BuyMoney.Delete("User_id in (lbsql{" + id + "})"); B_Lebi_User_Card.Delete("User_id in (lbsql{" + id + "})"); B_Lebi_User_Money.Delete("User_id in (lbsql{" + id + "})"); B_Lebi_User_Point.Delete("User_id in (lbsql{" + id + "})"); B_Lebi_User_Product.Delete("User_id in (lbsql{" + id + "})"); B_Lebi_User_Address.Delete("User_id in (lbsql{" + id + "})"); B_Lebi_Supplier.Delete("User_id in (lbsql{" + id + "})"); //B_Lebi_Supplier_ProductType.Delete("Supplier_id in (lbsql{" + id + "})"); //B_Lebi_Supplier_Verified_Log.Delete("Supplier_id in (lbsql{" + id + "})"); B_Lebi_Agent_Area.Delete("User_id in (lbsql{" + id + "})"); B_Lebi_Agent_Money.Delete("User_id in (lbsql{" + id + "})"); B_Lebi_Agent_Product.Delete("User_id in (lbsql{" + id + "})"); B_Lebi_Agent_Product_request.Delete("User_id in (lbsql{" + id + "})"); B_Lebi_Agent_Product_User.Delete("User_id in (lbsql{" + id + "})"); B_Lebi_Bill.Delete("User_id in (lbsql{" + id + "})"); B_Lebi_Cash.Delete("User_id in (lbsql{" + id + "})"); B_Lebi_Comment.Delete("User_id in (lbsql{" + id + "})"); B_Lebi_weixin_qrcode.Delete("User_id in (lbsql{" + id + "})"); } Log.Add("删除会员", "User", id.ToString(), CurrentAdmin, id.ToString()); Response.Write("{\"msg\":\"OK\"}"); }
/// <summary> /// 删除商品评价 /// </summary> public void Comment_Del() { if (CurrentUser.id > 0)//已经登录 { string id = RequestTool.RequestSafeString("ids"); if (id == "") { Response.Write("{\"msg\":\"" + Tag("请选择要删除的信息") + "\"}"); return; } B_Lebi_Comment.Delete("TableName = 'Product' and User_id=" + CurrentUser.id + " and Parentid in (lbsql{" + id + "})"); B_Lebi_Comment.Delete("Parentid = 0 and TableName = 'Product' and User_id=" + CurrentUser.id + " and id in (lbsql{" + id + "})"); Response.Write("{\"msg\":\"OK\"}"); } }