/// <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 User_Del() { if (!EX_Admin.Power("supplier_user_del", "删除商家")) { AjaxNoPower(); return; } string id = RequestTool.RequestString("ids"); if (id == "") { Response.Write("{\"msg\":\"" + Tag("请选择要删除的信息") + "\"}"); return; } B_Lebi_Supplier.Delete("id in (lbsql{" + id + "})"); List <Lebi_Order> modellist = B_Lebi_Order.GetList("Supplier_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_Brand.Delete("Supplier_id in (lbsql{" + id + "})"); B_Lebi_ProPerty.Delete("Supplier_id in (lbsql{" + id + "})"); B_Lebi_ProPerty_Tag.Delete("Supplier_id in (lbsql{" + id + "})"); B_Lebi_Cash.Delete("Supplier_id in (lbsql{" + id + "})"); B_Lebi_Message.Delete("Supplier_id in (lbsql{" + id + "})"); B_Lebi_Supplier_Money.Delete("Supplier_id in (lbsql{" + id + "})"); B_Lebi_Supplier_Bank.Delete("Supplier_id in (lbsql{" + id + "})"); B_Lebi_Supplier_BillType.Delete("Supplier_id in (lbsql{" + id + "})"); B_Lebi_Supplier_ProductType.Delete("Supplier_id in (lbsql{" + id + "})"); //B_Lebi_Supplier_Verified.Delete("Supplier_id in (lbsql{" + id + "})"); B_Lebi_Supplier_Verified_Log.Delete("Supplier_id in (lbsql{" + id + "})"); B_Lebi_Log.Delete("Supplier_id in (lbsql{" + id + "})"); B_Lebi_ServicePanel.Delete("Supplier_id in (lbsql{" + id + "})"); B_Lebi_ServicePanel_Group.Delete("Supplier_id in (lbsql{" + id + "})"); Log.Add("删除商家", "Supplier_User", id.ToString(), CurrentAdmin, id.ToString()); Response.Write("{\"msg\":\"OK\"}"); }