private void GetCustomerCompleted(LoadOperation<Customer> lo)
{
if (lo.HasError)
{
UIHelper.SetText(m_statusTextBlock, lo.Error.Message);
lo.MarkErrorAsHandled();
}
else
{
m_customer = m_riaContext.Customers.FirstOrDefault();
if (m_customer == null)
{
UIHelper.SetText(m_statusTextBlock, "There was an error retrieving your details. Please re-login and try again.");
}
else
{
this.DataContext = m_customer;
UIHelper.SetText(m_statusTextBlock, "Details successfully loaded.");
SetUpdateButtonsEnabled(true);
}
}
}