private void bindCountiesToComboBox()
 {
     using (CountyView _context = new CountyView(context))
     {
         this.countyComboBox.DataSource = _context.GetAllCounties();
         this.countyComboBox.ValueMember = "ID";
         this.countyComboBox.DisplayMember = "Name";
     }
 }
        public CountyWindow(bool _update = false)
        {
            InitializeComponent();

            update = _update;

            context = new GAA_Templates_ModelContainer();
            countyViewContext = new CountyView(context);

            bindProvincesToComboBox();
        }
        public PlayerWindow(bool _update = false)
        {
            InitializeComponent();

            update = _update;
            context = new GAA_Templates_ModelContainer();
            teamViewContext = new TeamView(context);
            countyViewContext = new CountyView(context);
            playerViewContext = new PlayerView(context);
            loadTestData();
            addEventHandlers();
        }
 private void bindCountiesToComboBox(ComboBox cb)
 {
     using (CountyView _context = new CountyView(context))
     {
         cb.DataSource = _context.GetAllCounties();
         cb.ValueMember = "ID";
         cb.DisplayMember = "Name";
     }
 }