Esempio n. 1
0
        void fillGrid()
        {
            MySqlCommand command = new MySqlCommand("SELECT * FROM `iclass`");

            dataGridView1.DataSource = iClass.getCommand(command);
            //Показываю кол-во учителей
            labelAllClass.Text = "Общая количество учителей: " + dataGridView1.Rows.Count;
        }
Esempio n. 2
0
        public void fillGrid(MySqlCommand command)
        {
            DataGridViewImageColumn picCol = new DataGridViewImageColumn();

            dataGridView1.RowTemplate.Height = 160;
            dataGridView1.DataSource         = iStudent.getStudents(command);
            picCol             = (DataGridViewImageColumn)dataGridView1.Columns[7];
            picCol.ImageLayout = DataGridViewImageCellLayout.Stretch;
            labelALL.Text      = "Общая количество учеников: " + dataGridView1.Rows.Count;
            iClassTableDB iClass = new iClassTableDB();

            comboBoxClassName1.DataSource  = iClass.getCommand(new MySqlCommand("SELECT * FROM `iclass`"));
            comboBoxClassName1.ValueMember = "className"; comboBoxClassName1.DisplayMember = "className";
            comboBoxClassName2.DataSource  = iClass.getCommand(new MySqlCommand("SELECT * FROM `iclass`"));
            comboBoxClassName2.ValueMember = "className"; comboBoxClassName2.DisplayMember = "className";
        }
Esempio n. 3
0
        void fillCombo()
        {
            MySqlCommand command = new MySqlCommand("SELECT * FROM `iclass`");

            comboBoxClassName.DataSource         = iClass.getCommand(command);
            comboBoxClassName.DisplayMember      = "className";
            comboBoxClassName.ValueMember        = "className";
            comboBoxClassName.SelectedItem       = null;
            this.comboBoxClassName.DropDownStyle = ComboBoxStyle.DropDownList;

            textBoxNewClassName.Text    = "";
            textBoxNewClassName.Visible = false;
        }
Esempio n. 4
0
        private void fullMixAddForm_Load(object sender, EventArgs e)
        {
            //SELECT a.id, b. surName,b.name, b.patronymic FROM iteacher_has_subject a, iteacher b WHERE a.iTeacher_fk=b.id AND a.id=29

            // var x = (Teacher)(comboBoxTeacherSubject.SelectedValue);
            comboBoxTeacherSubject.DataSource =
                iT_iS.getTeacher_Subject(new MySqlCommand("SELECT * FROM `iTeacher_has_subject`"));
            comboBoxTeacherSubject.ValueMember   = "id";
            comboBoxTeacherSubject.DisplayMember = "id";
            comboBoxTeacherSubject.SelectedItem  = null;
            comboBoxClassName.DataSource         = iClass.getCommand(new MySqlCommand("SELECT * FROM `iclass`"));
            comboBoxClassName.ValueMember        = "className";
            comboBoxClassName.DisplayMember      = "className";
            comboBoxClassName.SelectedItem       = null;
            comboBoxScheduleD.DataSource         =
                fullMix.getFullMixCommand(new MySqlCommand("SELECT * FROM `ischedule`"));
            comboBoxScheduleD.ValueMember   = "id";
            comboBoxScheduleD.DisplayMember = "id";
            comboBoxScheduleD.SelectedItem  = null;
        }