Exemplo n.º 1
0
        private async void RemoveUser_button_Clicked(object sender, EventArgs e)
        {
            bool response = await DisplayAlert("Exit from team", "Are you sure?", "Yes", "No");

            if (response == true)
            {
                RemovingService.RemoveUserFromTeam(_userID, (BindingContext as Team).Id);
            }
        }
Exemplo n.º 2
0
        private void RemoveProduct_OnClick(object sender, RoutedEventArgs e)
        {
            var product = GettingService.GetProducts()
                          .First(p => p.Name == ProductCmbBox.SelectedItem.ToString());

            RemovingService.RemoveProduct(product);

            if (MessageBox.Show("Product removed") == MessageBoxResult.OK)
            {
                Close();
            }
        }
Exemplo n.º 3
0
 async void DeleteAccount_Pressed(object sender, System.EventArgs e)
 {
     if (await DisplayAlert("Warning", "Do you want to delete this account?", "YES", "NO"))
     {
         RemovingService.RemoveUser(User.Id);
         await Navigation.PushAsync(new StartPage());
     }
     else
     {
         return;
     }
 }
        private void RemoveSeller_OnClick(object sender, RoutedEventArgs e)
        {
            var seller = GettingService.GetSellers()
                         .First(s => s.FirstName + " " + s.LastName == SellerCmbBox.SelectedItem.ToString());

            RemovingService.RemoveSeller(seller);

            if (MessageBox.Show("Seller removed") == MessageBoxResult.OK)
            {
                Close();
            }
        }
Exemplo n.º 5
0
        private void RemoveClient_OnClick(object sender, RoutedEventArgs e)
        {
            var client = GettingService.GetClients()
                         .First(c => c.FirstName + " " + c.LastName == ClientCmbBox.SelectedItem.ToString());

            RemovingService.RemoveClient(client);

            if (MessageBox.Show("Client removed") == MessageBoxResult.OK)
            {
                Close();
            }
        }