예제 #1
0
 public MainWindow()
 {
     InitializeComponent();
     _path                  = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location);
     _sqliteDataBase        = new SqliteDataBase(_path);
     DgEtudiant.DataContext = _sqliteDataBase.DataSet;
     _sqliteDataBase.Open(_path);
     UpdateDataSet();
     UpdateEnregistrement();
     ComboBoxName.Items.Clear();
     NamesList = _sqliteDataBase.Names;
     foreach (var name in NamesList)
     {
         ComboBoxName.Items.Add(name);
     }
     ComboBoxName.SelectedItem      = NamesList[0];
     ComboBoxName.SelectionChanged += ComboBoxNameOnSelectionChanged;
 }