Skip to content

Instantly share code, notes, and snippets.

@ronanq
Created October 23, 2013 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ronanq/7126913 to your computer and use it in GitHub Desktop.
Save ronanq/7126913 to your computer and use it in GitHub Desktop.
Invoice create and handle response
var newInvoice = repository.Create<Invoice>(invs).FirstOrDefault();
if (newInvoice != null)
{
if (newInvoice.ValidationStatus == ValidationStatus.ERROR)
{
for (int i = 0; i < newInvoice.ValidationErrors.Count; i++)
{
returnString = returnString + "\n" + newInvoice.ValidationErrors[i].Message;
}
}
else
{
return newInvoice.ValidationStatus.ToString();
}
}
return returnString;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment