|
C#
public static void EditOnLoad(System.Web.UI.Page Page)
{
// get customer id
string customerID = Page.Request["value_CustomerID"];
if (!string.IsNullOrEmpty(customerID))
{
ordersCollection ordersCollection = new
ordersCollection();
Query qry = new Query(orders.Schema).WHERE("CustomerID",
customerID);
ordersCollection.LoadAndCloseReader(qry.ExecuteReader());
if (ordersCollection.Count > 0)
{
Page.Response.Write("All orders for '" + customerID +
"'<br>");
foreach (orders order in ordersCollection)
{
Page.Response.Write(String.Format("<a target=_blank
href=Orders_edit.aspx?editid1={0}> {0}</a>{1}<br>",
order.OrderID, order.OrderDate.Value.ToShortDateString()));
}
}
}
} // EditOnLoad
|