protected void grdList_RowCommand(object sender, GridViewCommandEventArgs e) { try { if (e.CommandName.ToLowerInvariant() == "selecionar") { IdTurma = Convert.ToInt64(e.CommandArgument.ToString()); Ler(); ExibirPainel(painel.form); } else if (e.CommandName.ToLowerInvariant() == "excluir") { IdTurma = Convert.ToInt64(e.CommandArgument.ToString()); Excluir(); Listar(); ExibirPainel(painel.lista); } else if (e.CommandName.ToLowerInvariant() == "instrutores") { IdTurma = Convert.ToInt64(e.CommandArgument.ToString()); var turmaDto = bpTurma.Ler(IdTurma); if (turmaDto != null) { lblTurma.Text = turmaDto.Descricao.ToUpperInvariant(); lblCurso.Text = turmaDto.Curso.ToUpperInvariant(); } ExibirPainel(painel.instrutor); ListarTurmaInstrutor(); } else if (e.CommandName.ToLowerInvariant() == "horarios") { IdTurma = Convert.ToInt64(e.CommandArgument.ToString()); var turmaDto = bpTurma.Ler(IdTurma); if (turmaDto != null) { lblTurmaHorario_Turma.Text = turmaDto.Descricao.ToUpperInvariant(); lblTurmaHorario_Curso.Text = turmaDto.Curso.ToUpperInvariant(); } ExibirPainel(painel.horarios); ListarTurmaHorario(); } } catch (Exception ex) { JavaScript.ShowMsg(Page, ex.Message); } }