public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; int userid = context.Request["userid"].ToInt32(); int orderid = context.Request["orderid"].ToInt32(); if (userid == 0 || orderid == 0) { context.Response.Redirect("../member/MyOrder.aspx"); } OrdersBLL ordersBLL = new OrdersBLL(); ordersBLL.DeleteOrder(userid, orderid); context.Response.Redirect("../member/MyOrder.aspx"); }
protected void Page_Load(object sender, EventArgs e) { #region 发货 oid = Request["oid"].ToInt32(0); if (oid != 0) { Orders tmp = ordersBLL.QuerySingle(oid); if (tmp != null) { tmp.orderStatus = 2; tmp.payTime = DateTime.Now; ordersBLL.Update(tmp); } } #endregion #region 除 deleteid = Request["deleteid"].ToInt32(0); if (deleteid != 0) { Orders tmp = ordersBLL.QuerySingle(deleteid); if (tmp != null) { ordersBLL.DeleteOrder(tmp.userId, tmp.orderId); } } #endregion slt = Request["slt"].ToInt32(-1); var where = new { orderStatus = slt }; if (slt == -1) { where = null; } index = Request["page"].ToInt32(1); totalCount = (int)Math.Ceiling((double)ordersBLL.QueryCount(where) / size); orders = ordersBLL.QueryList(index, size, where, "orderId", true); }