示例#1
0
 public AddNewGeneratorWindow()
 {
     InitializeComponent();
     DataContext               = this;
     cmbTypes.ItemsSource      = items;
     cmbTypes.SelectedIndex    = 0;
     cmb_box_grupa.ItemsSource = dbg.ReadAll(Data.Code);
 }
示例#2
0
        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();
            }
        }
示例#3
0
 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;
 }