/// <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 AreaAgent_Del() { string ids = RequestTool.RequestString("ids"); //if (!EX_Admin.Power("supplier_group_del", "删除商家分组")) //{ // AjaxNoPower(); // return; //} if (ids != "") { B_Lebi_Agent_Area.Delete("id in (lbsql{" + ids + "})"); } Log.Add("删除区域代理", "Agent_Area", ids, CurrentAdmin, ids); Response.Write("{\"msg\":\"OK\"}"); }