public void OnCloseoutResponse(CloseoutResponse response)
{
if (response != null && response.Success)
{
uiThread.Send(delegate (object state) {
AlertForm.Show(this, "Batch Closed", "Batch " + response.Batch.id + " was successfully processed.");
}, null);
}
if (response != null && response.Result.Equals(ResponseCode.FAIL))
{
uiThread.Send(delegate (object state) {
AlertForm.Show(this, "Close Attempt Failed", "Reason: " + response.Reason + ".");
}, null);
}
}