Exemple #1
0
        private void AddToCart(object sender, RoutedEventArgs e)
        {
            Components components = (sender as Button).DataContext as Components;

            scvm.AddToCart(components);
            datagrid2.Items.Refresh();
            datagrid3.Items.Refresh();
        }
Exemple #2
0
        private void AddToCart(object sender, RoutedEventArgs e)
        {
            BtnBuy.IsEnabled = true;
            Components components = (sender as Button).DataContext as Components;

            scvm.AddToCart(components);
            try
            {
                datagrid2.Items.Refresh();
                datagrid3.Items.Refresh();
            }
            catch (Exception)
            {
                MessageBox.Show("Error");
            }
        }