in Source/Website/Default.aspx.cs [14:50]
protected void Page_Load(object sender, EventArgs e)
{
// Don't forget to create the 'rewards' database and execute the sql ..\SQLScripts\CreateTablesAndPopulate.sql script
// to make the initial migration and seeding
string yolo = Request.QueryString["yolo"];
if (yolo == "hi")
{
throw new Exception();
}
var cid = -1;
if (Page.IsPostBack)
{
cid = int.Parse(CustomerId.Value);
}
var orders = OrdersData.GetOrders(5);
orderList.DataSource = orders;
orderList.DataBind();
if (cid == -1)
{
var defaultCustomer = CustomerData.GetDefaultCustomer();
MapCustomer(defaultCustomer);
}
else
{
var customer = CustomerData.GetCustomerById(cid);
MapCustomer(customer);
}
lblCheckbox.Attributes.Add("for", EnrollCheckbox.ClientID);
}