private void cerrar()
        {
            fInfoActividad f = new fInfoActividad(user, act);

            this.Hide();
            f.ShowDialog();
            this.Close();
        }
示例#2
0
 private void pictureBox3_Click(object sender, EventArgs e)
 {
     if (evento is Curso)
     {
         fInfoCursoProfesor curso = new fInfoCursoProfesor(user, (Curso)evento);
         this.Hide();
         curso.ShowDialog();
         this.Close();
     }
     else
     {
         fInfoActividad curso = new fInfoActividad(user, (Actividad)evento);
         this.Hide();
         curso.ShowDialog();
         this.Close();
     }
 }
 private void dgvMisAct_SelectionChanged(object sender, EventArgs e)
 {
     try
     {
         if (dgvMisAct.SelectedRows.Count > 0)
         {
             int            id   = (int)dgvMisAct.SelectedRows[0].Cells[0].Value;
             fInfoActividad info = new fInfoActividad(alumno, new Actividad(id));
             this.Hide();
             info.ShowDialog();
             this.Close();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("ERROR " + ex.Message);
     }
 }
示例#4
0
 private void bInformacion_Click(object sender, EventArgs e)
 {
     try
     {
         if (seleccionado != null)
         {
             fInfoActividad info = new fInfoActividad(ong, seleccionado);
             this.Hide();
             info.ShowDialog();
             this.Close();
         }
         else
         {
             throw new Exception("No hay ninguna actividad seleccionada");
         }
     } catch (Exception ex)
     {
         MessageBox.Show("ERROR: " + ex.Message);
     }
 }
示例#5
0
 private void bInformacionActividad_Click(object sender, EventArgs e)
 {
     try
     {
         if (seleccionada == null)
         {
             throw new Exception("Ninguna actividad seleccionada");
         }
         else
         {
             if (profesor.RolUsuario.RolName.Equals("PROFESOR"))
             {
                 fInfoActividad infoActividad = new fInfoActividad(profesor, seleccionada);
                 this.Hide();
                 infoActividad.ShowDialog();
                 this.Close();
             }
         }
     } catch (Exception ex)
     {
         MessageBox.Show("ERROR: " + ex.Message);
     }
 }