/// <summary> /// 购物车结算 /// </summary> private void vipCart() { string number = Q("m"); string gdid = Q("gdid"); if (!string.IsNullOrEmpty(gdid)) { string[] value = gdid.Split('|'); foreach (string id in value) { string[] Info = DBHelp.frS_string("select [upid],[title],[price],[ImgS],[count] from [e_cart] where [emid]='" + id + "'"); string[] Text = { "Number", "upid", "emid", "title", "price", "ImgS", "count" }; string[] Value = { IdNumber.NumberSec("e_order", "or"), number, id, Info[1], Info[2], Info[3], Info[4] }; if (AddClass.fromAdd("e_order", Text, Value)) { if (Delet.DeletintW("e_cart", "[upid]='" + number + "' and [emid] in (" + gdid.Replace("|", ",") + ")") > 0) { Write("Xerror|1|购买成功"); } else { Write("Xerror|0|购买失败"); } } else { Write("Xerror|0|购买失败"); } } } }
/// <summary> /// 删除购物车信息 /// </summary> private void deleteCart() { string number = Q("m"); string gdid = Q("gdid"); if (Delet.DeletintW("e_cart", "[upid]='" + number + "' and [emid] in (" + gdid.Replace("|", ",") + ")") > 0) { Write("Xerror|1|删除成功"); } else { Write("Xerror|0|删除失败"); } }
/// <summary> /// 删除购物车数据 /// </summary> private void dCart() { string number = Request.Cookies["userSett"]["number"]; string emid = Q("emid"); if (!string.IsNullOrEmpty(emid)) { if (Delet.DeletboolW("e_cart", "[emid]='" + emid + "'")) { Write("Xerror|1|数据删除成功"); } else { Write("Xerror|0|数据删除失败"); } } }
/// <summary> /// 删除操作 /// </summary> private void BoxDelet() { string SMfrom = R("SMfrom"), Sonfrom = R("Sonfrom"), from = R("from"), id = R("id"); if (string.IsNullOrEmpty(id)) { return; } string usid = R("usid"), ImgS = R("ImgS"), Files = R("Files"), cssupid = R("cssupid"); if (!string.IsNullOrEmpty(cssupid)) { Delet.Cssupid = cssupid; } string[] newstr = id.Split('|'); int i = 0; id = ""; foreach (string s in newstr) { if (string.IsNullOrEmpty(id)) { id += "'" + s + "'"; } else { id += ",'" + s + "'"; } } if (!string.IsNullOrEmpty(Files)) { string name = Request["_name"]; newstr = name.Split('|'); foreach (string s in newstr) { IOFile.DeleteFolder2(s); } } if (!string.IsNullOrEmpty(SMfrom)) { if (string.IsNullOrEmpty(ImgS)) { i = Delet.Deletint(from, Sonfrom, SMfrom, id); } else { i = Delet.Deletimg(from, Sonfrom, SMfrom, id, ImgS); } if (i > 0) { Response.Write("删除成功!共删除 " + i + "子表条记录"); } else { Response.Write("删除成功!没有子表条记录"); } } else if (!string.IsNullOrEmpty(Sonfrom)) { if (string.IsNullOrEmpty(ImgS)) { i = Delet.Deletint(from, Sonfrom, id); } else { i = Delet.Deletimg(from, Sonfrom, id, ImgS); } if (i > 0) { Response.Write("删除成功!共删除 " + i + "子表条记录"); } else { Response.Write("删除成功!没有子表条记录"); } } else { if (!string.IsNullOrEmpty(usid)) { i = DBHelp.insert("delete from [" + from + "] where [Sid]=" + id + " and [usid]=" + usid); if (i > 0) { Response.Write("删除成功!共删除 " + i + "条记录"); } else { Response.Write("删除失败"); } } else { if (string.IsNullOrEmpty(ImgS)) { i = Delet.Deletint(from, id); } else { i = Delet.Deletimg(from, id, ImgS); } if (i > 0) { Response.Write("删除成功!共删除 " + i + "条记录"); } else { Response.Write("删除失败"); } } } }