public AddNewGeneratorWindow() { InitializeComponent(); DataContext = this; cmbTypes.ItemsSource = items; cmbTypes.SelectedIndex = 0; cmb_box_grupa.ItemsSource = dbg.ReadAll(Data.Code); }
private void ButtonNewGenerator(object sender, RoutedEventArgs e) { DbGroup dbgroup = new DbGroup(); var groups = dbgroup.ReadAll(Data.Code); if (groups.Count == 0) { MessageBox.Show("Please add one group first!", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } else { AddNewGeneratorWindow add = new AddNewGeneratorWindow(); add.Show(); } }
private void RadioButton_Groups(object sender, RoutedEventArgs e) { //popuniti combo box sa grupama cmb_box_stat.ItemsSource = dbgroup.ReadAll(Data.Code); cmb_box_stat.SelectedIndex = 0; }