Ejemplo n.º 1
0
        private async Task ResetTrades(IList trades)
        {
            if (trades == null || trades.Count == 0)
            {
                return;
            }

            MessageDialogResult res = await DialogService.ShowMessageAsync(Parent,
                                                                           "Reset Trade",
                                                                           string.Format("Are you sure you want to reset {0} trades?", trades.Count),
                                                                           MessageDialogStyle.AffirmativeAndNegative);

            if (res != MessageDialogResult.Affirmative)
            {
                return;
            }

            //reset the trades
            foreach (Trade trade in trades)
            {
                await TradesRepository.Reset(trade);
            }
        }