Example #1
0
        private void LoadPrograms()
        {
            programs = SqlCommunication.GetPrograms();

            comboBoxPrograms.Items.Clear();
            comboBoxPrograms.DataSource    = programs;
            comboBoxPrograms.DisplayMember = "name";
            comboBoxPrograms.SelectedIndex = -1;
        }
Example #2
0
        public void LoadPrograms()
        {
            programs = SqlCommunication.GetPrograms();

            comboBoxPrograms.Items.Clear();
            comboBoxPrograms.DataSource    = programs;
            comboBoxPrograms.DisplayMember = "name";
            comboBoxPrograms.SelectedIndex = -1;

            labelDescription.Text = string.Empty;
        }
        private void LoadPrograms()
        {
            listOfPrograms = SqlCommunication.GetPrograms();

            comboBoxPrograms.Items.Clear();

            foreach (var item in listOfPrograms)
            {
                comboBoxPrograms.Items.Add(item.Name);
            }

            comboBoxPrograms.SelectedIndex = -1;
        }
        /// <summary>
        /// Loads programs for DB and adds to combo box
        /// </summary>
        private void LoadPrograms()
        {
            // Gets list of programs from DB
            programs = SqlCommunication.GetPrograms();

            // Clear combo box
            comboBoxPrograms.Items.Clear();

            // Set data source of combo box
            comboBoxPrograms.DataSource = programs;

            // What it should display
            comboBoxPrograms.DisplayMember = "name";

            // Deselect everything
            comboBoxPrograms.SelectedIndex = -1;
        }