private void doOrder(Order order) { User user = (User) Session["UserToken"]; order.write("usid", user.id); order.insert(); Response.Redirect("order_ticket.aspx?success=true"); }
private void orderClick(object sender, System.EventArgs e) { Order order = new Order(); order.write("tickets", int.Parse(((TextBox)ticketOrder.FindControl("numOfTickets")).Text)); order.write("price", 55.0); order.write("shid", int.Parse(((HiddenField)ticketOrder.FindControl("hiddenShid")).Value)); if (LoginHelper.loggedIn()) { doOrder(order); } else { Session["tmpOrder"] = order; Response.Redirect("order_ticket.aspx?login=true"); } }