private void UpdateCustomerComplete(SubmitOperation so)
{
if (so.HasError)
{
if (!m_customer.HasValidationErrors)
{
// Only display the exception message if it's not already being set in the validation summary.
// Remove the error information the RIA domain services framework adds in and that will just confuse things.
string errorMessage = Regex.Replace(so.Error.Message, @"Submit operation failed.", "");
UIHelper.SetText(m_statusTextBlock, errorMessage);
}
else
{
UIHelper.SetText(m_statusTextBlock, "There was a validation error updating your details.");
}
so.MarkErrorAsHandled();
}
else
{
UIHelper.SetText(m_statusTextBlock, "Details successfully updated.");
}
SetUpdateButtonsEnabled(true);
}