private void ActivateCustomerInvoice() { try { GenericSvcResult[] results = StorehouseHelper.ActivateInvoice(CustomerInvoice.InvoiceId); int succeedSvcs = 0, errorSvcs = 0; foreach (GenericSvcResult result in results) { if (!result.Succeed) { errorSvcs++; } else { succeedSvcs++; } } // invoice partially activated if (errorSvcs > 0 && succeedSvcs > 0) { ShowErrorMessage("INVOICE_PARTIALLY_ACTIVATED"); return; } if (errorSvcs > 0 && succeedSvcs == 0) { ShowErrorMessage("ACTIVATE_INVOICE_SERVICES"); return; } // RedirectToBrowsePage(); } catch (Exception ex) { ShowErrorMessage("ACTIVATE_INVOICE_SERVICES", ex); } }