示例#1
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";
        }