Пример #1
0
        private async void UxProcessTips_Click(object sender, RoutedEventArgs e)
        {
            bool success = false;

            foreach (Tip tip in uxTipListView.Items)
            {
                success = await DeleteTipRequest.SendDeleteTipRequest(tip._id);
            }
            if (success)
            {
                ContentDialog responseAlert = new ContentDialog
                {
                    Title           = "Processed",
                    Content         = "Employee tips have been processed",
                    CloseButtonText = "Ok"
                };
                ContentDialogResult result = await responseAlert.ShowAsync();

                var validGetTips = await GetEmployeeTips.SendGetEmployeeTips(selectedEmployee._id);

                uxTipListView.ItemsSource = RealmManager.All <Tips>().FirstOrDefault().tip;
            }
            else
            {
                ContentDialog responseAlert = new ContentDialog
                {
                    Title           = "Unsuccessful",
                    Content         = "Tip processing was unsuccessful",
                    CloseButtonText = "Ok"
                };
                ContentDialogResult result = await responseAlert.ShowAsync();
            }
        }
Пример #2
0
        private async void UxTipPopupButton_Click(object sender, RoutedEventArgs e)
        {
            uxTipCompPopup.IsOpen    = true;
            uxTipListView.Visibility = Visibility.Visible;
            uxProcessTips.Visibility = Visibility.Visible;
            var validGetTips = await GetEmployeeTips.SendGetEmployeeTips(selectedEmployee._id);

            uxTipListView.ItemsSource = RealmManager.All <Tips>().FirstOrDefault().tip;
        }