private void displayShow(PlaceHolder placeholder, int shid) { placeholder.Controls.Clear(); Show show = new Show(); show.id = Convert.ToInt32(Request["shid"]); show.get(); TextBox tickets = new TextBox(); tickets.ID = "numOfTickets"; Button order = new Button(); order.Text = "Order!"; order.Click += new System.EventHandler(this.orderClick); HiddenField hiddenShid = new HiddenField(); hiddenShid.Value = shid.ToString(); hiddenShid.ID = "hiddenShid"; placeholder.Controls.Add(new LiteralControl("<h1>"+show.read("moid", true)+" @ "+show.read("show_start")+"</h1>")); placeholder.Controls.Add(new LiteralControl("<p>### tickets left</p>")); placeholder.Controls.Add(new LiteralControl("<p>Please input # of tickets you want to order</p>")); placeholder.Controls.Add(tickets); placeholder.Controls.Add(order); placeholder.Controls.Add(new LiteralControl("<br /><br /><a href=\"order_ticket.aspx\">Back to show list</a>")); placeholder.Controls.Add(hiddenShid); }
public override string ToString() { DataMaster user = new User(); user.id = Convert.ToInt32(this.read("usid")); user.get(); DataMaster show = new Show(); show.id = Convert.ToInt32(this.read("shid")); show.get(); return this.id.ToString() + " " + user.ToString() + " - " + show; }