Beispiel #1
0
        private void ListViewProducts_PreviewMouseUp(object sender, MouseButtonEventArgs e)
        {
            ProductPrezentation product = new ProductPrezentation();

            product.Show();
            this.Close();
        }
        private void ListViewProducts_PreviewMouseUp(object sender, MouseButtonEventArgs e)
        {
            Masini masina = (Masini)ListViewProducts.SelectedItem;

            if (ListViewProducts.SelectedItem != null)
            {
                try
                {
                    if (masina.isSold == true)
                    {
                        new MessageBoxPoni("Masina Cumparata!").Show();
                        return;
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                    return;
                }
                ProductPrezentation product = new ProductPrezentation(utilizator, masina);
                List <Masini>       masinis = new List <Masini>();
                product.ShowDialog();
                // update User
                utilizator = product.GetUtilizator();
                // update lista masini
                masina = product.GetMasini();
                product.Close();
            }
        }