Exemplo n.º 1
0
        private void buttonEdit_Click(object sender, RoutedEventArgs e)
        {
            Customer selected = dataGridCustomers.SelectedItem as Customer;
            if (dataGridCustomers.SelectedItem == null)

            { return; }

            CustomerEdit editWin = new CustomerEdit(selected);
            editWin.Owner = this;
            editWin.ShowDialog();
        }
Exemplo n.º 2
0
        private void dataGridCustomers_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            Customer selected = dataGridCustomers.SelectedItem as Customer;
            if (selected.id <1)
            
            { return; }

                CustomerEdit editWin = new CustomerEdit(selected);
                editWin.Owner = this;
                editWin.ShowDialog();
        }