private void RecalculateOrderPrices() { var orderLst = dgMultiInvGrid.GetVisibleRows() as IEnumerable <CreditorOrderClient>; if (orderLst == null || orderLst.Count() == 0) { return; } CWConfirmationBox dialog = new CWConfirmationBox(Uniconta.ClientTools.Localization.lookup("AreYouSureToContinue"), Uniconta.ClientTools.Localization.lookup("Confirmation"), false); dialog.Closing += async delegate { if (dialog.ConfirmationResult == CWConfirmationBox.ConfirmationResultEnum.Yes) { busyIndicator.IsBusy = true; OrderAPI orderApi = new OrderAPI(this.api); var err = await orderApi.RecalcOrderPrices(orderLst); busyIndicator.IsBusy = false; UtilDisplay.ShowErrorCode(err); } }; dialog.Show(); }