private void Lista_Alunos_Load(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand("SELECT IDALUNO, NOME, NASCIMENTO, GENERO, FOTO FROM ALUNO ORDER BY IDALUNO"); grid_Alunos.ReadOnly = true; DataGridViewImageColumn fotoCol = new DataGridViewImageColumn(); grid_Alunos.RowTemplate.Height = 80; grid_Alunos.DataSource = aluno.getAlunos(cmd); fotoCol = (DataGridViewImageColumn)grid_Alunos.Columns[4]; fotoCol.ImageLayout = DataGridViewImageCellLayout.Stretch; grid_Alunos.AllowUserToAddRows = false; SqlCommand cmd2 = new SqlCommand("SELECT R.NOME, R.IDALUNO FROM RESPONSAVEL R" + " INNER JOIN ALUNO A" + " ON R.IDALUNO = A.IDALUNO ORDER BY R.IDALUNO"); grid_responsavel.ReadOnly = true; grid_responsavel.RowTemplate.Height = 80; grid_responsavel.DataSource = responsavelDao.getResponsavel(cmd2); grid_responsavel.AllowUserToAddRows = false; SqlCommand cmd3 = new SqlCommand("SELECT R.IDRESPONSAVEL, T.NUMERO FROM TELEFONE T INNER JOIN RESPONSAVEL_TELEFONE RT ON RT.IDTELEFONE = T.IDTELEFONE INNER JOIN RESPONSAVEL R ON R.IDRESPONSAVEL = RT.IDRESPONSAVEL INNER JOIN ALUNO A ON A.IDALUNO = R.IDALUNO ORDER BY R.IDALUNO"); grid_Telefone.ReadOnly = true; grid_Telefone.RowTemplate.Height = 80; grid_Telefone.DataSource = telefoneDao.GetTelefone(cmd3); grid_Telefone.AllowUserToAddRows = false; SqlCommand cmd4 = new SqlCommand("SELECT E.CEP, E.UF, E.CIDADE, E.BAIRRO, E.RUA, E.NUMERO FROM ENDERECO E INNER JOIN RESPONSAVEL_ENDERECO RE ON RE.IDENDERECO = E.IDENDERECO INNER JOIN RESPONSAVEL R ON R.IDRESPONSAVEL = RE.IDRESPONSAVEL INNER JOIN ALUNO A ON A.IDALUNO = R.IDALUNO ORDER BY A.IDALUNO"); grid_Endereco.ReadOnly = true; grid_Endereco.RowTemplate.Height = 80; grid_Endereco.DataSource = enderecoDao.GetEndereco(cmd4); grid_Endereco.AllowUserToAddRows = false; }