//删除操作 protected void gvUserOrder_RowDeleting(object sender, GridViewDeleteEventArgs e) { int OrdersID = (int)gvUserOrder.DataKeys[e.RowIndex].Value; if (BLLOrder.Delete(OrdersID)) { Response.Write("<script>alert('删除成功')</script>"); } else { Response.Write("<script>alert('删除失败')</script>"); } gvUserOrder.DataSource = BLLOrder.BLLSelectOrderAll(); gvUserOrder.DataBind(); }