예제 #1
0
        private async void Delete(object par)
        {
            FinanceViewModel financeViewModel = this;

            if (!(par is ForkHistory fork))
            {
                return;
            }
            if (await financeViewModel.ShowYesOrNoDialogAsync("Запрос", "Удалить вилку " + fork.SportEvent + " из истории?") == MessageDialogResult.Negative)
            {
                return;
            }
            financeViewModel._bd.Remove(fork);
            financeViewModel.Filter(financeViewModel.StarTime, financeViewModel.EndTime);
        }
예제 #2
0
        private async void FilterNow()
        {
            FinanceViewModel financeViewModel = this;

            if (financeViewModel.StarTime > financeViewModel.EndTime)
            {
                await financeViewModel.ShowErrorDialogAsync("Начальное время не может быть меньше конечного!");

                financeViewModel.StarTime = financeViewModel.EndTime;
            }
            else
            {
                financeViewModel.Filter(financeViewModel.StarTime, financeViewModel.EndTime);
            }
        }