Example #1
0
        public void fillGrid(SqlCommand command)
        {
            Nhanvien nhanvien = new Nhanvien();

            dataGridView1.ReadOnly = true;
            DataGridViewImageColumn picCol = new DataGridViewImageColumn();

            dataGridView1.RowTemplate.Height = 40;
            dataGridView1.DataSource         = nhanvien.getAllTTKH(command);
            dataGridView1.AllowUserToAddRows = false;
        }
Example #2
0
        public void fillGrid(SqlCommand command)
        {
            Nhanvien nhanvien = new Nhanvien();

            dataGridViewManagerStudent.ReadOnly = true;
            DataGridViewImageColumn picCol = new DataGridViewImageColumn();

            dataGridViewManagerStudent.RowTemplate.Height = 100;
            dataGridViewManagerStudent.DataSource         = nhanvien.getAllTTKH(command);
            picCol             = (DataGridViewImageColumn)dataGridViewManagerStudent.Columns[7];
            picCol.ImageLayout = DataGridViewImageCellLayout.Stretch;
            dataGridViewManagerStudent.AllowUserToAddRows = false;
        }
Example #3
0
        private void buttonRF_Click(object sender, EventArgs e)
        {
            SqlCommand command = new SqlCommand("SELECT * FROM TTKH");

            dataGridViewKH.ReadOnly = true;
            DataGridViewImageColumn piccol = new DataGridViewImageColumn();

            dataGridViewKH.RowTemplate.Height = 20;
            dataGridViewKH.DataSource         = nhanvien.getAllTTKH(command);
            piccol             = (DataGridViewImageColumn)dataGridViewKH.Columns[7];
            piccol.ImageLayout = DataGridViewImageCellLayout.Stretch;
            dataGridViewKH.AllowUserToAddRows = false;
        }