Exemplo n.º 1
0
 private void Add_Click(object sender, RoutedEventArgs e)
 {
     edw = new EditWindow(s);
     if (edw.ShowDialog() == true)
     {
         UpdateTable();
     }
 }
Exemplo n.º 2
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            DataRowView row = dataGrid.SelectedItem as DataRowView;

            if (row != null)
            {
                int        value = int.Parse(row.Row.ItemArray[0].ToString());
                DetCarInfo sc    = s.GetSavedCar(value);
                if (sc != null)
                {
                    edw = new EditWindow(s, sc);
                    if (edw.ShowDialog() == true)
                    {
                        UpdateTable();
                    }
                }
            }
        }