Exemplo n.º 1
0
 private void Grid_Exercicios_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (Grid_Exercicios.Rows.Count > 0)
     {
         foreach (var item in exercicios.Where(x => x.ID == Convert.ToInt32(Grid_Exercicios.CurrentRow.Cells[1].Value)))
         {
             try
             {
                 Program.PanelCarregando.Visible = true;
                 Program.PanelCarregando.Refresh();
                 NotaDAL dal = new NotaDAL();
                 notas = dal.Consultar(UsuarioAtual.ID, item.ID);
                 CarregarNotas();
                 Program.PanelCarregando.Visible = false;
             }
             catch (Exception)
             {
                 MessageBox.Show("Erro de Conexão, tente novamente", "Enigma", MessageBoxButtons.OK, MessageBoxIcon.Error);
                 Program.PanelCarregando.Visible = false;
             }
         }
     }
 }
Exemplo n.º 2
0
        public List <Nota> Consultar(int usuario, int exercicio)
        {
            NotaDAL dal = new NotaDAL();

            return(dal.Consultar(usuario, exercicio));
        }